public SoundTouch() { _is64Bit = Environment.Is64BitOperatingSystem; _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; } }