/// <summary> /// Kind of like a DSP factory. But not. /// </summary> internal static Dsp GetInstance(FmodSystem system, DspType type) { IntPtr handle = IntPtr.Zero; Errors.ThrowIfError(CreateDspByType(system.DangerousGetHandle(), type, ref handle)); if (type == DspType.Oscillator) { return(new Oscillator(handle, system)); } ; // TODO: implement other types throw new NotSupportedException("DSP type " + type + " not currently supported by nFMOD"); }
public Channel Play(Channel channel = null) { IntPtr result = channel == null ? IntPtr.Zero : Channel.DangerousGetHandle() ; Errors.ThrowIfError(PlayDsp(Parent.DangerousGetHandle(), ChannelIndex.Free, DangerousGetHandle(), false, ref result)); Channel = channel == null ? new Channel(result) : channel; return(Channel); }
public static void GetStats(ref int currentalloced, ref int maxalloced, bool blocking) { Errors.ThrowIfError(GetStats_External(ref currentalloced, ref maxalloced, blocking)); }
public static void GetStats(ref int currentalloced, ref int maxalloced) { Errors.ThrowIfError(GetStats_External(ref currentalloced, ref maxalloced, true)); }
public void Stop() { Errors.ThrowIfError(Stop(DangerousGetHandle())); }
public void SetCallback(ChannelCallbackType callback) { Errors.ThrowIfError(SetCallback(DangerousGetHandle(), callback)); }
public void Reset() { Errors.ThrowIfError(Reset_External(DangerousGetHandle())); }