Beispiel #1
0
        private void PlaySound(Sound.Sound snd, bool paused, Channel.Channel chn)
        {
            //FIXME The handle is changed most of the time on some system.
            //Only use the other metods to be safe.

            IntPtr channel = chn.DangerousGetHandle ();

            Error.Code ReturnCode = PlaySound (this.DangerousGetHandle (), Channel.Index.Reuse, snd.DangerousGetHandle (), paused, ref channel);
            Error.Errors.ThrowError (ReturnCode);

            //This can't really happend.
            //Check just in case...
            if(chn.DangerousGetHandle () == channel)
                throw new Exception("Channel handle got changed by Fmod.");
        }
Beispiel #2
0
        public void PlayDsp(Dsp.Dsp dsp, bool paused, Channel.Channel chn)
        {
            IntPtr channel = chn.DangerousGetHandle ();

            Error.Code ReturnCode = PlayDsp (this.DangerousGetHandle (), Channel.Index.Reuse, dsp.DangerousGetHandle (), paused, ref channel);
            Error.Errors.ThrowError (ReturnCode);

            //This can't really happend.
            //Check just in case...
            if(chn.DangerousGetHandle () != channel)
                throw new Exception("Channel handle got changed by Fmod.");
        }