summaryrefslogtreecommitdiffstats
path: root/audio/out/ao.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-06-09 16:49:05 +0200
committerwm4 <wm4@nowhere>2020-06-09 16:49:05 +0200
commitd5de79d10f895aaa8f65340adf949d28bc09b2d7 (patch)
tree5dfa06599d2d3925d1cd5efd4fd78159e1fb59d7 /audio/out/ao.c
parent0fb02f181f3df9e8336939b42c3412e01fb60427 (diff)
downloadmpv-d5de79d10f895aaa8f65340adf949d28bc09b2d7.tar.bz2
mpv-d5de79d10f895aaa8f65340adf949d28bc09b2d7.tar.xz
audio: require certain AOs to set device_buffer
AOs which use the "push" API must set this field now. Actually, this was sort of always required, but happened to work anyway. The future intention is to use device_buffer as the pre-buffer amount, which has to be available right before audio playback is started. "Pull" AOs really need this too conceptually, just that the API is underspecified. From what I can see, only ao_null did not do this yet.
Diffstat (limited to 'audio/out/ao.c')
-rw-r--r--audio/out/ao.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/audio/out/ao.c b/audio/out/ao.c
index 9ac42806e4..32ffc3d82d 100644
--- a/audio/out/ao.c
+++ b/audio/out/ao.c
@@ -236,7 +236,7 @@ static struct ao *ao_init(bool probing, struct mpv_global *global,
}
ao->bps = ao->samplerate * ao->sstride;
- if (ao->device_buffer < 0 && ao->driver->write) {
+ if (ao->device_buffer <= 0 && ao->driver->write) {
MP_ERR(ao, "Device buffer size not set.\n");
goto fail;
}