class Game::Sound

Defined in:

game/sound.cr

Constant Summary

DEBUG = false

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.get(name) : Sound #

[View source]
def self.new(filename : String, volume = 1_f32, pitch = 1_f32) #

[View source]

Class Method Detail

def self.load(name : String, filename : String, volume : Float32 | Nil, pitch : Float32 | Nil) #

[View source]
def self.load(sounds : Array(NamedTuple(name: String, filename: String, volume: Float32 | Nil, pitch: Float32 | Nil))) #

[View source]
def self.pause(sound : LibRay::Sound) #

[View source]
def self.pitch(sound : LibRay::Sound, value : Float32) #

[View source]
def self.play(sound : LibRay::Sound) #

[View source]
def self.playing?(sound : LibRay::Sound) #

[View source]
def self.resume(sound : LibRay::Sound) #

[View source]
def self.stop(sound : LibRay::Sound) #

[View source]
def self.unload(sound : LibRay::Sound) #

[View source]
def self.unload_all #

[View source]
def self.volume(sound : LibRay::Sound, value : Float32) #

[View source]

Instance Method Detail

def load(filename : String) #

[View source]
def pause #

[View source]
def pitch : Float32 #

[View source]
def pitch=(value : Float32) #

[View source]
def play #

[View source]
def playing? #

[View source]
def randomize_pitch(min : Float32 = 0.5_f32, max : Float32 = 1.5_f32) #

[View source]
def randomize_volume(min : Float32 = 0.5_f32, max : Float32 = 1.5_f32) #

[View source]
def resume #

[View source]
def sound : LibRay::Sound #

[View source]
def stop #

[View source]
def unload #

[View source]
def volume : Float32 #

[View source]
def volume=(value : Float32) #

[View source]