Sha256: 8f3b2ebab393e7c7985f90c476a91b713178008c65829f9259283b6cf8f954d3
Contents?: true
Size: 385 Bytes
Versions: 3
Compression:
Stored size: 385 Bytes
Contents
# Ruby2D::Sound module Ruby2D class Sound attr_reader :path attr_accessor :data def initialize(path) unless RUBY_ENGINE == 'opal' unless File.exists? path raise Error, "Cannot find audio file `#{path}`" end end @path = path ext_init(path) end # Play the sound def play ext_play end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ruby2d-0.7.0 | lib/ruby2d/sound.rb |
ruby2d-0.6.1 | lib/ruby2d/sound.rb |
ruby2d-0.6.0 | lib/ruby2d/sound.rb |