diff options
author | wm4 <wm4@nowhere> | 2014-09-04 23:48:27 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-09-05 01:53:10 +0200 |
commit | a7d737a6986446ba921690cc985468534ed8caab (patch) | |
tree | d0b2af92edac2f3ebc2cc25d97046c1c0dcd30f0 /audio/out/ao.c | |
parent | 7ab228629e8184a43782606e9fb0319110c8eee8 (diff) | |
download | mpv-a7d737a6986446ba921690cc985468534ed8caab.tar.bz2 mpv-a7d737a6986446ba921690cc985468534ed8caab.tar.xz |
audio: make buffer size configurable
Really only for testing.
Diffstat (limited to 'audio/out/ao.c')
-rw-r--r-- | audio/out/ao.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/audio/out/ao.c b/audio/out/ao.c index 8e1ceb4bf1..f63f3fd09b 100644 --- a/audio/out/ao.c +++ b/audio/out/ao.c @@ -152,6 +152,7 @@ static struct ao *ao_create(bool probing, struct mpv_global *global, .channels = channels, .format = format, .log = mp_log_new(ao, log, name), + .def_buffer = global->opts->audio_buffer, }; if (ao->driver->encode != !!ao->encode_lavc_ctx) goto error; @@ -187,7 +188,7 @@ static struct ao *ao_create(bool probing, struct mpv_global *global, 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); + ao->buffer = MPMAX(ao->device_buffer, ao->def_buffer * ao->samplerate); MP_VERBOSE(ao, "using soft-buffer of %d samples.\n", ao->buffer); if (ao->api->init(ao) < 0) |