Ejemplo n.º 1
0
 public SoundTouch()
 {
     is64Bit = Marshal.SizeOf <IntPtr>() == 8;
     //var src = AppDomain.CurrentDomain.RelativeSearchPath;
     handle = is64Bit ? SoundTouchInterop64.soundtouch_createInstance() :
              SoundTouchInterop32.soundtouch_createInstance();
 }
Ejemplo n.º 2
0
 public int GetUseQuickSeek()
 {
     if (is64Bit)
     {
         return(SoundTouchInterop64.soundtouch_getSetting(handle, SoundTouchSettings.UseQuickSeek));
     }
     return(SoundTouchInterop32.soundtouch_getSetting(handle, SoundTouchSettings.UseQuickSeek));
 }
Ejemplo n.º 3
0
 public int GetUseAntiAliasing()
 {
     if (is64Bit)
     {
         return(SoundTouchInterop64.soundtouch_getSetting(handle, SoundTouchSettings.UseAaFilter));
     }
     return(SoundTouchInterop32.soundtouch_getSetting(handle, SoundTouchSettings.UseAaFilter));
 }
Ejemplo n.º 4
0
 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));
 }
Ejemplo n.º 5
0
 public void SetChannels(int channels)
 {
     if (is64Bit)
     {
         SoundTouchInterop64.soundtouch_setChannels(handle, (uint)channels);
     }
     else
     {
         SoundTouchInterop32.soundtouch_setChannels(handle, (uint)channels);
     }
 }
Ejemplo n.º 6
0
 public void SetSampleRate(int sampleRate)
 {
     if (is64Bit)
     {
         SoundTouchInterop64.soundtouch_setSampleRate(handle, (uint)sampleRate);
     }
     else
     {
         SoundTouchInterop32.soundtouch_setSampleRate(handle, (uint)sampleRate);
     }
 }
Ejemplo n.º 7
0
 public void SetPitchOctaves(float pitchOctaves)
 {
     if (is64Bit)
     {
         SoundTouchInterop64.soundtouch_setPitchOctaves(handle, pitchOctaves);
     }
     else
     {
         SoundTouchInterop32.soundtouch_setPitchOctaves(handle, pitchOctaves);
     }
 }
Ejemplo n.º 8
0
 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);
     }
 }
Ejemplo n.º 9
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);
     }
 }
Ejemplo n.º 10
0
 public void SetTempo(float newTempo)
 {
     if (is64Bit)
     {
         SoundTouchInterop64.soundtouch_setTempo(handle, newTempo);
     }
     else
     {
         SoundTouchInterop32.soundtouch_setTempo(handle, newTempo);
     }
 }
Ejemplo n.º 11
0
 public void SetRate(float newRate)
 {
     if (is64Bit)
     {
         SoundTouchInterop64.soundtouch_setRate(handle, newRate);
     }
     else
     {
         SoundTouchInterop32.soundtouch_setRate(handle, newRate);
     }
 }
Ejemplo n.º 12
0
 public void Clear()
 {
     if (is64Bit)
     {
         SoundTouchInterop64.soundtouch_clear(handle);
     }
     else
     {
         SoundTouchInterop32.soundtouch_clear(handle);
     }
 }
Ejemplo n.º 13
0
 public void Flush()
 {
     if (is64Bit)
     {
         SoundTouchInterop64.soundtouch_flush(handle);
     }
     else
     {
         SoundTouchInterop32.soundtouch_flush(handle);
     }
 }
Ejemplo n.º 14
0
 public void PutSamples(float[] samples, int numSamples)
 {
     if (is64Bit)
     {
         SoundTouchInterop64.soundtouch_putSamples(handle, samples, numSamples);
     }
     else
     {
         SoundTouchInterop32.soundtouch_putSamples(handle, samples, numSamples);
     }
 }
Ejemplo n.º 15
0
 private void DestroyInstance()
 {
     if (handle != IntPtr.Zero)
     {
         if (is64Bit)
         {
             SoundTouchInterop64.soundtouch_destroyInstance(handle);
         }
         else
         {
             SoundTouchInterop32.soundtouch_destroyInstance(handle);
         }
         handle = IntPtr.Zero;
     }
 }