From 824e4982bd18d1812c08bef6ba74cf2ad6601317 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 15 Apr 2014 22:54:42 +0200 Subject: player: remove audio waiting The audio subsystem now wakes up the playback thread explicitly, and we don't need this anymore. It still could cause dropouts and such if there are bugs in the recently introduced audio changes, so this is a thing to watch out for. --- player/playloop.c | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'player') diff --git a/player/playloop.c b/player/playloop.c index 707dc6de5c..84da8d231a 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -1250,24 +1250,8 @@ void run_playloop(struct MPContext *mpctx) } if (!mpctx->stop_play) { - double audio_sleep = 9; if (mpctx->restart_playback) sleeptime = 0; - if (mpctx->d_audio && !mpctx->paused) { - if (ao_untimed(mpctx->ao)) { - if (!video_left) - audio_sleep = 0; - } else if (full_audio_buffers) { - audio_sleep = buffered_audio - 0.050; - // Keep extra safety margin if the buffers are large - if (audio_sleep > 0.100) - audio_sleep = MPMAX(audio_sleep - 0.200, 0.100); - else - audio_sleep = MPMAX(audio_sleep, 0.020); - } else - audio_sleep = 0.020; - } - sleeptime = MPMIN(sleeptime, audio_sleep); if (sleeptime > 0) { if (handle_osd_redraw(mpctx)) sleeptime = 0; -- cgit v1.2.3