beeps 0.2 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/.doc/ext/beeps/adsr.cpp +1 -1
  3. data/.doc/ext/beeps/analyser.cpp +1 -1
  4. data/.doc/ext/beeps/file_in.cpp +1 -1
  5. data/.doc/ext/beeps/gain.cpp +1 -1
  6. data/.doc/ext/beeps/mic_in.cpp +1 -1
  7. data/.doc/ext/beeps/oscillator.cpp +1 -1
  8. data/.doc/ext/beeps/pitch_shift.cpp +1 -1
  9. data/.doc/ext/beeps/processor.cpp +1 -1
  10. data/.doc/ext/beeps/sound.cpp +1 -1
  11. data/.doc/ext/beeps/sound_player.cpp +1 -1
  12. data/.doc/ext/beeps/time_stretch.cpp +1 -1
  13. data/.github/workflows/release-gem.yml +2 -2
  14. data/.github/workflows/tag.yml +1 -1
  15. data/.github/workflows/test.yml +10 -1
  16. data/ChangeLog.md +15 -0
  17. data/Gemfile.lock +1 -1
  18. data/Rakefile +3 -1
  19. data/VERSION +1 -1
  20. data/beeps.gemspec +2 -2
  21. data/ext/beeps/adsr.cpp +1 -1
  22. data/ext/beeps/analyser.cpp +1 -1
  23. data/ext/beeps/defs.h +2 -0
  24. data/ext/beeps/extconf.rb +11 -3
  25. data/ext/beeps/file_in.cpp +1 -1
  26. data/ext/beeps/gain.cpp +1 -1
  27. data/ext/beeps/mic_in.cpp +1 -1
  28. data/ext/beeps/oscillator.cpp +1 -1
  29. data/ext/beeps/pitch_shift.cpp +1 -1
  30. data/ext/beeps/processor.cpp +1 -1
  31. data/ext/beeps/sound.cpp +1 -1
  32. data/ext/beeps/sound_player.cpp +1 -1
  33. data/ext/beeps/time_stretch.cpp +1 -1
  34. data/include/beeps/debug.h +0 -1
  35. data/include/beeps/defs.h +7 -0
  36. data/include/beeps/ruby/beeps.h +1 -1
  37. data/include/beeps/ruby/exception.h +2 -2
  38. data/include/beeps/ruby/filter.h +7 -7
  39. data/include/beeps/ruby/generator.h +5 -5
  40. data/include/beeps/ruby/processor.h +2 -2
  41. data/include/beeps/ruby/sound.h +4 -4
  42. data/include/beeps/ruby.h +3 -1
  43. data/include/beeps.h +2 -0
  44. data/lib/beeps/extension.rb +4 -0
  45. data/src/beeps.cpp +3 -1
  46. data/src/beeps.h +22 -0
  47. data/src/openal.cpp +6 -0
  48. data/src/openal.h +2 -0
  49. data/src/osx/beeps.mm +19 -0
  50. data/src/signals.cpp +17 -15
  51. data/src/signals.h +6 -6
  52. data/src/sound.cpp +41 -18
  53. data/src/win32/beeps.cpp +36 -0
  54. data/src/win32/exception.cpp +40 -0
  55. data/src/win32/exception.h +40 -0
  56. data/src/win32/signals.cpp +186 -0
  57. data/test/helper.rb +0 -5
  58. data/test/test_sound_player.rb +4 -0
  59. metadata +12 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 99cc2d38469ff5c4a36bbca67ab0501a47e0aacac212f0f76771e961bb7a6ac7
4
- data.tar.gz: 406ecb1ebe19efdb536de07efd3723f34eeba93cb89a82767501e94ef08320e1
3
+ metadata.gz: c4df684684e65c0ee091bb8054a55e57cee8e8d9b932382defa62229027cedb7
4
+ data.tar.gz: 6c59120efd1f32823ef0d1982f243106f38ea4543a568739e9739811ee1e3d4c
5
5
  SHA512:
6
- metadata.gz: b3de02786df9756536f43cb41fe595e812394f6b0ecd8e2843489e394f53ed9892048138d3a9804fd1c1f44f19e15801af7180644915dfde6b7677f9c4dadc40
7
- data.tar.gz: 65a636d6922a1dea98e2ea4f26139fe47a696343bb81b561c38d81f3680cefff8597c9d29e791c82026cf786e738ecf6dcf54340cb30812f6e2ed845c1be33f3
6
+ metadata.gz: db163aa74ddac2978422aa52b3bef3e157295aa93f46a79e8e32b88c0b0752f337cd6bc1636e53dae751ddaac554c86b4daa72ad57f038ddf3586078253bb669
7
+ data.tar.gz: 9997be8c7be61a021087d05b3e17aa695a07d3a70e9fed9bd61b3b82d66cda81c2e5279a74ef0100771281480d1ada8b9b52d6a936375f1a361fe6aa3d97d5bf
@@ -5,7 +5,7 @@
5
5
  #include "defs.h"
6
6
 
7
7
 
8
- RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(Beeps::ADSR)
8
+ RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::ADSR)
9
9
 
10
10
  #define THIS to<Beeps::ADSR*>(self)
11
11
 
@@ -6,7 +6,7 @@
6
6
  #include "defs.h"
7
7
 
8
8
 
9
- RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(Beeps::Analyser)
9
+ RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::Analyser)
10
10
 
11
11
  #define THIS to<Beeps::Analyser*>(self)
12
12
 
@@ -5,7 +5,7 @@
5
5
  #include "defs.h"
6
6
 
7
7
 
8
- RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(Beeps::FileIn)
8
+ RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::FileIn)
9
9
 
10
10
  #define THIS to<Beeps::FileIn*>(self)
11
11
 
@@ -5,7 +5,7 @@
5
5
  #include "defs.h"
6
6
 
7
7
 
8
- RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(Beeps::Gain)
8
+ RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::Gain)
9
9
 
10
10
  #define THIS to<Beeps::Gain*>(self)
11
11
 
@@ -5,7 +5,7 @@
5
5
  #include "defs.h"
6
6
 
7
7
 
8
- RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(Beeps::MicIn)
8
+ RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::MicIn)
9
9
 
10
10
  #define THIS to<Beeps::MicIn*>(self)
11
11
 
@@ -5,7 +5,7 @@
5
5
  #include "defs.h"
6
6
 
7
7
 
8
- RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(Beeps::Oscillator)
8
+ RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::Oscillator)
9
9
 
10
10
  #define THIS to<Beeps::Oscillator*>(self)
11
11
 
@@ -5,7 +5,7 @@
5
5
  #include "defs.h"
6
6
 
7
7
 
8
- RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(Beeps::PitchShift)
8
+ RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::PitchShift)
9
9
 
10
10
  #define THIS to<Beeps::PitchShift*>(self)
11
11
 
@@ -5,7 +5,7 @@
5
5
  #include "defs.h"
6
6
 
7
7
 
8
- RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(Beeps::Processor)
8
+ RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::Processor)
9
9
 
10
10
  #define THIS to<Beeps::Processor*>(self)
11
11
 
@@ -4,7 +4,7 @@
4
4
  #include "defs.h"
5
5
 
6
6
 
7
- RUCY_DEFINE_VALUE_FROM_TO(Beeps::Sound)
7
+ RUCY_DEFINE_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::Sound)
8
8
 
9
9
  #define THIS to<Beeps::Sound*>(self)
10
10
 
@@ -4,7 +4,7 @@
4
4
  #include "defs.h"
5
5
 
6
6
 
7
- RUCY_DEFINE_VALUE_FROM_TO(Beeps::SoundPlayer)
7
+ RUCY_DEFINE_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::SoundPlayer)
8
8
 
9
9
  #define THIS to<Beeps::SoundPlayer*>(self)
10
10
 
@@ -5,7 +5,7 @@
5
5
  #include "defs.h"
6
6
 
7
7
 
8
- RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(Beeps::TimeStretch)
8
+ RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::TimeStretch)
9
9
 
10
10
  #define THIS to<Beeps::TimeStretch*>(self)
11
11
 
@@ -15,7 +15,7 @@ jobs:
15
15
  ruby-version: 3.2
16
16
 
17
17
  - name: checkout
18
- uses: actions/checkout@v2
18
+ uses: actions/checkout@v4
19
19
 
20
20
  - name: setup gems
21
21
  run: bundle install
@@ -24,7 +24,7 @@ jobs:
24
24
  run: "ruby -I.github/workflows -rutils -e 'setup_dependencies'"
25
25
 
26
26
  - name: test
27
- run: bundle exec rake quiet test
27
+ run: bundle exec rake quiet packages test
28
28
 
29
29
  - name: create gem
30
30
  id: gem
@@ -15,7 +15,7 @@ jobs:
15
15
  ruby-version: 3.2
16
16
 
17
17
  - name: checkout
18
- uses: actions/checkout@v2
18
+ uses: actions/checkout@v4
19
19
  with:
20
20
  fetch-depth: 0
21
21
  token: ${{ secrets.PAT }}
@@ -16,7 +16,7 @@ jobs:
16
16
  ruby-version: 3.2
17
17
 
18
18
  - name: checkout
19
- uses: actions/checkout@v2
19
+ uses: actions/checkout@v4
20
20
 
21
21
  - name: setup gems
22
22
  run: bundle install
@@ -24,5 +24,14 @@ jobs:
24
24
  - name: setup dependencies
25
25
  run: "ruby -I.github/workflows -rutils -e 'setup_dependencies'"
26
26
 
27
+ - name: packages
28
+ run: bundle exec rake packages
29
+
30
+ - name: lib
31
+ run: bundle exec rake lib
32
+
33
+ - name: ext
34
+ run: bundle exec rake ext
35
+
27
36
  - name: test
28
37
  run: bundle exec rake test
data/ChangeLog.md CHANGED
@@ -1,6 +1,21 @@
1
1
  # beeps ChangeLog
2
2
 
3
3
 
4
+ ## [v0.3] - 2024-07-06
5
+
6
+ - Support Windows
7
+
8
+
9
+ ## [v0.2.1] - 2024-07-05
10
+
11
+ - Do not delete OpenAL objects after calling OpenAL_fin()
12
+ - Do not redefine fin!() methods, they are no longer needed
13
+ - Skip 'test_play_end_then_stop' on GitHub Actions
14
+ - Update workflows for test
15
+ - Update to actions/checkout@v4
16
+ - Fix 'github_actions?'
17
+
18
+
4
19
  ## [v0.2] - 2024-03-14
5
20
 
6
21
  - Change the super class for exception class from RuntimeError to StandardError
data/Gemfile.lock CHANGED
@@ -9,7 +9,7 @@ GEM
9
9
 
10
10
  PLATFORMS
11
11
  arm64-darwin-21
12
- x86_64-darwin-20
12
+ arm64-darwin-22
13
13
 
14
14
  DEPENDENCIES
15
15
  rake
data/Rakefile CHANGED
@@ -15,6 +15,8 @@ require 'beeps/extension'
15
15
  EXTENSIONS = [Xot, Rucy, Beeps]
16
16
  TESTS_ALONE = ['test/test_beeps_init.rb']
17
17
 
18
+ install_packages win32: %w[MINGW_PACKAGE_PREFIX-openal]
19
+
18
20
  use_external_library 'https://github.com/thestk/stk',
19
21
  tag: '4.6.2',
20
22
  incdirs: 'include',
@@ -47,6 +49,6 @@ default_tasks :ext
47
49
  use_bundler
48
50
  build_native_library
49
51
  build_ruby_extension
50
- test_ruby_extension
52
+ test_ruby_extension unless github_actions? && win32?
51
53
  generate_documents
52
54
  build_ruby_gem
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2
1
+ 0.3
data/beeps.gemspec CHANGED
@@ -25,8 +25,8 @@ Gem::Specification.new do |s|
25
25
  s.platform = Gem::Platform::RUBY
26
26
  s.required_ruby_version = '>= 3.0.0'
27
27
 
28
- s.add_runtime_dependency 'xot', '~> 0.2'
29
- s.add_runtime_dependency 'rucy', '~> 0.2'
28
+ s.add_runtime_dependency 'xot', '~> 0.3'
29
+ s.add_runtime_dependency 'rucy', '~> 0.3'
30
30
 
31
31
  s.files = `git ls-files`.split $/
32
32
  s.executables = s.files.grep(%r{^bin/}) {|f| File.basename f}
data/ext/beeps/adsr.cpp CHANGED
@@ -5,7 +5,7 @@
5
5
  #include "defs.h"
6
6
 
7
7
 
8
- RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(Beeps::ADSR)
8
+ RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::ADSR)
9
9
 
10
10
  #define THIS to<Beeps::ADSR*>(self)
11
11
 
@@ -6,7 +6,7 @@
6
6
  #include "defs.h"
7
7
 
8
8
 
9
- RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(Beeps::Analyser)
9
+ RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::Analyser)
10
10
 
11
11
  #define THIS to<Beeps::Analyser*>(self)
12
12
 
data/ext/beeps/defs.h CHANGED
@@ -9,6 +9,8 @@
9
9
  #include "beeps/ruby/defs.h"
10
10
 
11
11
 
12
+ using namespace Xot::Types;
13
+
12
14
  using namespace Rucy;
13
15
 
14
16
 
data/ext/beeps/extconf.rb CHANGED
@@ -11,9 +11,17 @@ require 'beeps/extension'
11
11
 
12
12
  Xot::ExtConf.new Xot, Rucy, Beeps do
13
13
  setup do
14
- headers << 'ruby.h' << 'OpenAL/al.h' << 'OpenAL/alc.h'
15
- frameworks << 'OpenAL' << 'AVFoundation' if osx?
16
- $LDFLAGS << ' -Wl,--out-implib=native.dll.a' if cygwin?
14
+ headers << 'ruby.h'
15
+
16
+ if win32?
17
+ headers << 'AL/al.h' << 'AL/alc.h'
18
+ libs << 'openal' << 'ole32' << 'mf' << 'mfplat' << 'mfreadwrite' << 'mfuuid'
19
+ elsif osx?
20
+ headers << 'OpenAL/al.h' << 'OpenAL/alc.h'
21
+ frameworks << 'OpenAL' << 'AVFoundation'
22
+ end
23
+
24
+ $LDFLAGS << ' -Wl,--out-implib=native.dll.a' if mingw? || cygwin?
17
25
  end
18
26
 
19
27
  create_makefile 'beeps/native'
@@ -5,7 +5,7 @@
5
5
  #include "defs.h"
6
6
 
7
7
 
8
- RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(Beeps::FileIn)
8
+ RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::FileIn)
9
9
 
10
10
  #define THIS to<Beeps::FileIn*>(self)
11
11
 
data/ext/beeps/gain.cpp CHANGED
@@ -5,7 +5,7 @@
5
5
  #include "defs.h"
6
6
 
7
7
 
8
- RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(Beeps::Gain)
8
+ RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::Gain)
9
9
 
10
10
  #define THIS to<Beeps::Gain*>(self)
11
11
 
data/ext/beeps/mic_in.cpp CHANGED
@@ -5,7 +5,7 @@
5
5
  #include "defs.h"
6
6
 
7
7
 
8
- RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(Beeps::MicIn)
8
+ RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::MicIn)
9
9
 
10
10
  #define THIS to<Beeps::MicIn*>(self)
11
11
 
@@ -5,7 +5,7 @@
5
5
  #include "defs.h"
6
6
 
7
7
 
8
- RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(Beeps::Oscillator)
8
+ RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::Oscillator)
9
9
 
10
10
  #define THIS to<Beeps::Oscillator*>(self)
11
11
 
@@ -5,7 +5,7 @@
5
5
  #include "defs.h"
6
6
 
7
7
 
8
- RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(Beeps::PitchShift)
8
+ RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::PitchShift)
9
9
 
10
10
  #define THIS to<Beeps::PitchShift*>(self)
11
11
 
@@ -5,7 +5,7 @@
5
5
  #include "defs.h"
6
6
 
7
7
 
8
- RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(Beeps::Processor)
8
+ RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::Processor)
9
9
 
10
10
  #define THIS to<Beeps::Processor*>(self)
11
11
 
data/ext/beeps/sound.cpp CHANGED
@@ -4,7 +4,7 @@
4
4
  #include "defs.h"
5
5
 
6
6
 
7
- RUCY_DEFINE_VALUE_FROM_TO(Beeps::Sound)
7
+ RUCY_DEFINE_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::Sound)
8
8
 
9
9
  #define THIS to<Beeps::Sound*>(self)
10
10
 
@@ -4,7 +4,7 @@
4
4
  #include "defs.h"
5
5
 
6
6
 
7
- RUCY_DEFINE_VALUE_FROM_TO(Beeps::SoundPlayer)
7
+ RUCY_DEFINE_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::SoundPlayer)
8
8
 
9
9
  #define THIS to<Beeps::SoundPlayer*>(self)
10
10
 
@@ -5,7 +5,7 @@
5
5
  #include "defs.h"
6
6
 
7
7
 
8
- RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(Beeps::TimeStretch)
8
+ RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::TimeStretch)
9
9
 
10
10
  #define THIS to<Beeps::TimeStretch*>(self)
11
11
 
@@ -5,7 +5,6 @@
5
5
 
6
6
 
7
7
  #include <xot/debug.h>
8
- #include <beeps/defs.h>
9
8
 
10
9
 
11
10
  namespace Beeps
data/include/beeps/defs.h CHANGED
@@ -8,6 +8,13 @@
8
8
  #include <xot/string.h>
9
9
 
10
10
 
11
+ #if defined(WIN32) && defined(GCC) && defined(BEEPS)
12
+ #define BEEPS_EXPORT __declspec(dllexport)
13
+ #else
14
+ #define BEEPS_EXPORT
15
+ #endif
16
+
17
+
11
18
  namespace Beeps
12
19
  {
13
20
 
@@ -12,7 +12,7 @@ namespace Beeps
12
12
  {
13
13
 
14
14
 
15
- Rucy::Module beeps_module ();
15
+ BEEPS_EXPORT Rucy::Module beeps_module ();
16
16
  // module Beeps
17
17
 
18
18
 
@@ -12,10 +12,10 @@ namespace Beeps
12
12
  {
13
13
 
14
14
 
15
- Rucy::Class beeps_error_class ();
15
+ BEEPS_EXPORT Rucy::Class beeps_error_class ();
16
16
  // class Beeps::BeepsError
17
17
 
18
- Rucy::Class openal_error_class ();
18
+ BEEPS_EXPORT Rucy::Class openal_error_class ();
19
19
  // class Beeps::OpenALError
20
20
 
21
21
 
@@ -9,28 +9,28 @@
9
9
  #include <beeps/filter.h>
10
10
 
11
11
 
12
- RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Beeps::TimeStretch)
12
+ RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::TimeStretch)
13
13
 
14
- RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Beeps::PitchShift)
14
+ RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::PitchShift)
15
15
 
16
16
 
17
17
  namespace Beeps
18
18
  {
19
19
 
20
20
 
21
- Rucy::Class gain_class ();
21
+ BEEPS_EXPORT Rucy::Class gain_class ();
22
22
  // class Beeps::Gain
23
23
 
24
- Rucy::Class adsr_class ();
24
+ BEEPS_EXPORT Rucy::Class adsr_class ();
25
25
  // class Beeps::ADSR
26
26
 
27
- Rucy::Class time_stretch_class ();
27
+ BEEPS_EXPORT Rucy::Class time_stretch_class ();
28
28
  // class Beeps::TimeStretch
29
29
 
30
- Rucy::Class pitch_shift_class ();
30
+ BEEPS_EXPORT Rucy::Class pitch_shift_class ();
31
31
  // class Beeps::PitchShift
32
32
 
33
- Rucy::Class analyser_class ();
33
+ BEEPS_EXPORT Rucy::Class analyser_class ();
34
34
  // class Beeps::Analyser
35
35
 
36
36
 
@@ -9,22 +9,22 @@
9
9
  #include <beeps/generator.h>
10
10
 
11
11
 
12
- RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Beeps::Oscillator)
12
+ RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::Oscillator)
13
13
 
14
- RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Beeps::FileIn)
14
+ RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::FileIn)
15
15
 
16
16
 
17
17
  namespace Beeps
18
18
  {
19
19
 
20
20
 
21
- Rucy::Class oscillator_class ();
21
+ BEEPS_EXPORT Rucy::Class oscillator_class ();
22
22
  // class Beeps::Oscillator
23
23
 
24
- Rucy::Class file_in_class ();
24
+ BEEPS_EXPORT Rucy::Class file_in_class ();
25
25
  // class Beeps::FileIn
26
26
 
27
- Rucy::Class mic_in_class ();
27
+ BEEPS_EXPORT Rucy::Class mic_in_class ();
28
28
  // class Beeps::MicIn
29
29
 
30
30
 
@@ -9,14 +9,14 @@
9
9
  #include <beeps/processor.h>
10
10
 
11
11
 
12
- RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Beeps::Processor)
12
+ RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::Processor)
13
13
 
14
14
 
15
15
  namespace Beeps
16
16
  {
17
17
 
18
18
 
19
- Rucy::Class processor_class ();
19
+ BEEPS_EXPORT Rucy::Class processor_class ();
20
20
  // class Beeps::Processor
21
21
 
22
22
 
@@ -9,19 +9,19 @@
9
9
  #include <beeps/sound.h>
10
10
 
11
11
 
12
- RUCY_DECLARE_VALUE_FROM_TO(Beeps::SoundPlayer)
12
+ RUCY_DECLARE_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::SoundPlayer)
13
13
 
14
- RUCY_DECLARE_VALUE_FROM_TO(Beeps::Sound)
14
+ RUCY_DECLARE_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::Sound)
15
15
 
16
16
 
17
17
  namespace Beeps
18
18
  {
19
19
 
20
20
 
21
- Rucy::Class sound_player_class ();
21
+ BEEPS_EXPORT Rucy::Class sound_player_class ();
22
22
  // class Beeps::SoundPlayer
23
23
 
24
- Rucy::Class sound_class ();
24
+ BEEPS_EXPORT Rucy::Class sound_class ();
25
25
  // class Beeps::Sound
26
26
 
27
27
 
data/include/beeps/ruby.h CHANGED
@@ -4,11 +4,13 @@
4
4
  #define __BEEPS_RUBY_H__
5
5
 
6
6
 
7
- #include <beeps/ruby/beeps.h>
8
7
  #include <beeps/ruby/defs.h>
8
+ #include <beeps/ruby/beeps.h>
9
9
  #include <beeps/ruby/exception.h>
10
10
 
11
11
  #include <beeps/ruby/processor.h>
12
+ #include <beeps/ruby/generator.h>
13
+ #include <beeps/ruby/filter.h>
12
14
  #include <beeps/ruby/sound.h>
13
15
 
14
16
 
data/include/beeps.h CHANGED
@@ -11,6 +11,8 @@
11
11
 
12
12
  #include <beeps/signals.h>
13
13
  #include <beeps/processor.h>
14
+ #include <beeps/generator.h>
15
+ #include <beeps/filter.h>
14
16
  #include <beeps/sound.h>
15
17
 
16
18
 
@@ -25,6 +25,10 @@ module Beeps
25
25
  root_dir 'lib'
26
26
  end
27
27
 
28
+ def ext_dir()
29
+ root_dir 'ext'
30
+ end
31
+
28
32
  end# Extension
29
33
 
30
34
 
data/src/beeps.cpp CHANGED
@@ -1,5 +1,5 @@
1
1
  // -*- objc -*-
2
- #include "beeps/beeps.h"
2
+ #include "beeps.h"
3
3
 
4
4
 
5
5
  #include "Stk.h"
@@ -16,6 +16,7 @@ namespace Beeps
16
16
  void
17
17
  init ()
18
18
  {
19
+ Beeps_init();
19
20
  OpenAL_init();
20
21
 
21
22
  stk::Stk::setSampleRate(44100);
@@ -28,6 +29,7 @@ namespace Beeps
28
29
  SoundPlayer_clear_streams();
29
30
 
30
31
  OpenAL_fin();
32
+ Beeps_fin();
31
33
  }
32
34
 
33
35
  void
data/src/beeps.h ADDED
@@ -0,0 +1,22 @@
1
+ // -*- c++ -*-
2
+ #pragma once
3
+ #ifndef __BEEPS_SRC_BEEPS_H__
4
+ #define __BEEPS_SRC_BEEPS_H__
5
+
6
+
7
+ #include "beeps/beeps.h"
8
+
9
+
10
+ namespace Beeps
11
+ {
12
+
13
+
14
+ void Beeps_init ();
15
+
16
+ void Beeps_fin ();
17
+
18
+
19
+ }// Beeps
20
+
21
+
22
+ #endif//EOH
data/src/openal.cpp CHANGED
@@ -70,6 +70,12 @@ namespace Beeps
70
70
  cleanup();
71
71
  }
72
72
 
73
+ void*
74
+ OpenAL_get_context ()
75
+ {
76
+ return global::context;
77
+ }
78
+
73
79
  ALCenum
74
80
  OpenAL_get_error ()
75
81
  {
data/src/openal.h CHANGED
@@ -23,6 +23,8 @@ namespace Beeps
23
23
 
24
24
  void OpenAL_fin ();
25
25
 
26
+ void* OpenAL_get_context ();
27
+
26
28
  ALCenum OpenAL_get_error();
27
29
 
28
30
  bool OpenAL_no_error();