Example #1
0
 public Stereo(WAVE_H h, memblock single) : this(libwavPINVOKE.new_Stereo__SWIG_0(WAVE_H.getCPtr(h), memblock.getCPtr(single)), true)
 {
     if (libwavPINVOKE.SWIGPendingException.Pending)
     {
         throw libwavPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Example #2
0
 public Stereo(WAVE_H h, memblock left, memblock right) : this(libwavPINVOKE.new_Stereo__SWIG_1(WAVE_H.getCPtr(h), memblock.getCPtr(left), memblock.getCPtr(right)), true)
 {
     if (libwavPINVOKE.SWIGPendingException.Pending)
     {
         throw libwavPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Example #3
0
 public DFTransform DFT(memblock m)
 {
     global::System.IntPtr cPtr = libwavPINVOKE.Wave_DFT(swigCPtr, memblock.getCPtr(m));
     DFTransform ret = (cPtr == global::System.IntPtr.Zero) ? null : new DFTransform(cPtr, false);
     if (libwavPINVOKE.SWIGPendingException.Pending) throw libwavPINVOKE.SWIGPendingException.Retrieve();
     return ret;
 }
Example #4
0
 public Stereo(int nChannels, int nSamplesPerSec, int bytesPerSample, memblock left, memblock right) : this(libwavPINVOKE.new_Stereo__SWIG_2(nChannels, nSamplesPerSec, bytesPerSample, memblock.getCPtr(left), memblock.getCPtr(right)), true)
 {
     if (libwavPINVOKE.SWIGPendingException.Pending)
     {
         throw libwavPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Example #5
0
 public void Update()
 {
     if (song != null)
     {
         memblock    m   = song.getLastNextResult();                    //current memblock
         FFTransform FFT = new FFTransform(song.getStereoObject(m), 5); //creates FFT using 5 samples per second
         DFTransform.DFTChannelResult Results;
         if (m.nBytes > 0)                                              //if memblock is not empty
         {
             do                                                         //has another memblock
             {
                 Results = FFT.next().stereo;
                 int x = (int)Results.freq;
                 Console.WriteLine(x);
                 if (x < 1 || x > 20000)
                 {
                     break;
                 }
                 int    i = (int)Math.Log(x, 1.3);
                 double y = Math.Abs(Results.dbmag);
                 points[i] = new Vector2(800 + 10 * i, 640 - (int)(y));
             }while (FFT.hasNext());
         }
     }
 }
Example #6
0
    public bool fillBuffer(memblock mem)
    {
        bool ret = libwavPINVOKE.Audio_fillBuffer__SWIG_1(swigCPtr, memblock.getCPtr(mem));

        if (libwavPINVOKE.SWIGPendingException.Pending)
        {
            throw libwavPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
Example #7
0
    public double correlation(memblock mem1, memblock mem2)
    {
        double ret = libwavPINVOKE.Wave_correlation(swigCPtr, memblock.getCPtr(mem1), memblock.getCPtr(mem2));

        if (libwavPINVOKE.SWIGPendingException.Pending)
        {
            throw libwavPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
Example #8
0
    public int detectBPM(memblock m, int startBPM, int endBPM, int stepBPM)
    {
        int ret = libwavPINVOKE.Wave_detectBPM(swigCPtr, memblock.getCPtr(m), startBPM, endBPM, stepBPM);

        if (libwavPINVOKE.SWIGPendingException.Pending)
        {
            throw libwavPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
Example #9
0
    public memblock DFTWindow(memblock m, Wave.DFTWindowType type)
    {
        memblock ret = new memblock(libwavPINVOKE.Wave_DFTWindow(swigCPtr, memblock.getCPtr(m), (int)type), false);

        if (libwavPINVOKE.SWIGPendingException.Pending)
        {
            throw libwavPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
Example #10
0
    public memblock next(int nBlocks)
    {
        global::System.IntPtr cPtr = libwavPINVOKE.Wave_next__SWIG_1(swigCPtr, nBlocks);
        memblock ret = (cPtr == global::System.IntPtr.Zero) ? null : new memblock(cPtr, false);

        if (libwavPINVOKE.SWIGPendingException.Pending)
        {
            throw libwavPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
Example #11
0
    public Stereo getStereoObject(memblock m)
    {
        global::System.IntPtr cPtr = libwavPINVOKE.Wave_getStereoObject(swigCPtr, memblock.getCPtr(m));
        Stereo ret = (cPtr == global::System.IntPtr.Zero) ? null : new Stereo(cPtr, false);

        if (libwavPINVOKE.SWIGPendingException.Pending)
        {
            throw libwavPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
Example #12
0
    public FFTransform FFT(memblock m)
    {
        global::System.IntPtr cPtr = libwavPINVOKE.Wave_FFT(swigCPtr, memblock.getCPtr(m));
        FFTransform           ret  = (cPtr == global::System.IntPtr.Zero) ? null : new FFTransform(cPtr, false);

        if (libwavPINVOKE.SWIGPendingException.Pending)
        {
            throw libwavPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
Example #13
0
    public memblock getLastNextResult()
    {
        global::System.IntPtr cPtr = libwavPINVOKE.Wave_getLastNextResult(swigCPtr);
        memblock ret = (cPtr == global::System.IntPtr.Zero) ? null : new memblock(cPtr, false);

        if (libwavPINVOKE.SWIGPendingException.Pending)
        {
            throw libwavPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
Example #14
0
 public Stereo(WAVE_H h, memblock single)
     : this(libwavPINVOKE.new_Stereo__SWIG_0(WAVE_H.getCPtr(h), memblock.getCPtr(single)), true)
 {
     if (libwavPINVOKE.SWIGPendingException.Pending) throw libwavPINVOKE.SWIGPendingException.Retrieve();
 }
Example #15
0
 public Stereo(WAVE_H h, memblock left, memblock right)
     : this(libwavPINVOKE.new_Stereo__SWIG_1(WAVE_H.getCPtr(h), memblock.getCPtr(left), memblock.getCPtr(right)), true)
 {
     if (libwavPINVOKE.SWIGPendingException.Pending) throw libwavPINVOKE.SWIGPendingException.Retrieve();
 }
Example #16
0
 public Stereo(int nChannels, int nSamplesPerSec, int bytesPerSample, memblock left, memblock right)
     : this(libwavPINVOKE.new_Stereo__SWIG_2(nChannels, nSamplesPerSec, bytesPerSample, memblock.getCPtr(left), memblock.getCPtr(right)), true)
 {
     if (libwavPINVOKE.SWIGPendingException.Pending) throw libwavPINVOKE.SWIGPendingException.Retrieve();
 }
Example #17
0
 public memblock DFTWindow(memblock m, Wave.DFTWindowType type)
 {
     memblock ret = new memblock(libwavPINVOKE.Wave_DFTWindow(swigCPtr, memblock.getCPtr(m), (int)type), false);
     if (libwavPINVOKE.SWIGPendingException.Pending) throw libwavPINVOKE.SWIGPendingException.Retrieve();
     return ret;
 }
Example #18
0
 public int detectBPM(memblock m, int startBPM, int endBPM, int stepBPM)
 {
     int ret = libwavPINVOKE.Wave_detectBPM(swigCPtr, memblock.getCPtr(m), startBPM, endBPM, stepBPM);
     if (libwavPINVOKE.SWIGPendingException.Pending) throw libwavPINVOKE.SWIGPendingException.Retrieve();
     return ret;
 }
Example #19
0
 public double correlation(memblock mem1, memblock mem2)
 {
     double ret = libwavPINVOKE.Wave_correlation(swigCPtr, memblock.getCPtr(mem1), memblock.getCPtr(mem2));
     if (libwavPINVOKE.SWIGPendingException.Pending) throw libwavPINVOKE.SWIGPendingException.Retrieve();
     return ret;
 }
Example #20
0
 public Stereo getStereoObject(memblock m)
 {
     global::System.IntPtr cPtr = libwavPINVOKE.Wave_getStereoObject(swigCPtr, memblock.getCPtr(m));
     Stereo ret = (cPtr == global::System.IntPtr.Zero) ? null : new Stereo(cPtr, false);
     if (libwavPINVOKE.SWIGPendingException.Pending) throw libwavPINVOKE.SWIGPendingException.Retrieve();
     return ret;
 }
Example #21
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(memblock obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }
Example #22
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(memblock obj)
 {
     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
 }