1
mirror of https://github.com/mpv-player/mpv synced 2024-11-14 22:48:35 +01:00

audio: remove delay debug logging

Some absurd useless stuff.
This commit is contained in:
wm4 2020-08-23 11:17:14 +02:00
parent b0f0be7678
commit c9c01a07f8
2 changed files with 0 additions and 28 deletions

View File

@ -200,7 +200,6 @@ void reset_audio_state(struct MPContext *mpctx)
}
mpctx->audio_status = mpctx->ao_chain ? STATUS_SYNCING : STATUS_EOF;
mpctx->delay = 0;
mpctx->audio_stat_start = 0;
}
void uninit_audio_out(struct MPContext *mpctx)
@ -573,31 +572,11 @@ static int write_to_ao(struct MPContext *mpctx, uint8_t **planes, int samples,
if (played > 0) {
mpctx->shown_aframes += played;
mpctx->delay += played / real_samplerate;
mpctx->written_audio += played / (double)samplerate;
return played;
}
return 0;
}
static void dump_audio_stats(struct MPContext *mpctx)
{
if (!mp_msg_test(mpctx->log, MSGL_STATS))
return;
if (mpctx->audio_status != STATUS_PLAYING || !mpctx->ao || mpctx->paused) {
mpctx->audio_stat_start = 0;
return;
}
double delay = ao_get_delay(mpctx->ao);
if (!mpctx->audio_stat_start) {
mpctx->audio_stat_start = mp_time_us();
mpctx->written_audio = delay;
}
double current_audio = mpctx->written_audio - delay;
double current_time = (mp_time_us() - mpctx->audio_stat_start) / 1e6;
MP_STATS(mpctx, "value %f ao-dev", current_audio - current_time);
}
// Return the number of samples that must be skipped or prepended to reach the
// target audio pts after a seek (for A/V sync or hr-seek).
// Return value (*skip):
@ -797,8 +776,6 @@ void fill_audio_out_buffers(struct MPContext *mpctx)
struct MPOpts *opts = mpctx->opts;
bool was_eof = mpctx->audio_status == STATUS_EOF;
dump_audio_stats(mpctx);
if (mpctx->ao && ao_query_and_reset_events(mpctx->ao, AO_EVENT_RELOAD))
reload_audio_output(mpctx);
@ -983,8 +960,6 @@ void fill_audio_out_buffers(struct MPContext *mpctx)
assert(played >= 0 && played <= samples);
mp_audio_buffer_skip(ao_c->ao_buffer, played);
dump_audio_stats(mpctx);
mpctx->audio_status = STATUS_PLAYING;
if (audio_eof && !playsize) {
mpctx->audio_status = STATUS_DRAINING;

View File

@ -379,9 +379,6 @@ typedef struct MPContext {
double last_frame_duration;
// Video PTS, or audio PTS if video has ended.
double playback_pts;
// audio stats only
int64_t audio_stat_start;
double written_audio;
int last_chapter;