Skip to main content
Skip table of contents

WASAPI Source Filter Specification

The WASAPI source filter can only be used as the first filter of an input graph. It reads audio data from the specified WASAPI device.

JSON Structure

JS
{
	"name": "WASAPI Source",
	"device": {
		"name": "...",
		"loopback": true/false,
        "exclusiveMode": true/false
	},
	"format": {
		"sampleRate": ...,
		"resolution": ...
	}
}
FieldDescription
device

Defines the WASAPI device and the mode to use it.

  • name: Name of the device as defined by WASAPI. It is sufficient to specify only a part of this string in the name field, as long as it is unique to the device.
  • loopback: If false , the device must be a capturing device. If true, the device must be a rendering device, whose output is used as the input stream for the recording. The parameter is optional, the default is false.
  • exclusiveMode: If true, the device is used in exclusive mode, otherwise in shared mode. A use in exclusive mode will fail, if the device is already in use by another process. The parameter is optional, the default is false.
format

Describes the audio format, which is to be read from the device.

  • sampleRate: Sampling rate in Hz. The supported values depend on the device. Most devices support at least 44100 and 48000 Hz. As a special case, a value of 0 can be specified. In this case, the default mixing format of the WASAPI device is used.
  • resolution: Bit width of a single audio sample. The supported values depend on the device. Most devices support 16, 24 and 32 bit audio. If sampleRate is given as 0, this value is ignored (but cannot be omitted, so should be set to 0 as well).

Notes:

  • The "name" of a given WASAPI device is not always obvious. ROAD's devices API can enumerate the names of all installed WASAPI devices, together with their number of channels.
  • If the resolution is given as 32, the WASAPI device is configured to deliver floating-point PCM samples.
  • There is no need to specify a channel count in the "format" data. WASAPI devices automatically deliver their default number of channels (usually stereo)


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.