1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-28 10:02:17 +00:00

ao_sndio: use sio_flush() to improve controls responsiveness

Use sio_flush() instead of sio_stop() to improve controls responsiveness.
This commit is contained in:
Alexandre Ratchov 2023-07-24 16:01:25 -04:00 committed by Dudemanguy
parent b7bf5e619f
commit 1bbc7a2cd0
2 changed files with 6 additions and 0 deletions

View File

@ -235,8 +235,13 @@ static void reset(struct ao *ao)
if (p->playing) {
p->playing = false;
#if HAVE_SNDIO_1_9
if (!sio_flush(p->hdl)) {
MP_ERR(ao, "reset: couldn't sio_flush()\n");
#else
if (!sio_stop(p->hdl)) {
MP_ERR(ao, "reset: couldn't sio_stop()\n");
#endif
}
p->delay = 0;
if (!sio_start(p->hdl)) {

View File

@ -857,6 +857,7 @@ endif
sndio = dependency('sndio', required: get_option('sndio'))
features += {'sndio': sndio.found()}
features += {'sndio-1-9': sndio.version().version_compare('>= 1.9.0')}
if features['sndio']
dependencies += sndio
sources += files('audio/out/ao_sndio.c')