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
| Field | Type | Description |
|---|---|---|
devices | OutputDevice[] | Devices of all output modules, module by module. |
devices[].guid | string | Device 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[].name | string | Display name of the device. |
devices[].entry | string | Display name of the output module that provides the device. |
devices[].entryGuid | string | GUID of that output module, rendered as {...}. |
count | integer | Number of entries in devices. |
success is true on success. On failure the response is { success: false, error, code }; see Error codes for code.
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
| Field | Type | Description |
|---|---|---|
entries | OutputEntry[] | Every output module. |
entries[].guid | string | Module GUID rendered as {...}. |
entries[].name | string | Display name of the module. Several modules may share one, and some report an empty name. |
entries[].needsBitdepthConfig | boolean | The module wants an output bit depth configured. |
entries[].needsDitherConfig | boolean | The module wants dithering configured. |
entries[].supportsMultipleStreams | boolean | The module can play several streams at once. |
entries[].isHighLatency | boolean | The module declares itself high latency. |
entries[].isLowLatency | boolean | The module declares itself low latency. |
count | integer | Number of entries in entries. |
success is true on success. On failure the response is { success: false, error, code }; see Error codes for code.
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
| Field | Type | Description |
|---|---|---|
note | string | Fixed English sentence saying where output settings are edited. |
availableOutputs | string[] | 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.
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.getSettingsis read-only discovery information. Output configuration is managed by foobar2000 Preferences rather than this API.