Module: SDL::Mixer

Extended by:
NiceFFI::Library
Defined in:
lib/ruby-sdl-ffi/mixer.rb

Defined Under Namespace

Classes: Chunk, Music

Constant Summary collapse

CHANNELS =
8
DEFAULT_FREQUENCY =
22050
DEFAULT_CHANNELS =
2
DEFAULT_FORMAT =
if( FFI::Platform::BYTE_ORDER ==
    FFI::Platform::LITTLE_ENDIAN)
  AUDIO_S16LSB
else
  AUDIO_S16MSB
end
MAX_VOLUME =
128
NO_FADING =
0
FADING_OUT =
1
FADING_IN =
2
MUS_NONE =
0
MUS_CMD =
1
MUS_WAV =
2
MUS_MOD =
3
MUS_MID =
4
MUS_OGG =
5
MUS_MP3 =
6
MUS_MP3_MAD =
7
CHANNEL_POST =
-2
EFFECTSMAXSPEED =
"MIX_EFFECTSMAXSPEED"

Class Method Summary collapse

Class Method Details

.LoadWAV(file) ⇒ Object


110
111
112
# File 'lib/ruby-sdl-ffi/mixer.rb', line 110

def self.LoadWAV( file )
  LoadWAV_RW( SDL.RWFromFile(file, "rb"), 1 )
end

.mix_func(name, args, ret) ⇒ Object


42
43
44
# File 'lib/ruby-sdl-ffi/mixer.rb', line 42

def self.mix_func( name, args, ret )
  func name, "Mix_#{name}", args, ret
end