示例#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.");
        }
示例#2
0
        public Channel.Channel PlaySound(Sound.Sound snd, bool paused)
        {
            IntPtr ChannelHandle = IntPtr.Zero;

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

            return new Channel.Channel (ChannelHandle);
        }