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