public SoundTouch() { is64Bit = Marshal.SizeOf <IntPtr>() == 8; //var src = AppDomain.CurrentDomain.RelativeSearchPath; handle = is64Bit ? SoundTouchInterop64.soundtouch_createInstance() : SoundTouchInterop32.soundtouch_createInstance(); }
public int GetUseQuickSeek() { if (is64Bit) { return(SoundTouchInterop64.soundtouch_getSetting(handle, SoundTouchSettings.UseQuickSeek)); } return(SoundTouchInterop32.soundtouch_getSetting(handle, SoundTouchSettings.UseQuickSeek)); }
public int GetUseAntiAliasing() { if (is64Bit) { return(SoundTouchInterop64.soundtouch_getSetting(handle, SoundTouchSettings.UseAaFilter)); } return(SoundTouchInterop32.soundtouch_getSetting(handle, SoundTouchSettings.UseAaFilter)); }
public int ReceiveSamples(float[] outBuffer, int maxSamples) { if (is64Bit) { return((int)SoundTouchInterop64.soundtouch_receiveSamples(handle, outBuffer, (uint)maxSamples)); } return((int)SoundTouchInterop32.soundtouch_receiveSamples(handle, outBuffer, (uint)maxSamples)); }
public void SetChannels(int channels) { if (is64Bit) { SoundTouchInterop64.soundtouch_setChannels(handle, (uint)channels); } else { SoundTouchInterop32.soundtouch_setChannels(handle, (uint)channels); } }
public void SetSampleRate(int sampleRate) { if (is64Bit) { SoundTouchInterop64.soundtouch_setSampleRate(handle, (uint)sampleRate); } else { SoundTouchInterop32.soundtouch_setSampleRate(handle, (uint)sampleRate); } }
public void SetPitchOctaves(float pitchOctaves) { if (is64Bit) { SoundTouchInterop64.soundtouch_setPitchOctaves(handle, pitchOctaves); } else { SoundTouchInterop32.soundtouch_setPitchOctaves(handle, pitchOctaves); } }
public void SetUseQuickSeek(bool useQuickSeek) { if (is64Bit) { SoundTouchInterop64.soundtouch_setSetting(handle, SoundTouchSettings.UseQuickSeek, useQuickSeek ? 1 : 0); } else { SoundTouchInterop32.soundtouch_setSetting(handle, SoundTouchSettings.UseQuickSeek, useQuickSeek ? 1 : 0); } }
public void SetUseAntiAliasing(bool useAntiAliasing) { if (is64Bit) { SoundTouchInterop64.soundtouch_setSetting(handle, SoundTouchSettings.UseAaFilter, useAntiAliasing ? 1 : 0); } else { SoundTouchInterop32.soundtouch_setSetting(handle, SoundTouchSettings.UseAaFilter, useAntiAliasing ? 1 : 0); } }
public void SetTempo(float newTempo) { if (is64Bit) { SoundTouchInterop64.soundtouch_setTempo(handle, newTempo); } else { SoundTouchInterop32.soundtouch_setTempo(handle, newTempo); } }
public void SetRate(float newRate) { if (is64Bit) { SoundTouchInterop64.soundtouch_setRate(handle, newRate); } else { SoundTouchInterop32.soundtouch_setRate(handle, newRate); } }
public void Clear() { if (is64Bit) { SoundTouchInterop64.soundtouch_clear(handle); } else { SoundTouchInterop32.soundtouch_clear(handle); } }
public void Flush() { if (is64Bit) { SoundTouchInterop64.soundtouch_flush(handle); } else { SoundTouchInterop32.soundtouch_flush(handle); } }
public void PutSamples(float[] samples, int numSamples) { if (is64Bit) { SoundTouchInterop64.soundtouch_putSamples(handle, samples, numSamples); } else { SoundTouchInterop32.soundtouch_putSamples(handle, samples, numSamples); } }
private void DestroyInstance() { if (handle != IntPtr.Zero) { if (is64Bit) { SoundTouchInterop64.soundtouch_destroyInstance(handle); } else { SoundTouchInterop32.soundtouch_destroyInstance(handle); } handle = IntPtr.Zero; } }