Skip to content

Output API ​

Provides device enumeration and capability inspection for audio output modules.

output ​

output.getDevices ​

List the devices of every output module.

This method takes no parameters.

Returns

FieldTypeDescription
devicesOutputDevice[]Devices of all output modules, module by module.
devices[].guidstringDevice GUID rendered as {...}. Not unique on its own: a module reports its default device with the all-zero GUID, so key devices by (entryGuid, guid).
devices[].namestringDisplay name of the device.
devices[].entrystringDisplay name of the output module that provides the device.
devices[].entryGuidstringGUID of that output module, rendered as {...}.
countintegerNumber of entries in devices.

success is true on success. On failure the response is { success: false, error, code }; see Error codes for code.

js
const result = await fb2k.invoke('output.getDevices');

guid is not unique within this response. foobar2000 reports an output module's "default device" using the all-zero GUID {00000000-0000-0000-0000-000000000000}, so it appears once per module. Key devices by the (entryGuid, guid) pair rather than by guid alone.

output.getEntries ​

List the output modules (foobar2000's output entries) with their capability flags.

This method takes no parameters.

Returns

FieldTypeDescription
entriesOutputEntry[]Every output module.
entries[].guidstringModule GUID rendered as {...}.
entries[].namestringDisplay name of the module. Several modules may share one, and some report an empty name.
entries[].needsBitdepthConfigbooleanThe module wants an output bit depth configured.
entries[].needsDitherConfigbooleanThe module wants dithering configured.
entries[].supportsMultipleStreamsbooleanThe module can play several streams at once.
entries[].isHighLatencybooleanThe module declares itself high latency.
entries[].isLowLatencybooleanThe module declares itself low latency.
countintegerNumber of entries in entries.

success is true on success. On failure the response is { success: false, error, code }; see Error codes for code.

js
const result = await fb2k.invoke('output.getEntries');

output.getSettings ​

Report the display names of the output modules. Informational only: the output settings are edited in foobar2000 Preferences, and config.setOutputDevice switches the device.

This method takes no parameters.

Returns

FieldTypeDescription
notestringFixed English sentence saying where output settings are edited.
availableOutputsstring[]Display names of the output modules. Names can repeat or be empty, and the order is not stable between calls; prefer output.getEntries, which pairs each name with its GUID.

success is true on success. On failure the response is { success: false, error, code }; see Error codes for code.

js
const result = await fb2k.invoke('output.getSettings');

Informational only — output configuration is owned by foobar2000 Preferences, and config.setOutputDevice is the way to switch devices.

Avoid availableOutputs in new code. It is a bare list of display names with two known limitations: modules that share a display name cannot be distinguished, and some modules report empty names. Furthermore, array order depends on service enumeration and is not stable between calls, making array indices unsuitable as persistent identifiers. Use output.getEntries, which pairs each name with its GUID.

Runtime behavior notes ​

  • output.getSettings is read-only discovery information. Output configuration is managed by foobar2000 Preferences rather than this API.