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/push.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/push.c')
-rw-r--r-- | audio/out/push.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/out/push.c b/audio/out/push.c index 95df7dfb56..4a1f2a06c4 100644 --- a/audio/out/push.c +++ b/audio/out/push.c @@ -168,11 +168,11 @@ static int unlocked_get_space(struct ao *ao) int space = mp_audio_buffer_get_write_available(p->buffer); if (ao->driver->get_space) { // The following code attempts to keep the total buffered audio to - // MIN_BUFFER/2+device_buffer in order to improve latency. + // def_buffer/2+device_buffer in order to improve latency. int device_space = ao->driver->get_space(ao); int device_buffered = ao->device_buffer - device_space; int soft_buffered = mp_audio_buffer_samples(p->buffer); - int min_buffer = MIN_BUFFER / 2 * ao->samplerate + ao->device_buffer; + int min_buffer = ao->def_buffer / 2 * ao->samplerate + ao->device_buffer; int total_buffer = device_buffered + soft_buffered; int missing = min_buffer - total_buffer; space = MPMIN(space, missing); |