Skip to content

Commit

Permalink
version 0.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
domgetter committed Aug 3, 2014
1 parent 547a552 commit b9a9d40
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
1 change: 1 addition & 0 deletions ext/mkrf_conf.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#TODO: build platform-specific gem dependency logic
4 changes: 2 additions & 2 deletions lib/sound.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
require_relative 'os/os'

if OS.windows?
require_relative '../../win32-sound/lib/win32/sound'
require 'win32/sound'
else
warn("Sound output not yet implemented for this platform: #{OS.os}"
warn("Sound output not yet implemented for this platform: #{OS.os}")
end

require_relative 'sound/sound'
Expand Down
4 changes: 2 additions & 2 deletions lib/sound/out.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ module Sound

module Out

def self.play_freq(frequency = 440, duration = 1000, volume = 1, pause_execution = false)
def self.play_freq(frequency = 440, duration = 1000, volume = 1, immediate_playback = true)
if Platform.eql? "i386-mingw32"
Win32::Sound.play_freq(frequency, duration, volume, pause_execution)
Win32::Sound.play_freq(frequency, duration, volume, immediate_playback)
else
warn("play_freq not implemented for this platform: #{RUBY_PLATFORM}")
end
Expand Down
2 changes: 1 addition & 1 deletion lib/sound/sound.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

module Sound
Platform = RUBY_PLATFORM

end
11 changes: 8 additions & 3 deletions sound.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@
Gem::Specification.new do |spec|

spec.name = 'sound'
spec.version = '0.0.1'
spec.date = '2014-08-02'
spec.version = '0.0.2'
spec.date = '2014-08-03'
spec.summary = 'cross-platform sound library wrapper'
spec.description = 'Allows for effiecent cross-platform sound libraries in pure Ruby by tapping into native libraries.'
spec.authors = ["Dominic Muller"]
spec.email = '[email protected]'
spec.files = [
"lib/sound.rb",
"lib/sound/sound.rb"
"lib/sound/out.rb",
"lib/sound/sound.rb",
"lib/os/os.rb"
]
#spec.add_runtime_dependency 'win32-sound', ['>= 0.6.0']
spec.requirements << "win32-sound, '>= 0.6.0' on Windows"
spec.homepage = 'https://github.com/RSMP/sound'
spec.license = 'MIT'
spec.extensions << 'ext/mkrf_conf.rb'

end

0 comments on commit b9a9d40

Please sign in to comment.