Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions DOCS/interface-changes/wasapi-spatial.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
add the `wasapi-spatial` Windows audio output
13 changes: 13 additions & 0 deletions DOCS/man/ao.rst
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,19 @@ Available audio output drivers are:
(Note: only supports mono, stereo, 4.0, 5.1 and 7.1 channel
layouts.)

``wasapi-spatial`` (Windows only)
Sends decoded PCM channel layouts to the Windows Spatial Audio API as
static audio objects. Windows renders the objects through the spatial
audio path for the selected output device.

This driver supports decoded PCM only. It doesn't pass through compressed
bitstreams or native object metadata from Dolby Atmos or DTS:X streams.
It never requests exclusive audio access.

The driver isn't selected automatically. Use
``--ao=wasapi-spatial,wasapi`` to try it and fall back to regular WASAPI.
Use ``--audio-device=help`` to list available devices.

``wasapi``
Audio output to the Windows Audio Session API.

Expand Down
4 changes: 4 additions & 0 deletions audio/out/ao.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ extern const struct ao_driver audio_out_opensles;
extern const struct ao_driver audio_out_null;
extern const struct ao_driver audio_out_alsa;
extern const struct ao_driver audio_out_wasapi;
extern const struct ao_driver audio_out_wasapi_spatial;
extern const struct ao_driver audio_out_pcm;
extern const struct ao_driver audio_out_lavc;
extern const struct ao_driver audio_out_sdl;
Expand Down Expand Up @@ -105,6 +106,9 @@ static const struct ao_driver * const audio_out_drivers[] = {
&audio_out_sndio,
#endif
&audio_out_null,
#if HAVE_WASAPI_SPATIAL
&audio_out_wasapi_spatial,
#endif
#if HAVE_COREAUDIO
&audio_out_coreaudio_exclusive,
#endif
Expand Down
2 changes: 2 additions & 0 deletions audio/out/ao_wasapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ char *mp_PKEY_to_str_buf(char *buf, size_t buf_size, const PROPERTYKEY *pkey);
void wasapi_list_devs(struct ao *ao, struct ao_device_list *list);
bstr wasapi_get_specified_device_string(struct ao *ao);
LPWSTR wasapi_find_deviceID(struct ao *ao);
bool wasapi_load_device(struct mp_log *l, IMMDevice **ppDevice,
LPWSTR deviceID);

bool wasapi_thread_init(struct ao *ao);
void wasapi_thread_uninit(struct ao *ao);
Expand Down
Loading
Loading