Sha256: 54bc971ed594b08b08b271cd97f21e403b20b8747270e9eb5ed198aa09cc677c
Contents?: true
Size: 407 Bytes
Versions: 7
Compression:
Stored size: 407 Bytes
Contents
# Ruby2D::Sound module Ruby2D class Sound attr_reader :path attr_accessor :data def initialize(path) unless File.exist? path raise Error, "Cannot find audio file `#{path}`" end @path = path unless ext_init(@path) raise Error, "Sound `#{@path}` cannot be created" end end # Play the sound def play ext_play end end end
Version data entries
7 entries across 7 versions & 1 rubygems