Module: FMOD::Functions

Extended by:
FFI::Library
Includes:
Constants, Enums
Included in:
Channel, Sound, System
Defined in:
lib/fmod/functions.rb

Constant Summary

Constants included from Enums

Enums::FMOD_CHANNELINDEX, Enums::FMOD_DELAYTYPE, Enums::FMOD_DSP_RESAMPLER, Enums::FMOD_DSP_TYPE, Enums::FMOD_OUTPUTTYPE, Enums::FMOD_RESULT, Enums::FMOD_SOUND_FORMAT

Constants included from Constants

Constants::FMOD_2D, Constants::FMOD_3D, Constants::FMOD_3D_CUSTOMROLLOFF, Constants::FMOD_3D_HEADRELATIVE, Constants::FMOD_3D_IGNOREGEOMETRY, Constants::FMOD_3D_LINEARROLLOFF, Constants::FMOD_3D_LOGROLLOFF, Constants::FMOD_3D_WORLDRELATIVE, Constants::FMOD_ACCURATETIME, Constants::FMOD_CDDA_FORCEASPI, Constants::FMOD_CDDA_JITTERCORRECT, Constants::FMOD_CREATECOMPRESSEDSAMPLE, Constants::FMOD_CREATESAMPLE, Constants::FMOD_CREATESTREAM, Constants::FMOD_DEFAULT, Constants::FMOD_HARDWARE, Constants::FMOD_IGNORETAGS, Constants::FMOD_INIT_3D_RIGHTHANDED, Constants::FMOD_INIT_DISABLE_MYEARS, Constants::FMOD_INIT_DSOUND_HRTFFULL, Constants::FMOD_INIT_DSOUND_HRTFLIGHT, Constants::FMOD_INIT_DSOUND_HRTFNONE, Constants::FMOD_INIT_DTS_NEURALSURROUND, Constants::FMOD_INIT_ENABLE_PROFILE, Constants::FMOD_INIT_GEOMETRY_USECLOSEST, Constants::FMOD_INIT_NORMAL, Constants::FMOD_INIT_PS2_DISABLECORE0REVERB, Constants::FMOD_INIT_PS2_DISABLECORE1REVERB, Constants::FMOD_INIT_PS2_DONTUSESCRATCHPAD, Constants::FMOD_INIT_PS2_SWAPDMACHANNELS, Constants::FMOD_INIT_PS3_FORCE2CHLPCM, Constants::FMOD_INIT_PS3_PREFERDTS, Constants::FMOD_INIT_SOFTWARE_DISABLE, Constants::FMOD_INIT_SOFTWARE_HRTF, Constants::FMOD_INIT_SOFTWARE_OCCLUSION, Constants::FMOD_INIT_SOFTWARE_REVERB_LOWMEM, Constants::FMOD_INIT_STREAM_FROM_UPDATE, Constants::FMOD_INIT_SYNCMIXERWITHUPDATE, Constants::FMOD_INIT_SYSTEM_MUSICMUTENOTPAUSE, Constants::FMOD_INIT_VOL0_BECOMES_VIRTUAL, Constants::FMOD_INIT_WASAPI_EXCLUSIVE, Constants::FMOD_INIT_XBOX_REMOVEHEADROOM, Constants::FMOD_LOADSECONDARYRAM, Constants::FMOD_LOOP_BIDI, Constants::FMOD_LOOP_NORMAL, Constants::FMOD_LOOP_OFF, Constants::FMOD_LOWMEM, Constants::FMOD_MPEGSEARCH, Constants::FMOD_NONBLOCKING, Constants::FMOD_OPENMEMORY, Constants::FMOD_OPENMEMORY_POINT, Constants::FMOD_OPENONLY, Constants::FMOD_OPENRAW, Constants::FMOD_OPENUSER, Constants::FMOD_SOFTWARE, Constants::FMOD_TIMEUNIT_BUFFERED, Constants::FMOD_TIMEUNIT_MODORDER, Constants::FMOD_TIMEUNIT_MODPATTERN, Constants::FMOD_TIMEUNIT_MODROW, Constants::FMOD_TIMEUNIT_MS, Constants::FMOD_TIMEUNIT_PCM, Constants::FMOD_TIMEUNIT_PCMBYTES, Constants::FMOD_TIMEUNIT_RAWBYTES, Constants::FMOD_TIMEUNIT_SENTENCE, Constants::FMOD_TIMEUNIT_SENTENCE_MS, Constants::FMOD_TIMEUNIT_SENTENCE_PCM, Constants::FMOD_TIMEUNIT_SENTENCE_PCMBYTES, Constants::FMOD_TIMEUNIT_SENTENCE_SUBSOUND, Constants::FMOD_UNICODE, Constants::FMOD_UNIQUE, Constants::FMOD_VIRTUAL_PLAYFROMSTART

Instance Method Summary collapse

Instance Method Details

#error_check(msg, *args) ⇒ Object



98
99
100
101
102
# File 'lib/fmod/functions.rb', line 98

def error_check(msg, *args)
  if (result = send msg, *args) != :FMOD_OK
    raise FMOD::Error, "#{result}: #{msg}(#{args.map{|arg| arg.respond_to?(:address) ? "0x%x" % arg.address : arg.inspect}.join(', ')})"
  end
end