Beispiel #1
0
        public override void Play()
        {
            CheckChannel();

            //FMOD_Audio.CheckFMODResult();
            FMOD_Audio.CheckFMODResult(mChannel.setPaused(false));
        }
Beispiel #2
0
        public FMOD_SoundBuffer(FMOD_Audio audio, string filename)
        {
            mAudio  = audio;
            mSystem = mAudio.FMODSystem;


            FMOD_Audio.CheckFMODResult(mSystem.createSound(filename, FMOD.MODE.DEFAULT, ref mSound));
        }
Beispiel #3
0
        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);
            }
        }
Beispiel #4
0
 private void CreateChannel()
 {
     FMOD_Audio.CheckFMODResult(
         mSystem.playSound(FMOD.CHANNELINDEX.FREE, mSound, true, ref mChannel));
 }
Beispiel #5
0
 public override void Stop()
 {
     FMOD_Audio.CheckFMODResult(mChannel.setPaused(true));
     FMOD_Audio.CheckFMODResult(mChannel.setPosition(0, FMOD.TIMEUNIT.MS));
 }