private void DestroyInstance() { if (handle != IntPtr.Zero) { SoundTouchInterop.soundtouch_destroyInstance(handle); handle = IntPtr.Zero; } }
public SoundTouch() { is64Bit = Marshal.SizeOf(typeof(IntPtr)) == 8; UnityEngine.Debug.Log(is64Bit); handle = SoundTouchInterop.soundtouch_createInstance(); }
public int ReceiveSamples(float[] outBuffer, int maxSamples) { return((int)SoundTouchInterop.soundtouch_receiveSamples(handle, outBuffer, (uint)maxSamples)); }
public void PutSamples(float[] samples, int numSamples) { SoundTouchInterop.soundtouch_putSamples(handle, samples, numSamples); }
public void SetChannels(int channels) { SoundTouchInterop.soundtouch_setChannels(handle, (uint)channels); }
public void SetPitchOctaves(float pitchOctaves) { SoundTouchInterop.soundtouch_setPitchOctaves(handle, pitchOctaves); }
public void SetSampleRate(int sampleRate) { SoundTouchInterop.soundtouch_setSampleRate(handle, (uint)sampleRate); }
public void SetUseQuickSeek(bool useQuickSeek) { SoundTouchInterop.soundtouch_setSetting(handle, SoundTouchSettings.UseQuickSeek, useQuickSeek ? 1 : 0); }
public int GetUseQuickSeek() { return(SoundTouchInterop.soundtouch_getSetting(handle, SoundTouchSettings.UseQuickSeek)); }
public void SetUseAntiAliasing(bool useAntiAliasing) { SoundTouchInterop.soundtouch_setSetting(handle, SoundTouchSettings.UseAaFilter, useAntiAliasing ? 1 : 0); }
public int GetUseAntiAliasing() { return(SoundTouchInterop.soundtouch_getSetting(handle, SoundTouchSettings.UseAaFilter)); }
public void SetTempo(float newTempo) { SoundTouchInterop.soundtouch_setTempo(handle, newTempo); }
public void SetRate(float newRate) { SoundTouchInterop.soundtouch_setRate(handle, newRate); }
public void Clear() { SoundTouchInterop.soundtouch_clear(handle); }