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 | 235 | if (p->playing) { |
| 236 | 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 | 242 | if (!sio_stop(p->hdl)) { |
| 239 | 243 | MP_ERR(ao, "reset: couldn't sio_stop()\n"); |
| 244 | +#endif | |
| 240 | 245 | } |
| 241 | 246 | p->delay = 0; |
| 242 | 247 | if (!sio_start(p->hdl)) { |
| @@ -857,6 +857,7 @@ endif · 856 unmodified lines | ||
| 857 | 857 | |
| 858 | 858 | sndio = dependency('sndio', required: get_option('sndio')) |
| 859 | 859 | features += {'sndio': sndio.found()} |
| 860 | +features += {'sndio-1-9': sndio.version().version_compare('>= 1.9.0')} | |
| 860 | 861 | if features['sndio'] |
| 861 | 862 | dependencies += sndio |
| 862 | 863 | sources += files('audio/out/ao_sndio.c') |