beeps 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.doc/ext/beeps/beeps.cpp +46 -0
- data/.doc/ext/beeps/file_in.cpp +59 -0
- data/.doc/ext/beeps/native.cpp +41 -0
- data/.doc/ext/beeps/processor.cpp +49 -0
- data/.doc/ext/beeps/sawtooth_wave.cpp +66 -0
- data/.doc/ext/beeps/sine_wave.cpp +66 -0
- data/.doc/ext/beeps/sound.cpp +69 -0
- data/.doc/ext/beeps/square_wave.cpp +66 -0
- data/README.md +4 -0
- data/Rakefile +27 -0
- data/VERSION +1 -0
- data/beeps.gemspec +43 -0
- data/ext/beeps/beeps.cpp +48 -0
- data/ext/beeps/defs.h +13 -0
- data/ext/beeps/extconf.rb +25 -0
- data/ext/beeps/file_in.cpp +61 -0
- data/ext/beeps/native.cpp +41 -0
- data/ext/beeps/processor.cpp +50 -0
- data/ext/beeps/sawtooth_wave.cpp +69 -0
- data/ext/beeps/sine_wave.cpp +69 -0
- data/ext/beeps/sound.cpp +72 -0
- data/ext/beeps/square_wave.cpp +69 -0
- data/include/beeps.h +12 -0
- data/include/beeps/beeps.h +25 -0
- data/include/beeps/defs.h +23 -0
- data/include/beeps/exception.h +47 -0
- data/include/beeps/openal.h +34 -0
- data/include/beeps/processor.h +132 -0
- data/include/beeps/ruby.h +10 -0
- data/include/beeps/ruby/beeps.h +21 -0
- data/include/beeps/ruby/processor.h +86 -0
- data/include/beeps/ruby/sound.h +42 -0
- data/include/beeps/signals.h +53 -0
- data/include/beeps/sound.h +44 -0
- data/lib/beeps.rb +9 -0
- data/lib/beeps/autoinit.rb +10 -0
- data/lib/beeps/beeps.rb +49 -0
- data/lib/beeps/ext.rb +4 -0
- data/lib/beeps/module.rb +49 -0
- data/lib/beeps/processor.rb +60 -0
- data/lib/beeps/sound.rb +19 -0
- data/src/beeps.cpp +93 -0
- data/src/exception.cpp +43 -0
- data/src/openal.cpp +216 -0
- data/src/openal.h +25 -0
- data/src/processor.cpp +201 -0
- data/src/signals.cpp +90 -0
- data/src/sound.cpp +125 -0
- data/src/stk/include/Blit.h +151 -0
- data/src/stk/include/BlitSaw.h +148 -0
- data/src/stk/include/BlitSquare.h +170 -0
- data/src/stk/include/FileRead.h +141 -0
- data/src/stk/include/FileWvIn.h +195 -0
- data/src/stk/include/Generator.h +50 -0
- data/src/stk/include/SineWave.h +159 -0
- data/src/stk/include/Stk.h +589 -0
- data/src/stk/include/WvIn.h +46 -0
- data/src/stk/src/Blit.cpp +78 -0
- data/src/stk/src/BlitSaw.cpp +91 -0
- data/src/stk/src/BlitSquare.cpp +95 -0
- data/src/stk/src/FileRead.cpp +903 -0
- data/src/stk/src/FileWvIn.cpp +260 -0
- data/src/stk/src/SineWave.cpp +78 -0
- data/src/stk/src/Stk.cpp +395 -0
- data/test/helper.rb +17 -0
- data/test/test_beeps.rb +18 -0
- data/test/test_sound.rb +26 -0
- metadata +177 -0
data/test/helper.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
|
3
|
+
|
4
|
+
%w[../xot ../rucy .]
|
5
|
+
.map {|s| File.expand_path "../../#{s}/lib", __FILE__}
|
6
|
+
.each {|s| $:.unshift s if !$:.include?(s) && File.directory?(s)}
|
7
|
+
|
8
|
+
require 'test/unit'
|
9
|
+
require 'xot/test'
|
10
|
+
require 'beeps'
|
11
|
+
|
12
|
+
include Xot::Test
|
13
|
+
|
14
|
+
|
15
|
+
unless $BEEPS_NOAUTOINIT
|
16
|
+
def Beeps.fin! () end
|
17
|
+
end
|
data/test/test_beeps.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
|
3
|
+
|
4
|
+
$BEEPS_NOAUTOINIT = true
|
5
|
+
|
6
|
+
require_relative 'helper'
|
7
|
+
|
8
|
+
|
9
|
+
class TestBeeps < Test::Unit::TestCase
|
10
|
+
|
11
|
+
def test_init! ()
|
12
|
+
assert_raise(Rucy::NativeError) {Beeps.fin!}
|
13
|
+
assert Beeps.init!
|
14
|
+
assert_raise(Rucy::NativeError) {Beeps.init!}
|
15
|
+
assert Beeps.fin!
|
16
|
+
end
|
17
|
+
|
18
|
+
end# TestBeeps
|
data/test/test_sound.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
|
3
|
+
|
4
|
+
require_relative 'helper'
|
5
|
+
|
6
|
+
|
7
|
+
class TestSound < Test::Unit::TestCase
|
8
|
+
|
9
|
+
def s ()
|
10
|
+
Beeps::Sound.new Beeps::SineWave.new, 0.1
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_play ()
|
14
|
+
assert_nothing_raised {s.play}
|
15
|
+
end
|
16
|
+
|
17
|
+
def test_beep ()
|
18
|
+
assert_nothing_raised {Beeps.be}
|
19
|
+
assert_nothing_raised {Beeps.bee}
|
20
|
+
assert_nothing_raised {Beeps.beep}
|
21
|
+
assert_nothing_raised {Beeps.beeep}
|
22
|
+
assert_nothing_raised {Beeps.beeeep}
|
23
|
+
assert_nothing_raised {Beeps.beeeeep}
|
24
|
+
end
|
25
|
+
|
26
|
+
end# TestBeeps
|
metadata
ADDED
@@ -0,0 +1,177 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: beeps
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.10
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- snori
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-04-28 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rake
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: xot
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rucy
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: gemcutter
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: Synthesize and play beep sounds.
|
70
|
+
email: snori@xord.org
|
71
|
+
executables: []
|
72
|
+
extensions:
|
73
|
+
- Rakefile
|
74
|
+
extra_rdoc_files:
|
75
|
+
- ".doc/ext/beeps/beeps.cpp"
|
76
|
+
- ".doc/ext/beeps/file_in.cpp"
|
77
|
+
- ".doc/ext/beeps/native.cpp"
|
78
|
+
- ".doc/ext/beeps/processor.cpp"
|
79
|
+
- ".doc/ext/beeps/sawtooth_wave.cpp"
|
80
|
+
- ".doc/ext/beeps/sine_wave.cpp"
|
81
|
+
- ".doc/ext/beeps/sound.cpp"
|
82
|
+
- ".doc/ext/beeps/square_wave.cpp"
|
83
|
+
files:
|
84
|
+
- README.md
|
85
|
+
- Rakefile
|
86
|
+
- VERSION
|
87
|
+
- beeps.gemspec
|
88
|
+
- ext/beeps/beeps.cpp
|
89
|
+
- ext/beeps/defs.h
|
90
|
+
- ext/beeps/extconf.rb
|
91
|
+
- ext/beeps/file_in.cpp
|
92
|
+
- ext/beeps/native.cpp
|
93
|
+
- ext/beeps/processor.cpp
|
94
|
+
- ext/beeps/sawtooth_wave.cpp
|
95
|
+
- ext/beeps/sine_wave.cpp
|
96
|
+
- ext/beeps/sound.cpp
|
97
|
+
- ext/beeps/square_wave.cpp
|
98
|
+
- include/beeps.h
|
99
|
+
- include/beeps/beeps.h
|
100
|
+
- include/beeps/defs.h
|
101
|
+
- include/beeps/exception.h
|
102
|
+
- include/beeps/openal.h
|
103
|
+
- include/beeps/processor.h
|
104
|
+
- include/beeps/ruby.h
|
105
|
+
- include/beeps/ruby/beeps.h
|
106
|
+
- include/beeps/ruby/processor.h
|
107
|
+
- include/beeps/ruby/sound.h
|
108
|
+
- include/beeps/signals.h
|
109
|
+
- include/beeps/sound.h
|
110
|
+
- lib/beeps.rb
|
111
|
+
- lib/beeps/autoinit.rb
|
112
|
+
- lib/beeps/beeps.rb
|
113
|
+
- lib/beeps/ext.rb
|
114
|
+
- lib/beeps/module.rb
|
115
|
+
- lib/beeps/processor.rb
|
116
|
+
- lib/beeps/sound.rb
|
117
|
+
- src/beeps.cpp
|
118
|
+
- src/exception.cpp
|
119
|
+
- src/openal.cpp
|
120
|
+
- src/openal.h
|
121
|
+
- src/processor.cpp
|
122
|
+
- src/signals.cpp
|
123
|
+
- src/sound.cpp
|
124
|
+
- src/stk/include/Blit.h
|
125
|
+
- src/stk/include/BlitSaw.h
|
126
|
+
- src/stk/include/BlitSquare.h
|
127
|
+
- src/stk/include/FileRead.h
|
128
|
+
- src/stk/include/FileWvIn.h
|
129
|
+
- src/stk/include/Generator.h
|
130
|
+
- src/stk/include/SineWave.h
|
131
|
+
- src/stk/include/Stk.h
|
132
|
+
- src/stk/include/WvIn.h
|
133
|
+
- src/stk/src/Blit.cpp
|
134
|
+
- src/stk/src/BlitSaw.cpp
|
135
|
+
- src/stk/src/BlitSquare.cpp
|
136
|
+
- src/stk/src/FileRead.cpp
|
137
|
+
- src/stk/src/FileWvIn.cpp
|
138
|
+
- src/stk/src/SineWave.cpp
|
139
|
+
- src/stk/src/Stk.cpp
|
140
|
+
- test/helper.rb
|
141
|
+
- test/test_beeps.rb
|
142
|
+
- test/test_sound.rb
|
143
|
+
- ".doc/ext/beeps/beeps.cpp"
|
144
|
+
- ".doc/ext/beeps/file_in.cpp"
|
145
|
+
- ".doc/ext/beeps/native.cpp"
|
146
|
+
- ".doc/ext/beeps/processor.cpp"
|
147
|
+
- ".doc/ext/beeps/sawtooth_wave.cpp"
|
148
|
+
- ".doc/ext/beeps/sine_wave.cpp"
|
149
|
+
- ".doc/ext/beeps/sound.cpp"
|
150
|
+
- ".doc/ext/beeps/square_wave.cpp"
|
151
|
+
homepage: https://github.com/xord/beeps
|
152
|
+
licenses: []
|
153
|
+
metadata: {}
|
154
|
+
post_install_message:
|
155
|
+
rdoc_options: []
|
156
|
+
require_paths:
|
157
|
+
- lib
|
158
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
159
|
+
requirements:
|
160
|
+
- - ">="
|
161
|
+
- !ruby/object:Gem::Version
|
162
|
+
version: 1.9.0
|
163
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
164
|
+
requirements:
|
165
|
+
- - ">="
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
version: '0'
|
168
|
+
requirements: []
|
169
|
+
rubyforge_project:
|
170
|
+
rubygems_version: 2.0.3
|
171
|
+
signing_key:
|
172
|
+
specification_version: 4
|
173
|
+
summary: Plays beep sound.
|
174
|
+
test_files:
|
175
|
+
- test/helper.rb
|
176
|
+
- test/test_beeps.rb
|
177
|
+
- test/test_sound.rb
|