From 41f2b26d11e81095a0d8d370480e0d2459208070 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 7 Mar 2014 15:24:32 +0100 Subject: audio/out: make ao struct opaque We want to move the AO to its own thread. There's no technical reason for making the ao struct opaque to do this. But it helps us sleep at night, because we can control access to shared state better. --- player/loadfile.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'player/loadfile.c') diff --git a/player/loadfile.c b/player/loadfile.c index 7cfaf67978..657c950f32 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -178,14 +178,14 @@ void uninit_player(struct MPContext *mpctx, unsigned int mask) if (opts->gapless_audio || mpctx->stop_play == AT_END_OF_FILE) { drain = true; struct mp_audio data; - mp_audio_buffer_peek(ao->buffer, &data); - int samples = ao->buffer_playable_samples; + mp_audio_buffer_peek(mpctx->ao_buffer, &data); + int samples = mpctx->ao_buffer_playable_samples; assert(samples <= data.samples); if (samples > 0) { int played = ao_play(ao, data.planes, samples, AOPLAY_FINAL_CHUNK); if (played < samples) - MP_WARN(ao, "Audio output truncated at end.\n"); + MP_WARN(mpctx, "Audio output truncated at end.\n"); } } ao_uninit(ao, drain); -- cgit v1.2.3