ao: print (estimated) device buffer size on init in verbose mode

This commit is contained in:
wm4 2014-03-14 22:37:19 +01:00
parent c473635f66
commit 16596d025a
1 changed files with 3 additions and 1 deletions

View File

@ -180,8 +180,10 @@ static struct ao *ao_create(bool probing, struct mpv_global *global,
}
ao->bps = ao->samplerate * ao->sstride;
if (!ao->device_buffer && ao->driver->get_space)
if (!ao->device_buffer && ao->driver->get_space) {
ao->device_buffer = ao->driver->get_space(ao);
MP_VERBOSE(ao, "device buffer: %d samples.\n", ao->device_buffer);
}
ao->buffer = MPMAX(ao->device_buffer, MIN_BUFFER * ao->samplerate);
MP_VERBOSE(ao, "using soft-buffer of %d samples.\n", ao->buffer);