public bool Init(bool buffered = false) { BASSWASAPIInit basswasapiinit = BASSWASAPIInit.BASS_WASAPI_SHARED; if (this._exclusive) { basswasapiinit |= BASSWASAPIInit.BASS_WASAPI_EXCLUSIVE; } if (this._eventSystem) { basswasapiinit |= BASSWASAPIInit.BASS_WASAPI_EVENT; } if (buffered) { basswasapiinit |= BASSWASAPIInit.BASS_WASAPI_BUFFER; } if (this.IsInput) { this._internalWasapiProc = new WASAPIPROC(this.WasapiInputCallback); return(BassWasapi.BASS_WASAPI_Init(this._device, this._samplerate, this._numchans, basswasapiinit, this._bufferLength, this._updatePeriod, this._internalWasapiProc, IntPtr.Zero)); } this._internalWasapiProc = new WASAPIPROC(this.WasapiOutputCallback); return(BassWasapi.BASS_WASAPI_Init(this._device, this._samplerate, this._numchans, basswasapiinit, this._bufferLength, this._updatePeriod, this._internalWasapiProc, IntPtr.Zero)); }
public static bool BASS_WASAPI_Init(int device, int freq, int chans, BASSWASAPIInit flags, BASSWASAPIFormat format, float buffer, float period, WASAPIPROC proc, IntPtr user) { flags |= BASSWASAPIInit.BASS_WASAPI_EXCLUSIVE; return(BassWasapi.BASS_WASAPI_Init(device, freq, chans, (BASSWASAPIInit)Utils.MakeLong((int)flags, (int)format), buffer, period, proc, user)); }