summaryrefslogtreecommitdiffstats
path: root/audio/out
diff options
context:
space:
mode:
Diffstat (limited to 'audio/out')
-rw-r--r--audio/out/ao.c11
-rw-r--r--audio/out/ao.h4
2 files changed, 7 insertions, 8 deletions
diff --git a/audio/out/ao.c b/audio/out/ao.c
index ab94355fa7..c38c04c6a9 100644
--- a/audio/out/ao.c
+++ b/audio/out/ao.c
@@ -26,7 +26,6 @@
#include "ao.h"
#include "internal.h"
#include "audio/format.h"
-#include "audio/audio.h"
#include "options/options.h"
#include "options/m_config.h"
@@ -480,12 +479,12 @@ bool ao_chmap_sel_get_def(struct ao *ao, const struct mp_chmap_sel *s,
// --- The following functions just return immutable information.
-void ao_get_format(struct ao *ao, struct mp_audio *format)
+void ao_get_format(struct ao *ao,
+ int *samplerate, int *format, struct mp_chmap *channels)
{
- *format = (struct mp_audio){0};
- mp_audio_set_format(format, ao->format);
- mp_audio_set_channels(format, &ao->channels);
- format->rate = ao->samplerate;
+ *samplerate = ao->samplerate;
+ *format = ao->format;
+ *channels = ao->channels;
}
const char *ao_get_name(struct ao *ao)
diff --git a/audio/out/ao.h b/audio/out/ao.h
index 211f0e5974..fbbd76fee8 100644
--- a/audio/out/ao.h
+++ b/audio/out/ao.h
@@ -81,7 +81,6 @@ struct ao;
struct mpv_global;
struct input_ctx;
struct encode_lavc_context;
-struct mp_audio;
struct ao *ao_init_best(struct mpv_global *global,
int init_flags,
@@ -89,7 +88,8 @@ struct ao *ao_init_best(struct mpv_global *global,
struct encode_lavc_context *encode_lavc_ctx,
int samplerate, int format, struct mp_chmap channels);
void ao_uninit(struct ao *ao);
-void ao_get_format(struct ao *ao, struct mp_audio *format);
+void ao_get_format(struct ao *ao,
+ int *samplerate, int *format, struct mp_chmap *channels);
const char *ao_get_name(struct ao *ao);
const char *ao_get_description(struct ao *ao);
bool ao_untimed(struct ao *ao);