public SoundTouch() { _is64Bit = Marshal.SizeOf <IntPtr>() == 8; _handle = _is64Bit ? SoundTouchInterop64.soundtouch_createInstance() : SoundTouchInterop32.soundtouch_createInstance(); }
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 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); } }