win32-sound 0.4.1 → 0.4.2
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.
- data/CHANGES +12 -1
- data/README +13 -15
- data/Rakefile +6 -2
- data/examples/{sound_test.rb → example_win32_sound.rb} +10 -12
- data/lib/win32/sound.rb +109 -101
- data/test/{tc_sound.rb → test_win32_sound.rb} +18 -15
- data/win32-sound.gemspec +22 -21
- metadata +57 -42
data/CHANGES
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
== 0.4.2 - 6-Aug-2009
|
2
|
+
* Changed the license to Artistic 2.0.
|
3
|
+
* Updated to use the Windows::Sound module from the windows-pr library.
|
4
|
+
* Fixed the Sound::ALIAS value. It was wrongly set to SND_ALIAS_ID.
|
5
|
+
* Several gemspec updates, including the license and description.
|
6
|
+
* The Sound.get_wave_volume method is now a true alias.
|
7
|
+
* Renamed the test file to test_win32_sound.rb.
|
8
|
+
* Renamed the example file to example_win32_sound.rb to avoid any possible
|
9
|
+
confusion with actual test files.
|
10
|
+
* Added the 'example' rake task.
|
11
|
+
|
1
12
|
== 0.4.1 - 27-Jul-2007
|
2
13
|
* Changed SoundError to Sound::Error.
|
3
14
|
* Added a Rakefile with tasks for installation and testing.
|
@@ -36,4 +47,4 @@
|
|
36
47
|
* Added the README file (oops).
|
37
48
|
|
38
49
|
== 0.1.0 - 14-Feb-2004
|
39
|
-
* Initial release
|
50
|
+
* Initial release
|
data/README
CHANGED
@@ -1,11 +1,14 @@
|
|
1
1
|
== Description
|
2
|
-
A
|
2
|
+
A library for playing and controlling sounds on MS Windows.
|
3
3
|
|
4
4
|
== Prerequisites
|
5
|
-
|
6
|
-
recommended.
|
5
|
+
* windows-pr 1.0.6 or later
|
7
6
|
|
8
7
|
== Installation instructions
|
8
|
+
=== Gem installation
|
9
|
+
gem install win32-sound
|
10
|
+
|
11
|
+
=== Local installation
|
9
12
|
rake test (optional)
|
10
13
|
rake install (non-gem) or rake install_gem (gem)
|
11
14
|
|
@@ -13,14 +16,14 @@
|
|
13
16
|
require 'win32/sound'
|
14
17
|
include Win32
|
15
18
|
|
16
|
-
#
|
17
|
-
|
19
|
+
# Play a wav file
|
20
|
+
Sound.play("somefile.wav")
|
18
21
|
|
19
22
|
# Play a system sound
|
20
23
|
Sound.play("SystemAsterisk",Sound::ALIAS)
|
21
24
|
|
22
|
-
#
|
23
|
-
Sound.
|
25
|
+
# Get the current volume of the waveform-audio output device.
|
26
|
+
p Sound.volume.join(", ") # left channel, right channel
|
24
27
|
|
25
28
|
== Acknowledgements
|
26
29
|
API ideas derived (or not) from Perl's Win32::Sound module and Python's
|
@@ -41,14 +44,14 @@
|
|
41
44
|
== Developer's Notes
|
42
45
|
The MessageBeep() function, which the Python "winsound" module contains,
|
43
46
|
is intentionally omitted here. I felt it was redundant, because you can
|
44
|
-
achieve the same effect with something like
|
47
|
+
achieve the same effect with something like this:
|
45
48
|
Sound.play("SystemAsterisk", Sound::ALIAS).
|
46
49
|
|
47
50
|
== License
|
48
|
-
|
51
|
+
Artistic 2.0
|
49
52
|
|
50
53
|
== Copyright
|
51
|
-
(C) 2004-
|
54
|
+
(C) 2004-2009, Daniel J. Berger, All Rights Reserved
|
52
55
|
|
53
56
|
== Warranty
|
54
57
|
This package is provided "as is" and without any express or
|
@@ -57,9 +60,4 @@
|
|
57
60
|
|
58
61
|
== Author(s)
|
59
62
|
Daniel Berger
|
60
|
-
djberg96 at nospam at gmail dot com
|
61
|
-
imperator on IRC (irc.freenode.net)
|
62
|
-
|
63
63
|
Park Heesob
|
64
|
-
phasis at nospam at nownuri dot net
|
65
|
-
phasis68 on IRC (irc.freenode.net)
|
data/Rakefile
CHANGED
@@ -15,8 +15,12 @@ task :install_gem do
|
|
15
15
|
sh "gem install #{file}"
|
16
16
|
end
|
17
17
|
|
18
|
+
desc 'Run the example program'
|
19
|
+
task :example do
|
20
|
+
ruby '-Ilib examples\example_win32_sound.rb'
|
21
|
+
end
|
22
|
+
|
18
23
|
Rake::TestTask.new do |t|
|
19
|
-
t.libs << 'lib'
|
20
24
|
t.warning = true
|
21
|
-
t.
|
25
|
+
t.verbose = true
|
22
26
|
end
|
@@ -1,14 +1,12 @@
|
|
1
|
-
|
2
|
-
#
|
1
|
+
#######################################################################
|
2
|
+
# example_win32_sound.rb (win32-sound)
|
3
3
|
#
|
4
|
-
# A
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
require "win32/sound"
|
4
|
+
# A example script to demonstrate the win32-sound library and for
|
5
|
+
# general futzing. You can run this via the 'rake example' task.
|
6
|
+
#
|
7
|
+
# Modify as you see fit.
|
8
|
+
#######################################################################
|
9
|
+
require 'win32/sound'
|
12
10
|
include Win32
|
13
11
|
|
14
12
|
wav = "c:\\windows\\media\\chimes.wav"
|
@@ -43,8 +41,8 @@ Sound.stop
|
|
43
41
|
|
44
42
|
puts "Playing default sound"
|
45
43
|
sleep 1
|
46
|
-
Sound.play("Foofoo",Sound::ALIAS)
|
44
|
+
Sound.play("Foofoo", Sound::ALIAS)
|
47
45
|
|
48
46
|
puts "Playing a beep"
|
49
47
|
sleep 1
|
50
|
-
Sound.beep(500,10000)
|
48
|
+
Sound.beep(500, 10000)
|
data/lib/win32/sound.rb
CHANGED
@@ -1,55 +1,58 @@
|
|
1
|
-
require '
|
1
|
+
require 'windows/sound'
|
2
|
+
require 'windows/error'
|
3
|
+
|
4
|
+
# The Win32 module serves as a namespace only.
|
2
5
|
module Win32
|
6
|
+
|
7
|
+
# The Sound class encapsulates various methods for playing sound as well
|
8
|
+
# as querying or configuring sound related properties.
|
3
9
|
class Sound
|
10
|
+
|
11
|
+
# The Win32::Sound::Error class is typically raised if any of the
|
12
|
+
# Win32::Sound methods fail.
|
4
13
|
class Error < StandardError; end
|
5
14
|
|
6
|
-
|
15
|
+
include Windows::Sound
|
16
|
+
include Windows::Error
|
17
|
+
extend Windows::Sound
|
18
|
+
extend Windows::Error
|
19
|
+
|
20
|
+
# The version of the win32-sound library
|
21
|
+
VERSION = '0.4.2'
|
22
|
+
|
7
23
|
LOW_FREQUENCY = 37
|
8
24
|
HIGH_FREQUENCY = 32767
|
9
25
|
MAX_VOLUME = 0xFFFF
|
10
26
|
|
11
|
-
SYNC =
|
12
|
-
ASYNC =
|
13
|
-
NODEFAULT =
|
14
|
-
MEMORY =
|
15
|
-
LOOP =
|
16
|
-
NOSTOP =
|
17
|
-
NOWAIT =
|
18
|
-
ALIAS =
|
19
|
-
ALIAS_ID =
|
20
|
-
FILENAME =
|
21
|
-
RESOURCE =
|
22
|
-
PURGE =
|
23
|
-
APPLICATION =
|
24
|
-
|
25
|
-
@@Beep = Win32API.new('kernel32', 'Beep', 'LL', 'I')
|
26
|
-
@@PlaySound = Win32API.new('winmm', 'PlaySound', 'PPL', 'I')
|
27
|
-
@@waveOutSetVolume = Win32API.new('winmm', 'waveOutSetVolume', 'PL', 'I')
|
28
|
-
@@waveOutGetVolume = Win32API.new('winmm', 'waveOutGetVolume', 'IP', 'I')
|
29
|
-
@@waveOutGetNumDevs = Win32API.new('winmm', 'waveOutGetNumDevs', 'V', 'I')
|
30
|
-
@@waveInGetNumDevs = Win32API.new('winmm', 'waveInGetNumDevs', 'V', 'I')
|
31
|
-
@@midiOutGetNumDevs = Win32API.new('winmm', 'midiOutGetNumDevs', 'V', 'I')
|
32
|
-
@@midiInGetNumDevs = Win32API.new('winmm', 'midiInGetNumDevs', 'V', 'I')
|
33
|
-
@@auxGetNumDevs = Win32API.new('winmm', 'auxGetNumDevs', 'V', 'I')
|
34
|
-
@@mixerGetNumDevs = Win32API.new('winmm', 'mixerGetNumDevs', 'V', 'I')
|
35
|
-
|
36
|
-
@@GetLastError = Win32API.new('kernel32', 'GetLastError', '', 'L')
|
37
|
-
@@FormatMessage = Win32API.new('kernel32', 'FormatMessage', 'LPLLPLP', 'L')
|
27
|
+
SYNC = SND_SYNC # play synchronously (default)
|
28
|
+
ASYNC = SND_ASYNC # play asynchronously
|
29
|
+
NODEFAULT = SND_NODEFAULT # silence (!default) if sound not found
|
30
|
+
MEMORY = SND_MEMORY # pszSound points to a memory file
|
31
|
+
LOOP = SND_LOOP # loop the sound until next sndPlaySound
|
32
|
+
NOSTOP = SND_NOSTOP # don't stop any currently playing sound
|
33
|
+
NOWAIT = SND_NOWAIT # don't wait if the driver is busy
|
34
|
+
ALIAS = SND_ALIAS # name is a registry alias
|
35
|
+
ALIAS_ID = SND_ALIAS_ID # alias is a predefined ID
|
36
|
+
FILENAME = SND_FILENAME # name is file name
|
37
|
+
RESOURCE = SND_RESOURCE # name is resource name or atom
|
38
|
+
PURGE = SND_PURGE # purge non-static events for task
|
39
|
+
APPLICATION = SND_APPLICATION # look for app specific association
|
38
40
|
|
39
41
|
# Returns an array of all the available sound devices; their names contain
|
40
|
-
# the type of the device and a zero-based ID number.
|
42
|
+
# the type of the device and a zero-based ID number. Possible return values
|
41
43
|
# are WAVEOUT, WAVEIN, MIDIOUT, MIDIIN, AUX or MIXER.
|
44
|
+
#
|
42
45
|
def self.devices
|
43
46
|
devs = []
|
44
47
|
|
45
48
|
begin
|
46
|
-
0.upto(
|
47
|
-
0.upto(
|
48
|
-
0.upto(
|
49
|
-
0.upto(
|
50
|
-
0.upto(
|
51
|
-
0.upto(
|
52
|
-
rescue Exception
|
49
|
+
0.upto(waveOutGetNumDevs()){ |i| devs << "WAVEOUT#{i}" }
|
50
|
+
0.upto(waveInGetNumDevs()){ |i| devs << "WAVEIN#{i}" }
|
51
|
+
0.upto(midiOutGetNumDevs()){ |i| devs << "MIDIOUT#{i}" }
|
52
|
+
0.upto(midiInGetNumDevs()){ |i| devs << "MIDIIN#{i}" }
|
53
|
+
0.upto(auxGetNumDevs()){ |i| devs << "AUX#{i}" }
|
54
|
+
0.upto(mixerGetNumDevs()){ |i| devs << "MIXER#{i}" }
|
55
|
+
rescue Exception
|
53
56
|
raise Error, get_last_error
|
54
57
|
end
|
55
58
|
|
@@ -58,22 +61,25 @@ module Win32
|
|
58
61
|
|
59
62
|
# Generates simple tones on the speaker. The function is synchronous; it
|
60
63
|
# does not return control to its caller until the sound finishes.
|
61
|
-
|
62
|
-
|
64
|
+
#
|
65
|
+
# The frequency (in Hertz) must be between 37 and 32767.
|
63
66
|
# The duration is in milliseconds.
|
67
|
+
#
|
64
68
|
def self.beep(frequency, duration)
|
65
69
|
if frequency > HIGH_FREQUENCY || frequency < LOW_FREQUENCY
|
66
70
|
raise Error, 'invalid frequency'
|
67
71
|
end
|
68
72
|
|
69
|
-
if 0 ==
|
73
|
+
if 0 == Beep(frequency, duration)
|
70
74
|
raise Error, get_last_error
|
71
75
|
end
|
76
|
+
|
72
77
|
self
|
73
78
|
end
|
74
79
|
|
75
|
-
# Stops any currently playing waveform sound.
|
76
|
-
# true, then *all* sounds are stopped.
|
80
|
+
# Stops any currently playing waveform sound. If +purge+ is set to
|
81
|
+
# true, then *all* sounds are stopped. The default is false.
|
82
|
+
#
|
77
83
|
def self.stop(purge = false)
|
78
84
|
if purge && purge != 0
|
79
85
|
flags = PURGE
|
@@ -81,70 +87,87 @@ module Win32
|
|
81
87
|
flags = 0
|
82
88
|
end
|
83
89
|
|
84
|
-
|
90
|
+
unless PlaySound(0, 0, flags)
|
85
91
|
raise Error, get_last_error
|
86
92
|
end
|
93
|
+
|
87
94
|
self
|
88
95
|
end
|
89
96
|
|
90
|
-
# Plays the specified sound.
|
97
|
+
# Plays the specified sound. The sound can be a wave file or a system
|
91
98
|
# sound, when used in conjunction with the ALIAS flag.
|
92
99
|
#
|
93
100
|
# Valid flags:
|
94
101
|
#
|
95
102
|
# Sound::ALIAS
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
103
|
+
# The sound parameter is a system-event alias in the registry or the
|
104
|
+
# WIN.INI file. If the registry contains no such name, it plays the
|
105
|
+
# system default sound unless the NODEFAULT value is also specified.
|
106
|
+
# Do not use with FILENAME.
|
107
|
+
#
|
101
108
|
# Sound::APPLICATION
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
109
|
+
# The sound is played using an application-specific association.
|
110
|
+
#
|
111
|
+
# Sound::ASYNC
|
112
|
+
# The sound is played asynchronously and the function returns
|
113
|
+
# immediately after beginning the sound.
|
114
|
+
#
|
115
|
+
# Sound::FILENAME
|
116
|
+
# The sound parameter is the name of a WAV file. Do not use with
|
117
|
+
# ALIAS.
|
118
|
+
#
|
119
|
+
# Sound::LOOP
|
120
|
+
# The sound plays repeatedly until Sound.stop() is called. You must
|
121
|
+
# also specify the ASYNC flag to loop sounds.
|
122
|
+
#
|
123
|
+
# Sound::MEMORY
|
124
|
+
# The sound points to an image of a waveform sound in memory.
|
118
125
|
#
|
119
126
|
# Sound::NODEFAULT
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
+
# If the sound cannot be found, the function returns silently without
|
128
|
+
# playing the default sound.
|
129
|
+
#
|
130
|
+
# Sound::NOSTOP
|
131
|
+
# If a sound is currently playing, the function immediately returns
|
132
|
+
# false without playing the requested sound.
|
133
|
+
#
|
127
134
|
# Sound::NOWAIT
|
128
|
-
|
129
|
-
|
135
|
+
# If the driver is busy, return immediately without playing the sound.
|
136
|
+
#
|
130
137
|
# Sound::PURGE
|
131
|
-
|
138
|
+
# Stop playing all instances of the specified sound.
|
132
139
|
#
|
133
140
|
# Sound::SYNC
|
134
|
-
|
135
|
-
|
141
|
+
# The sound is played synchronously and the function does not return
|
142
|
+
# until the sound ends.
|
143
|
+
#
|
144
|
+
# Examples:
|
145
|
+
#
|
146
|
+
# require 'win32/sound'
|
147
|
+
# include Win32
|
148
|
+
#
|
149
|
+
# # Play a wave file once
|
150
|
+
# Sound.play('some_file.wav')
|
151
|
+
#
|
152
|
+
# # Play a wave file in an asynchronous loop for 2 seconds
|
153
|
+
# Sound.play('some_file.wav', Sound::ASYNC | Sound::LOOP)
|
154
|
+
# sleep 2
|
155
|
+
# Sound.stop
|
156
|
+
#
|
136
157
|
def self.play(sound, flags = 0)
|
137
|
-
|
158
|
+
unless PlaySound(sound, 0, flags)
|
138
159
|
raise Error, get_last_error
|
139
160
|
end
|
161
|
+
|
140
162
|
self
|
141
163
|
end
|
142
164
|
|
143
|
-
# Sets the volume for the left and right channel.
|
165
|
+
# Sets the volume for the left and right channel. If the +right_channel+
|
144
166
|
# is omitted, the volume is set for *both* channels.
|
145
|
-
|
167
|
+
#
|
146
168
|
# You may optionally pass a single Integer rather than an Array, in which
|
147
169
|
# case it is assumed you are setting both channels to the same value.
|
170
|
+
#
|
148
171
|
def self.set_wave_volume(left_channel, right_channel = nil)
|
149
172
|
right_channel ||= left_channel
|
150
173
|
|
@@ -153,9 +176,10 @@ module Win32
|
|
153
176
|
|
154
177
|
volume = lvolume | rvolume << 16
|
155
178
|
|
156
|
-
if
|
179
|
+
if waveOutSetVolume(-1, volume) != 0
|
157
180
|
raise Error, get_last_error
|
158
181
|
end
|
182
|
+
|
159
183
|
self
|
160
184
|
end
|
161
185
|
|
@@ -163,16 +187,15 @@ module Win32
|
|
163
187
|
# and right channel, respectively.
|
164
188
|
def self.wave_volume
|
165
189
|
volume = [0].pack('L')
|
166
|
-
if
|
190
|
+
if waveOutGetVolume(-1, volume) != 0
|
167
191
|
raise Error, get_last_error
|
168
192
|
end
|
169
193
|
volume = volume.unpack('L').first
|
170
194
|
[low_word(volume), high_word(volume)]
|
171
195
|
end
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
self.wave_volume
|
196
|
+
|
197
|
+
class << self
|
198
|
+
alias get_wave_volume wave_volume
|
176
199
|
end
|
177
200
|
|
178
201
|
private
|
@@ -184,20 +207,5 @@ module Win32
|
|
184
207
|
def self.high_word(num)
|
185
208
|
num >> 16
|
186
209
|
end
|
187
|
-
|
188
|
-
# Convenience method that wraps FormatMessage with some sane defaults.
|
189
|
-
def self.get_last_error(err_num = @@GetLastError.call)
|
190
|
-
buf = 0.chr * 260
|
191
|
-
@@FormatMessage.call(
|
192
|
-
12288,
|
193
|
-
0,
|
194
|
-
err_num,
|
195
|
-
0,
|
196
|
-
buf,
|
197
|
-
buf.length,
|
198
|
-
0
|
199
|
-
)
|
200
|
-
buf.split(0.chr).first.chomp
|
201
|
-
end
|
202
210
|
end
|
203
211
|
end
|
@@ -1,39 +1,37 @@
|
|
1
1
|
##########################################################################
|
2
|
-
#
|
2
|
+
# test_win32_sound.rb
|
3
3
|
#
|
4
|
-
# Test suite for the win32-sound
|
4
|
+
# Test suite for the win32-sound library. You should run this test case
|
5
5
|
# via the 'rake test' task.
|
6
6
|
##########################################################################
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
require "test/unit"
|
11
|
-
require "win32/sound"
|
7
|
+
require 'test/unit'
|
8
|
+
require 'win32/sound'
|
12
9
|
include Win32
|
13
10
|
|
14
|
-
class
|
11
|
+
class TC_Win32_Sound < Test::Unit::TestCase
|
15
12
|
def setup
|
16
13
|
@wav = "c:\\windows\\media\\chimes.wav"
|
17
14
|
end
|
18
15
|
|
19
16
|
def test_version
|
20
|
-
assert_equal(
|
17
|
+
assert_equal('0.4.2', Sound::VERSION)
|
21
18
|
end
|
22
19
|
|
23
20
|
def test_beep
|
24
21
|
assert_respond_to(Sound, :beep)
|
25
|
-
assert_nothing_raised{ Sound.beep(55,100) }
|
22
|
+
assert_nothing_raised{ Sound.beep(55, 100) }
|
23
|
+
end
|
26
24
|
|
27
|
-
|
25
|
+
def test_beep_expected_errors
|
26
|
+
assert_raises(Sound::Error){ Sound.beep(0, 100) }
|
28
27
|
assert_raises(ArgumentError){ Sound.beep }
|
29
28
|
assert_raises(ArgumentError){ Sound.beep(500) }
|
30
|
-
assert_raises(ArgumentError){ Sound.beep(500,500,5) }
|
29
|
+
assert_raises(ArgumentError){ Sound.beep(500, 500, 5) }
|
31
30
|
end
|
32
31
|
|
33
32
|
def test_devices
|
34
33
|
assert_respond_to(Sound, :devices)
|
35
34
|
assert_nothing_raised{ Sound.devices }
|
36
|
-
|
37
35
|
assert_kind_of(Array,Sound.devices)
|
38
36
|
end
|
39
37
|
|
@@ -43,11 +41,13 @@ class TC_Sound < Test::Unit::TestCase
|
|
43
41
|
assert_nothing_raised{ Sound.stop(true) }
|
44
42
|
end
|
45
43
|
|
46
|
-
def
|
44
|
+
def test_get_volume_basic
|
47
45
|
assert_respond_to(Sound, :wave_volume)
|
48
46
|
assert_respond_to(Sound, :get_wave_volume)
|
49
47
|
assert_nothing_raised{ Sound.get_wave_volume }
|
48
|
+
end
|
50
49
|
|
50
|
+
def test_get_volume
|
51
51
|
assert_kind_of(Array, Sound.get_wave_volume)
|
52
52
|
assert_equal(2, Sound.get_wave_volume.length)
|
53
53
|
end
|
@@ -61,7 +61,10 @@ class TC_Sound < Test::Unit::TestCase
|
|
61
61
|
def test_play
|
62
62
|
assert_respond_to(Sound, :play)
|
63
63
|
assert_nothing_raised{ Sound.play(@wav) }
|
64
|
-
|
64
|
+
end
|
65
|
+
|
66
|
+
def test_play_alias
|
67
|
+
assert_nothing_raised{ Sound.play('SystemAsterisk', Sound::ALIAS) }
|
65
68
|
end
|
66
69
|
|
67
70
|
def test_expected_errors
|
data/win32-sound.gemspec
CHANGED
@@ -1,27 +1,28 @@
|
|
1
|
-
require
|
1
|
+
require 'rubygems'
|
2
2
|
|
3
3
|
spec = Gem::Specification.new do |gem|
|
4
|
-
gem.name
|
5
|
-
gem.version
|
6
|
-
gem.author
|
7
|
-
|
8
|
-
gem.
|
9
|
-
gem.
|
10
|
-
gem.
|
11
|
-
gem.
|
12
|
-
gem.test_file
|
13
|
-
gem.has_rdoc
|
14
|
-
|
4
|
+
gem.name = 'win32-sound'
|
5
|
+
gem.version = '0.4.2'
|
6
|
+
gem.author = 'Daniel J. Berger'
|
7
|
+
gem.license = 'Artistic 2.0'
|
8
|
+
gem.email = 'djberg96@gmail.com'
|
9
|
+
gem.homepage = 'http://www.rubyforge.org/projects/win32utils'
|
10
|
+
gem.platform = Gem::Platform::RUBY
|
11
|
+
gem.summary = 'A library for playing with sound on MS Windows.'
|
12
|
+
gem.test_file = 'test/test_win32_sound.rb'
|
13
|
+
gem.has_rdoc = true
|
14
|
+
gem.files = Dir['**/*'].reject{ |f| f.include?('CVS') }
|
15
|
+
|
15
16
|
gem.extra_rdoc_files = ['CHANGES', 'README', 'MANIFEST']
|
16
|
-
gem.rubyforge_project =
|
17
|
+
gem.rubyforge_project = 'win32utils'
|
18
|
+
|
19
|
+
gem.add_dependency('windows-pr', '>= 1.0.6')
|
17
20
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
21
|
+
gem.description = <<-EOF
|
22
|
+
The win32-sound library provides an interface for playing various
|
23
|
+
sounds on MS Windows operating systems, including system sounds and
|
24
|
+
wave files, as well as querying and configuring sound related properties.
|
25
|
+
EOF
|
22
26
|
end
|
23
27
|
|
24
|
-
|
25
|
-
Gem.manage_gems
|
26
|
-
Gem::Builder.new(spec).build
|
27
|
-
end
|
28
|
+
Gem::Builder.new(spec).build
|
metadata
CHANGED
@@ -1,58 +1,73 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.2
|
3
|
-
specification_version: 1
|
4
2
|
name: win32-sound
|
5
3
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.4.
|
7
|
-
date: 2007-07-27 00:00:00 -06:00
|
8
|
-
summary: A library for playing with sound on MS Windows.
|
9
|
-
require_paths:
|
10
|
-
- lib
|
11
|
-
email: djberg96@gmail.com
|
12
|
-
homepage: http://www.rubyforge.org/projects/win32utils
|
13
|
-
rubyforge_project: win32utils
|
14
|
-
description: A library for playing with sound on MS Windows.
|
15
|
-
autorequire:
|
16
|
-
default_executable:
|
17
|
-
bindir: bin
|
18
|
-
has_rdoc: true
|
19
|
-
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
-
requirements:
|
21
|
-
- - ">"
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 0.0.0
|
24
|
-
version:
|
4
|
+
version: 0.4.2
|
25
5
|
platform: ruby
|
26
|
-
signing_key:
|
27
|
-
cert_chain:
|
28
|
-
post_install_message:
|
29
6
|
authors:
|
30
7
|
- Daniel J. Berger
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-08-06 00:00:00 -06:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: windows-pr
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 1.0.6
|
24
|
+
version:
|
25
|
+
description: " The win32-sound library provides an interface for playing various\n sounds on MS Windows operating systems, including system sounds and\n wave files, as well as querying and configuring sound related properties.\n"
|
26
|
+
email: djberg96@gmail.com
|
27
|
+
executables: []
|
28
|
+
|
29
|
+
extensions: []
|
30
|
+
|
31
|
+
extra_rdoc_files:
|
32
|
+
- CHANGES
|
33
|
+
- README
|
34
|
+
- MANIFEST
|
31
35
|
files:
|
32
|
-
- examples/sound_test.rb
|
33
|
-
- lib/win32/sound.rb
|
34
|
-
- test/tc_sound.rb
|
35
36
|
- CHANGES
|
36
|
-
- examples
|
37
|
-
- lib
|
37
|
+
- examples/example_win32_sound.rb
|
38
|
+
- lib/win32/sound.rb
|
38
39
|
- MANIFEST
|
39
40
|
- Rakefile
|
40
41
|
- README
|
41
|
-
- test
|
42
|
+
- test/test_win32_sound.rb
|
42
43
|
- win32-sound.gemspec
|
43
|
-
|
44
|
-
|
44
|
+
has_rdoc: true
|
45
|
+
homepage: http://www.rubyforge.org/projects/win32utils
|
46
|
+
licenses:
|
47
|
+
- Artistic 2.0
|
48
|
+
post_install_message:
|
45
49
|
rdoc_options: []
|
46
50
|
|
47
|
-
|
48
|
-
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
51
|
+
require_paths:
|
52
|
+
- lib
|
53
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
54
|
+
requirements:
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: "0"
|
58
|
+
version:
|
59
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: "0"
|
64
|
+
version:
|
55
65
|
requirements: []
|
56
66
|
|
57
|
-
|
58
|
-
|
67
|
+
rubyforge_project: win32utils
|
68
|
+
rubygems_version: 1.3.4
|
69
|
+
signing_key:
|
70
|
+
specification_version: 3
|
71
|
+
summary: A library for playing with sound on MS Windows.
|
72
|
+
test_files:
|
73
|
+
- test/test_win32_sound.rb
|