beeps 0.1.12 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. checksums.yaml +5 -5
  2. data/.doc/ext/beeps/beeps.cpp +0 -5
  3. data/.doc/ext/beeps/file_in.cpp +0 -5
  4. data/.doc/ext/beeps/native.cpp +0 -4
  5. data/.doc/ext/beeps/processor.cpp +1 -5
  6. data/.doc/ext/beeps/sawtooth_wave.cpp +0 -5
  7. data/.doc/ext/beeps/sine_wave.cpp +0 -5
  8. data/.doc/ext/beeps/sound.cpp +0 -5
  9. data/.doc/ext/beeps/square_wave.cpp +0 -5
  10. data/README.md +1 -1
  11. data/Rakefile +15 -12
  12. data/VERSION +1 -1
  13. data/beeps.gemspec +5 -7
  14. data/ext/beeps/beeps.cpp +0 -5
  15. data/ext/beeps/defs.h +3 -2
  16. data/ext/beeps/extconf.rb +2 -3
  17. data/ext/beeps/file_in.cpp +0 -5
  18. data/ext/beeps/native.cpp +0 -4
  19. data/ext/beeps/processor.cpp +1 -5
  20. data/ext/beeps/sawtooth_wave.cpp +0 -5
  21. data/ext/beeps/sine_wave.cpp +0 -5
  22. data/ext/beeps/sound.cpp +0 -5
  23. data/ext/beeps/square_wave.cpp +0 -5
  24. data/include/beeps.h +5 -0
  25. data/include/beeps/debug.h +23 -0
  26. data/include/beeps/processor.h +9 -6
  27. data/include/beeps/signals.h +2 -9
  28. data/include/beeps/sound.h +2 -1
  29. data/lib/beeps/module.rb +4 -19
  30. data/lib/beeps/processor.rb +16 -20
  31. data/src/beeps.cpp +3 -64
  32. data/src/exception.cpp +0 -3
  33. data/src/openal.cpp +63 -174
  34. data/src/openal.h +15 -4
  35. data/src/processor.cpp +5 -5
  36. data/src/signals.cpp +21 -19
  37. data/src/signals.h +23 -0
  38. data/src/sound.cpp +173 -14
  39. data/src/sound.h +17 -0
  40. metadata +27 -70
  41. data/include/beeps/openal.h +0 -34
  42. data/src/stk/include/Blit.h +0 -151
  43. data/src/stk/include/BlitSaw.h +0 -148
  44. data/src/stk/include/BlitSquare.h +0 -170
  45. data/src/stk/include/FileRead.h +0 -141
  46. data/src/stk/include/FileWvIn.h +0 -195
  47. data/src/stk/include/Generator.h +0 -50
  48. data/src/stk/include/SineWave.h +0 -159
  49. data/src/stk/include/Stk.h +0 -589
  50. data/src/stk/include/WvIn.h +0 -46
  51. data/src/stk/src/Blit.cpp +0 -78
  52. data/src/stk/src/BlitSaw.cpp +0 -91
  53. data/src/stk/src/BlitSquare.cpp +0 -95
  54. data/src/stk/src/FileRead.cpp +0 -903
  55. data/src/stk/src/FileWvIn.cpp +0 -260
  56. data/src/stk/src/SineWave.cpp +0 -78
  57. data/src/stk/src/Stk.cpp +0 -395
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: eae5a0a025e1e476f42b1fd5274272eb17b09b67
4
- data.tar.gz: ca4ab6a05145864a2bfa436096191d7dc38dcfc0
2
+ SHA256:
3
+ metadata.gz: a7d194c4c43acfcb1eac972d9071b35926a0a5a3d69f5dc5312316c5b6d7d6d8
4
+ data.tar.gz: afba75d00c2ede2a10b7c8fc8c68108efec0479883ec9bcb0a6ad5757bdc8d2d
5
5
  SHA512:
6
- metadata.gz: 70b8dbf83d279c5caad425ef9f0cb2a0f3e597af65d6449ad57b35e652d113159a863ccf3f5befec97eceb65ede7f8e33b55a1029e8b134497b1455503df1663
7
- data.tar.gz: 3737d9bfd0fe48c4a790fb023c7e440c3f5b587449736e1d7d8f21b1e05386cb4d03dccf4b5117a5a39786becc36675d9189bb67d36288b822933b78872a6357
6
+ metadata.gz: 16f84fbdef0fc3e557b1648dd98f17f5b94a93293363200452fa9d64262970773d8b23c0093de768c025abc9b70d1eb80ef3c4fd8e3c8d9a523700cf23484c36
7
+ data.tar.gz: a77fe915fc62d4b4ab5d2600ff4b0a2c9905417b8655b85b4438f6d638d00fabbb6659a06b240d5f5738b451926426ca298273295d4a31b336440342f4c40c2f
@@ -1,12 +1,7 @@
1
- #include <rucy.h>
2
- #include <ruby/intern.h>
3
1
  #include "beeps/beeps.h"
4
2
  #include "defs.h"
5
3
 
6
4
 
7
- using namespace Rucy;
8
-
9
-
10
5
  static
11
6
  VALUE init(VALUE self)
12
7
  {
@@ -1,14 +1,9 @@
1
1
  #include "beeps/ruby/processor.h"
2
2
 
3
3
 
4
- #include <rucy.h>
5
- #include "beeps/exception.h"
6
4
  #include "defs.h"
7
5
 
8
6
 
9
- using namespace Rucy;
10
-
11
-
12
7
  RUCY_DEFINE_VALUE_FROM_TO(Beeps::FileIn)
13
8
 
14
9
  #define THIS to<Beeps::FileIn*>(self)
@@ -1,10 +1,6 @@
1
- #include <rucy.h>
2
1
  #include "defs.h"
3
2
 
4
3
 
5
- using namespace Rucy;
6
-
7
-
8
4
  void Init_beeps ();
9
5
 
10
6
  void Init_processor ();
@@ -1,14 +1,10 @@
1
1
  #include "beeps/ruby/processor.h"
2
2
 
3
3
 
4
- #include <rucy.h>
5
4
  #include "beeps/exception.h"
6
5
  #include "defs.h"
7
6
 
8
7
 
9
- using namespace Rucy;
10
-
11
-
12
8
  RUCY_DEFINE_VALUE_FROM_TO(Beeps::Processor)
13
9
 
14
10
  #define THIS to<Beeps::Processor*>(self)
@@ -19,7 +15,7 @@ RUCY_DEFINE_VALUE_FROM_TO(Beeps::Processor)
19
15
  static
20
16
  VALUE alloc(VALUE klass)
21
17
  {
22
- beeps_error(__FILE__, __LINE__);
18
+ Beeps::beeps_error(__FILE__, __LINE__);
23
19
  }
24
20
 
25
21
 
@@ -1,14 +1,9 @@
1
1
  #include "beeps/ruby/processor.h"
2
2
 
3
3
 
4
- #include <rucy.h>
5
- #include "beeps/exception.h"
6
4
  #include "defs.h"
7
5
 
8
6
 
9
- using namespace Rucy;
10
-
11
-
12
7
  RUCY_DEFINE_VALUE_FROM_TO(Beeps::SawtoothWave)
13
8
 
14
9
  #define THIS to<Beeps::SawtoothWave*>(self)
@@ -1,14 +1,9 @@
1
1
  #include "beeps/ruby/processor.h"
2
2
 
3
3
 
4
- #include <rucy.h>
5
- #include "beeps/exception.h"
6
4
  #include "defs.h"
7
5
 
8
6
 
9
- using namespace Rucy;
10
-
11
-
12
7
  RUCY_DEFINE_VALUE_FROM_TO(Beeps::SineWave)
13
8
 
14
9
  #define THIS to<Beeps::SineWave*>(self)
@@ -1,14 +1,9 @@
1
1
  #include "beeps/ruby/sound.h"
2
2
 
3
3
 
4
- #include <rucy.h>
5
- #include "beeps/exception.h"
6
4
  #include "defs.h"
7
5
 
8
6
 
9
- using namespace Rucy;
10
-
11
-
12
7
  RUCY_DEFINE_VALUE_FROM_TO(Beeps::Sound)
13
8
 
14
9
  #define THIS to<Beeps::Sound*>(self)
@@ -1,14 +1,9 @@
1
1
  #include "beeps/ruby/processor.h"
2
2
 
3
3
 
4
- #include <rucy.h>
5
- #include "beeps/exception.h"
6
4
  #include "defs.h"
7
5
 
8
6
 
9
- using namespace Rucy;
10
-
11
-
12
7
  RUCY_DEFINE_VALUE_FROM_TO(Beeps::SquareWave)
13
8
 
14
9
  #define THIS to<Beeps::SquareWave*>(self)
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
1
 
2
2
  # Beeps - Plays beep sound.
3
3
 
4
- by snori@xord.org
4
+ by xordog@gmail.com
data/Rakefile CHANGED
@@ -2,26 +2,29 @@
2
2
 
3
3
 
4
4
  %w[../xot ../rucy .]
5
- .map {|s| File.expand_path "../#{s}/lib", __FILE__}
5
+ .map {|s| File.expand_path "#{s}/lib", __dir__}
6
6
  .each {|s| $:.unshift s if !$:.include?(s) && File.directory?(s)}
7
7
 
8
- require 'xot/rake'
8
+ require 'rucy/rake'
9
+
9
10
  require 'xot/module'
10
11
  require 'rucy/module'
11
12
  require 'beeps/module'
12
13
 
13
- include Xot::Rake
14
-
15
14
 
16
- MODULES = [Xot, Rucy, Beeps].map {|m| m.const_get :Module}
17
- MODULE = MODULES.last
18
- INCDIRS = ['src/stk/include']
15
+ MODULES = [Xot, Rucy, Beeps]
19
16
  TESTS_ALONE = ['test/test_beeps.rb']
20
17
 
18
+ use_external_library 'https://github.com/thestk/stk',
19
+ tag: 'v4.6.0',
20
+ incdir: 'include',
21
+ srcdir: 'src',
22
+ excludes: %w[stk/src/include Tcp Udp Socket Thread Mutex InetWv /Rt]
21
23
 
22
- task :default => :build
23
-
24
- task :build => :ext
25
-
24
+ build_native_library
25
+ build_ruby_extension
26
+ test_ruby_extension
27
+ generate_documents
28
+ build_ruby_gem
26
29
 
27
- MODULES.each {|m| m.load_tasks :lib, :ext, :test, :doc, :gem}
30
+ task :default => :test
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.12
1
+ 0.1.13
@@ -21,17 +21,15 @@ Gem::Specification.new do |s|
21
21
  s.description = 'Synthesize and play beep sounds.'
22
22
  s.version = mod.version
23
23
 
24
- s.authors = %w[snori]
25
- s.email = 'snori@xord.org'
24
+ s.authors = %w[xordog]
25
+ s.email = 'xordog@gmail.com'
26
26
  s.homepage = "https://github.com/xord/beeps"
27
27
 
28
28
  s.platform = Gem::Platform::RUBY
29
- s.required_ruby_version = '>=1.9.0'
29
+ s.required_ruby_version = '~> 2'
30
30
 
31
- s.add_runtime_dependency 'rake'
32
- s.add_runtime_dependency 'xot'
33
- s.add_runtime_dependency 'rucy'
34
- s.add_development_dependency 'gemcutter'
31
+ s.add_runtime_dependency 'xot', '~> 0.1'
32
+ s.add_runtime_dependency 'rucy', '~> 0.1'
35
33
 
36
34
  s.files = `git ls-files`.split $/
37
35
  s.executables = s.files.grep(%r{^bin/}) {|f| File.basename f}
@@ -1,12 +1,7 @@
1
- #include <rucy.h>
2
- #include <ruby/intern.h>
3
1
  #include "beeps/beeps.h"
4
2
  #include "defs.h"
5
3
 
6
4
 
7
- using namespace Rucy;
8
-
9
-
10
5
  static
11
6
  RUCY_DEF0(init)
12
7
  {
@@ -4,10 +4,11 @@
4
4
  #define __BEEPS_EXT_DEFS_H__
5
5
 
6
6
 
7
- #include <beeps/exception.h>
7
+ #include <rucy.h>
8
+ #include <beeps/defs.h>
8
9
 
9
10
 
10
- using Beeps::beeps_error;
11
+ using namespace Rucy;
11
12
 
12
13
 
13
14
  #endif//EOH
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
  %w[../xot ../rucy .]
5
- .map {|s| File.expand_path "../../../#{s}/lib", __FILE__}
5
+ .map {|s| File.expand_path "../../#{s}/lib", __dir__}
6
6
  .each {|s| $:.unshift s if !$:.include?(s) && File.directory?(s)}
7
7
 
8
8
  require 'mkmf'
@@ -14,12 +14,11 @@ require 'beeps/module'
14
14
 
15
15
  Xot::ExtConf.new Xot, Rucy, Beeps do
16
16
  setup do
17
- headers << 'OpenAL/al.h' << 'OpenAL/alc.h'
17
+ headers << 'ruby.h' << 'OpenAL/al.h' << 'OpenAL/alc.h'
18
18
  local_libs << 'rucy'
19
19
  frameworks << 'OpenAL' if osx?
20
20
  $LDFLAGS << ' -Wl,--out-implib=native.dll.a' if cygwin?
21
21
  end
22
22
 
23
- dir_config 'boost'
24
23
  create_makefile 'beeps/native'
25
24
  end
@@ -1,14 +1,9 @@
1
1
  #include "beeps/ruby/processor.h"
2
2
 
3
3
 
4
- #include <rucy.h>
5
- #include "beeps/exception.h"
6
4
  #include "defs.h"
7
5
 
8
6
 
9
- using namespace Rucy;
10
-
11
-
12
7
  RUCY_DEFINE_VALUE_FROM_TO(Beeps::FileIn)
13
8
 
14
9
  #define THIS to<Beeps::FileIn*>(self)
@@ -1,10 +1,6 @@
1
- #include <rucy.h>
2
1
  #include "defs.h"
3
2
 
4
3
 
5
- using namespace Rucy;
6
-
7
-
8
4
  void Init_beeps ();
9
5
 
10
6
  void Init_processor ();
@@ -1,14 +1,10 @@
1
1
  #include "beeps/ruby/processor.h"
2
2
 
3
3
 
4
- #include <rucy.h>
5
4
  #include "beeps/exception.h"
6
5
  #include "defs.h"
7
6
 
8
7
 
9
- using namespace Rucy;
10
-
11
-
12
8
  RUCY_DEFINE_VALUE_FROM_TO(Beeps::Processor)
13
9
 
14
10
  #define THIS to<Beeps::Processor*>(self)
@@ -19,7 +15,7 @@ RUCY_DEFINE_VALUE_FROM_TO(Beeps::Processor)
19
15
  static
20
16
  RUCY_DEF_ALLOC(alloc, klass)
21
17
  {
22
- beeps_error(__FILE__, __LINE__);
18
+ Beeps::beeps_error(__FILE__, __LINE__);
23
19
  }
24
20
  RUCY_END
25
21
 
@@ -1,14 +1,9 @@
1
1
  #include "beeps/ruby/processor.h"
2
2
 
3
3
 
4
- #include <rucy.h>
5
- #include "beeps/exception.h"
6
4
  #include "defs.h"
7
5
 
8
6
 
9
- using namespace Rucy;
10
-
11
-
12
7
  RUCY_DEFINE_VALUE_FROM_TO(Beeps::SawtoothWave)
13
8
 
14
9
  #define THIS to<Beeps::SawtoothWave*>(self)
@@ -1,14 +1,9 @@
1
1
  #include "beeps/ruby/processor.h"
2
2
 
3
3
 
4
- #include <rucy.h>
5
- #include "beeps/exception.h"
6
4
  #include "defs.h"
7
5
 
8
6
 
9
- using namespace Rucy;
10
-
11
-
12
7
  RUCY_DEFINE_VALUE_FROM_TO(Beeps::SineWave)
13
8
 
14
9
  #define THIS to<Beeps::SineWave*>(self)
@@ -1,14 +1,9 @@
1
1
  #include "beeps/ruby/sound.h"
2
2
 
3
3
 
4
- #include <rucy.h>
5
- #include "beeps/exception.h"
6
4
  #include "defs.h"
7
5
 
8
6
 
9
- using namespace Rucy;
10
-
11
-
12
7
  RUCY_DEFINE_VALUE_FROM_TO(Beeps::Sound)
13
8
 
14
9
  #define THIS to<Beeps::Sound*>(self)
@@ -1,14 +1,9 @@
1
1
  #include "beeps/ruby/processor.h"
2
2
 
3
3
 
4
- #include <rucy.h>
5
- #include "beeps/exception.h"
6
4
  #include "defs.h"
7
5
 
8
6
 
9
- using namespace Rucy;
10
-
11
-
12
7
  RUCY_DEFINE_VALUE_FROM_TO(Beeps::SquareWave)
13
8
 
14
9
  #define THIS to<Beeps::SquareWave*>(self)
@@ -7,6 +7,11 @@
7
7
  #include <beeps/defs.h>
8
8
  #include <beeps/beeps.h>
9
9
  #include <beeps/exception.h>
10
+ #include <beeps/debug.h>
11
+
12
+ #include <beeps/signals.h>
13
+ #include <beeps/processor.h>
14
+ #include <beeps/sound.h>
10
15
 
11
16
 
12
17
  #endif//EOH
@@ -0,0 +1,23 @@
1
+ // -*- c++ -*-
2
+ #pragma once
3
+ #ifndef __BEEPS_DEBUG_H__
4
+ #define __BEEPS_DEBUG_H__
5
+
6
+
7
+ #include <xot/debug.h>
8
+ #include <beeps/defs.h>
9
+
10
+
11
+ namespace Beeps
12
+ {
13
+
14
+
15
+ using Xot::dout;
16
+
17
+ using Xot::doutln;
18
+
19
+
20
+ }// Beeps
21
+
22
+
23
+ #endif//EOH
@@ -5,6 +5,7 @@
5
5
 
6
6
 
7
7
  #include <xot/pimpl.h>
8
+ #include <beeps/defs.h>
8
9
 
9
10
 
10
11
  namespace Beeps
@@ -19,8 +20,6 @@ namespace Beeps
19
20
 
20
21
  public:
21
22
 
22
- Processor ();
23
-
24
23
  virtual ~Processor ();
25
24
 
26
25
  virtual void process (Signals* signals);
@@ -29,6 +28,10 @@ namespace Beeps
29
28
 
30
29
  virtual bool operator ! () const;
31
30
 
31
+ protected:
32
+
33
+ Processor ();
34
+
32
35
  };// Processor
33
36
 
34
37
 
@@ -51,7 +54,7 @@ namespace Beeps
51
54
 
52
55
  struct Data;
53
56
 
54
- Xot::PImpl<Data, true> self;
57
+ Xot::PSharedImpl<Data> self;
55
58
 
56
59
  };// SineWave
57
60
 
@@ -75,7 +78,7 @@ namespace Beeps
75
78
 
76
79
  struct Data;
77
80
 
78
- Xot::PImpl<Data, true> self;
81
+ Xot::PSharedImpl<Data> self;
79
82
 
80
83
  };// SquareWave
81
84
 
@@ -99,7 +102,7 @@ namespace Beeps
99
102
 
100
103
  struct Data;
101
104
 
102
- Xot::PImpl<Data, true> self;
105
+ Xot::PSharedImpl<Data> self;
103
106
 
104
107
  };// SawtoothWave
105
108
 
@@ -121,7 +124,7 @@ namespace Beeps
121
124
 
122
125
  struct Data;
123
126
 
124
- Xot::PImpl<Data, true> self;
127
+ Xot::PSharedImpl<Data> self;
125
128
 
126
129
  };// FileIn
127
130