diff options
Diffstat (limited to 'audio/out')
-rw-r--r-- | audio/out/ao.c | 8 | ||||
-rw-r--r-- | audio/out/internal.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/audio/out/ao.c b/audio/out/ao.c index ef228780f8..b94e459091 100644 --- a/audio/out/ao.c +++ b/audio/out/ao.c @@ -29,6 +29,7 @@ #include "audio/format.h" #include "audio/audio.h" +#include "input/input.h" #include "options/options.h" #include "options/m_config.h" #include "common/msg.h" @@ -406,6 +407,13 @@ bool ao_chmap_sel_get_def(struct ao *ao, const struct mp_chmap_sel *s, return mp_chmap_sel_get_def(s, map, num); } +// Request that the player core destroys and recreates the AO. +void ao_request_reload(struct ao *ao) +{ + const char *cmd[] = {"ao_reload", NULL}; + mp_input_run_cmd(ao->input_ctx, cmd); +} + // --- The following functions just return immutable information. void ao_get_format(struct ao *ao, struct mp_audio *format) diff --git a/audio/out/internal.h b/audio/out/internal.h index cebc265f04..fd45a4a581 100644 --- a/audio/out/internal.h +++ b/audio/out/internal.h @@ -183,6 +183,8 @@ bool ao_chmap_sel_adjust(struct ao *ao, const struct mp_chmap_sel *s, bool ao_chmap_sel_get_def(struct ao *ao, const struct mp_chmap_sel *s, struct mp_chmap *map, int num); +void ao_request_reload(struct ao *ao); + // Add a deep copy of e to the list. // Call from ao_driver->list_devs callback only. void ao_device_list_add(struct ao_device_list *list, struct ao *ao, |