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(); } }
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(); } }
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; }
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(); } }
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()); } } }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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(); }
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(); }
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(); }
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; }
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; }
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; }
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; }
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); }
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; }