public override void Play() { CheckChannel(); //FMOD_Audio.CheckFMODResult(); FMOD_Audio.CheckFMODResult(mChannel.setPaused(false)); }
public FMOD_SoundBuffer(FMOD_Audio audio, string filename) { mAudio = audio; mSystem = mAudio.FMODSystem; FMOD_Audio.CheckFMODResult(mSystem.createSound(filename, FMOD.MODE.DEFAULT, ref mSound)); }
private void CheckChannel() { bool p = false; FMOD.RESULT result = mChannel.isPlaying(ref p); if (result == FMOD.RESULT.ERR_INVALID_HANDLE || p == false) { CreateChannel(); } else { FMOD_Audio.CheckFMODResult(result); } }
private void CreateChannel() { FMOD_Audio.CheckFMODResult( mSystem.playSound(FMOD.CHANNELINDEX.FREE, mSound, true, ref mChannel)); }
public override void Stop() { FMOD_Audio.CheckFMODResult(mChannel.setPaused(true)); FMOD_Audio.CheckFMODResult(mChannel.setPosition(0, FMOD.TIMEUNIT.MS)); }