Use sio_flush() instead of sio_stop() to improve controls responsiveness.
Unified · Split
| @@ -235,8 +235,13 @@ static void reset(struct ao *ao) · 234 unmodified lines | |||
| 235 | if (p->playing) { | 235 | if (p->playing) { |
| 236 | p->playing = false; | 236 | p->playing = false; |
| 237 | 237 | ||
| 238 | #if HAVE_SNDIO_1_9 | ||
| 239 | if (!sio_flush(p->hdl)) { | ||
| 240 | MP_ERR(ao, "reset: couldn't sio_flush()\n"); | ||
| 241 | #else | ||
| 238 | if (!sio_stop(p->hdl)) { | 242 | if (!sio_stop(p->hdl)) { |
| 239 | MP_ERR(ao, "reset: couldn't sio_stop()\n"); | 243 | MP_ERR(ao, "reset: couldn't sio_stop()\n"); |
| 244 | #endif | ||
| 240 | } | 245 | } |
| 241 | p->delay = 0; | 246 | p->delay = 0; |
| 242 | if (!sio_start(p->hdl)) { | 247 | if (!sio_start(p->hdl)) { |
| @@ -857,6 +857,7 @@ endif · 856 unmodified lines | |||
| 857 | 857 | ||
| 858 | sndio = dependency('sndio', required: get_option('sndio')) | 858 | sndio = dependency('sndio', required: get_option('sndio')) |
| 859 | features += {'sndio': sndio.found()} | 859 | features += {'sndio': sndio.found()} |
| 860 | features += {'sndio-1-9': sndio.version().version_compare('>= 1.9.0')} | ||
| 860 | if features['sndio'] | 861 | if features['sndio'] |
| 861 | dependencies += sndio | 862 | dependencies += sndio |
| 862 | sources += files('audio/out/ao_sndio.c') | 863 | sources += files('audio/out/ao_sndio.c') |