public void AddInput(Dsp target) { if (target != null) { currentResult = NativeMethods.FMOD_DSP_AddInput(handle, target.Handle); } }
public void DisconnectFrom(Dsp target) { if (target != null) { currentResult = NativeMethods.FMOD_DSP_DisconnectFrom(handle, target.Handle); } }
public void AddDsp(Dsp dsp) { if (dsp != null) { currentResult = NativeMethods.FMOD_Channel_AddDSP(handle, dsp.Handle); } }
public void AddDsp(Dsp dsp) { if (dsp != null) { currentResult = NativeMethods.FMOD_ChannelGroup_AddDSP(handle, dsp.Handle); } else { throw new ArgumentNullException("dsp"); } }
protected virtual void Dispose(bool disposing) { if (!disposed) { if (disposing) { if (drivers != null) { drivers.Dispose(); drivers = null; } if (recordDrivers != null) { recordDrivers.Dispose(); recordDrivers = null; } if (masterChannelGroup != null) { masterChannelGroup.Dispose(); masterChannelGroup = null; } if (dspHead != null) { dspHead.Dispose(); dspHead = null; } } if (handle != IntPtr.Zero) { NativeMethods.FMOD_System_Release(handle); handle = IntPtr.Zero; } } disposed = true; }
public void AddDsp(Dsp dsp) { if (dsp != null) { currentResult = NativeMethods.FMOD_System_AddDSP(handle, dsp.Handle); } else throw new ArgumentNullException("dsp"); }
public void PlayDsp(ChannelIndex channelId, Dsp dsp, bool paused, ref Channel channel) { if (dsp != null) { currentResult = Result.Ok; IntPtr channelHandle; if (channel != null) { channelHandle = channel.Handle; } else { channel = new Channel(); channelHandle = new IntPtr(); } try { currentResult = NativeMethods.FMOD_System_PlayDSP(handle, channelId, dsp.Handle, paused, ref channelHandle); } catch (System.Runtime.InteropServices.ExternalException) { currentResult = Result.InvalidParameterError; } if (currentResult != Result.Ok) { channel = new Channel(); channel.Handle = channelHandle; } else { channel = null; } } else throw new ArgumentNullException("dsp"); }
/// <summary> /// Create Dsp by index /// </summary> /// <param name="index">The index of the Dsp to create</param> /// <returns>A new Dsp</returns> public Dsp CreateDsp(int index) { currentResult = Result.Ok; IntPtr dspHandle = new IntPtr(); Dsp dsp = null; try { currentResult = NativeMethods.FMOD_System_CreateDSPByIndex(handle, index, ref dspHandle); } catch (System.Runtime.InteropServices.ExternalException) { currentResult = Result.InvalidParameterError; } if (currentResult == Result.Ok) { dsp = new Dsp(); dsp.Handle = dspHandle; } return dsp; }