mozilla / cubeb

Cross platform audio library
ISC License
442 stars 126 forks source link

cubeb_oss: changes to buffering logic #673

Closed khng300 closed 2 years ago

khng300 commented 2 years ago

The change is to reduce the number of dropped frames when playing YouTube videos. The most significant part is to set trigger threshold to be low enough, such that as long as the audio hardware's DMA engine moves data the callback is triggered without waiting longer. Besides that, unify osswait*fd_for_space() for both directions into a single function. Buffer size is also not required to match the other direction.

Sponsored by: The FreeBSD Foundation

kinetiknz commented 2 years ago

Thanks!