beeps 0.2 → 0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.doc/ext/beeps/adsr.cpp +1 -1
- data/.doc/ext/beeps/analyser.cpp +1 -1
- data/.doc/ext/beeps/file_in.cpp +1 -1
- data/.doc/ext/beeps/gain.cpp +1 -1
- data/.doc/ext/beeps/mic_in.cpp +1 -1
- data/.doc/ext/beeps/oscillator.cpp +1 -1
- data/.doc/ext/beeps/pitch_shift.cpp +1 -1
- data/.doc/ext/beeps/processor.cpp +1 -1
- data/.doc/ext/beeps/sound.cpp +1 -1
- data/.doc/ext/beeps/sound_player.cpp +1 -1
- data/.doc/ext/beeps/time_stretch.cpp +1 -1
- data/.github/workflows/release-gem.yml +2 -2
- data/.github/workflows/tag.yml +1 -1
- data/.github/workflows/test.yml +10 -1
- data/ChangeLog.md +15 -0
- data/Gemfile.lock +1 -1
- data/Rakefile +3 -1
- data/VERSION +1 -1
- data/beeps.gemspec +2 -2
- data/ext/beeps/adsr.cpp +1 -1
- data/ext/beeps/analyser.cpp +1 -1
- data/ext/beeps/defs.h +2 -0
- data/ext/beeps/extconf.rb +11 -3
- data/ext/beeps/file_in.cpp +1 -1
- data/ext/beeps/gain.cpp +1 -1
- data/ext/beeps/mic_in.cpp +1 -1
- data/ext/beeps/oscillator.cpp +1 -1
- data/ext/beeps/pitch_shift.cpp +1 -1
- data/ext/beeps/processor.cpp +1 -1
- data/ext/beeps/sound.cpp +1 -1
- data/ext/beeps/sound_player.cpp +1 -1
- data/ext/beeps/time_stretch.cpp +1 -1
- data/include/beeps/debug.h +0 -1
- data/include/beeps/defs.h +7 -0
- data/include/beeps/ruby/beeps.h +1 -1
- data/include/beeps/ruby/exception.h +2 -2
- data/include/beeps/ruby/filter.h +7 -7
- data/include/beeps/ruby/generator.h +5 -5
- data/include/beeps/ruby/processor.h +2 -2
- data/include/beeps/ruby/sound.h +4 -4
- data/include/beeps/ruby.h +3 -1
- data/include/beeps.h +2 -0
- data/lib/beeps/extension.rb +4 -0
- data/src/beeps.cpp +3 -1
- data/src/beeps.h +22 -0
- data/src/openal.cpp +6 -0
- data/src/openal.h +2 -0
- data/src/osx/beeps.mm +19 -0
- data/src/signals.cpp +17 -15
- data/src/signals.h +6 -6
- data/src/sound.cpp +41 -18
- data/src/win32/beeps.cpp +36 -0
- data/src/win32/exception.cpp +40 -0
- data/src/win32/exception.h +40 -0
- data/src/win32/signals.cpp +186 -0
- data/test/helper.rb +0 -5
- data/test/test_sound_player.rb +4 -0
- metadata +12 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4df684684e65c0ee091bb8054a55e57cee8e8d9b932382defa62229027cedb7
|
4
|
+
data.tar.gz: 6c59120efd1f32823ef0d1982f243106f38ea4543a568739e9739811ee1e3d4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db163aa74ddac2978422aa52b3bef3e157295aa93f46a79e8e32b88c0b0752f337cd6bc1636e53dae751ddaac554c86b4daa72ad57f038ddf3586078253bb669
|
7
|
+
data.tar.gz: 9997be8c7be61a021087d05b3e17aa695a07d3a70e9fed9bd61b3b82d66cda81c2e5279a74ef0100771281480d1ada8b9b52d6a936375f1a361fe6aa3d97d5bf
|
data/.doc/ext/beeps/adsr.cpp
CHANGED
data/.doc/ext/beeps/analyser.cpp
CHANGED
data/.doc/ext/beeps/file_in.cpp
CHANGED
data/.doc/ext/beeps/gain.cpp
CHANGED
data/.doc/ext/beeps/mic_in.cpp
CHANGED
data/.doc/ext/beeps/sound.cpp
CHANGED
@@ -15,7 +15,7 @@ jobs:
|
|
15
15
|
ruby-version: 3.2
|
16
16
|
|
17
17
|
- name: checkout
|
18
|
-
uses: actions/checkout@
|
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
|
data/.github/workflows/tag.yml
CHANGED
data/.github/workflows/test.yml
CHANGED
@@ -16,7 +16,7 @@ jobs:
|
|
16
16
|
ruby-version: 3.2
|
17
17
|
|
18
18
|
- name: checkout
|
19
|
-
uses: actions/checkout@
|
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
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.
|
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.
|
29
|
-
s.add_runtime_dependency 'rucy', '~> 0.
|
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
data/ext/beeps/analyser.cpp
CHANGED
data/ext/beeps/defs.h
CHANGED
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
|
15
|
-
|
16
|
-
|
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'
|
data/ext/beeps/file_in.cpp
CHANGED
data/ext/beeps/gain.cpp
CHANGED
data/ext/beeps/mic_in.cpp
CHANGED
data/ext/beeps/oscillator.cpp
CHANGED
data/ext/beeps/pitch_shift.cpp
CHANGED
data/ext/beeps/processor.cpp
CHANGED
data/ext/beeps/sound.cpp
CHANGED
data/ext/beeps/sound_player.cpp
CHANGED
data/ext/beeps/time_stretch.cpp
CHANGED
data/include/beeps/debug.h
CHANGED
data/include/beeps/defs.h
CHANGED
data/include/beeps/ruby/beeps.h
CHANGED
@@ -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
|
|
data/include/beeps/ruby/filter.h
CHANGED
@@ -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
|
|
data/include/beeps/ruby/sound.h
CHANGED
@@ -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
data/lib/beeps/extension.rb
CHANGED
data/src/beeps.cpp
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
// -*- objc -*-
|
2
|
-
#include "beeps
|
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