public Dsp.Connection AddDsp(Dsp.Dsp dsp) { IntPtr ConnectionHandle = IntPtr.Zero; Error.Code ReturnCode = AddDSP (this.DangerousGetHandle (), dsp.DangerousGetHandle (), ref ConnectionHandle); Error.Errors.ThrowError (ReturnCode); return new Dsp.Connection (ConnectionHandle); }
public Channel.Channel PlayDsp(Dsp.Dsp dsp, bool paused) { IntPtr ChannelHandle = IntPtr.Zero; Error.Code ReturnCode = PlayDsp (this.DangerousGetHandle (), Channel.Index.Free, dsp.DangerousGetHandle (), paused, ref ChannelHandle); Error.Errors.ThrowError (ReturnCode); return new Channel.Channel (ChannelHandle); }
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."); }