


If the specified period is below the minimum update period, it will automatically be raised to that. The interval (in seconds or samples depending on BASS_WASAPI_SAMPLES) between callback function calls. With event-driven exclusive mode, there will be 2 buffers of this length, so the total buffer length is double. For an output device, the buffer size determines the latency.
#Purebasic integer driver
This is a minimum and the driver may choose to use a larger buffer BASS_WASAPI_GetInfo(BASS_WASAPI_INFO) can be used to confirm what the buffer size is. The length of the device's buffer in seconds. in shared mode), the flag will have no effect. Event-driven buffering is unavailable on loopback devices.īuffer and period are in samples rather than seconds.ĭither is optional rather than automatic because it destroys bit-perfect output you probably don't want to enable it unless you're applying DSP (including volume changes). In exclusive mode, there are 2 buffers of buffer length that are processed alternately. So the period parameter is ignored, and buffer is too in shared mode as the system will choose an appropriate buffer length. BASSWASAPI will normally periodically write data to (or read data from) the device's buffer according to the period parameter, but with the event-driven system WASAPI will signal to BASSWASAPI when more data should be written to (or read from) the buffer. This requires the BASS "no sound" device to have been initilized, via BASS_Init(Int32, Int32, BASSInit, IntPtr, IntPtr).Įnable event-driven buffering. If possible, a higher sample rate than freq will be used, rather than a lower one.Įnable double buffering, for use by BASS_WASAPI_GetData(IntPtr, Int32) and BASS_WASAPI_GetLevel. A BASS_WASAPI_FORMAT value (see BASS_WASAPI_INFO) can be used to bypass the formats that precede it in that list.Īutomatically choose another sample format if the specified format is not supported. The default is to try 32-bit floating-point, 32-bit integer, 24-bit integer, 16-bit integer, 8-bit integer, in that order. The HIWORD - use Utils.MakeLong(flags,format) - can be used to limit the sample format that is used in exclusive mode. Initialize the device in exclusive mode, else shared mode.
