On Tue, Oct 30, 2018 at 07:50:07PM +0200, Jari Vetoniemi wrote: > Thank you for clearing that up. > > It's indeed weird that PCSX2 (which uses SDL) works in non-blocking > mode. Both wine and SDL doesn't even poll the ALSA file descriptors, > they just spawn a thread and do their own audio timing there (writing in > a loop). SDL even has thread for handling alsa hotplugs. > > This indeed sounds like a bad idea, but that's what they do. Forcing > blocking operation makes the sound work for wine. I wonder if the > NONBLOCKing in alsa means something else than nonblocking write/read. > The project's poorly documented so I have to go do some source digging. FWIW, blocking is not bad for audio. Blocking sio_write() just means that when there's nothing audio-related to do, the thread doesn't run and thus loses the opportunity to do something unrelated to audio. Non-blocking mode is to let the thead the opportunity to do something else. If there's nothing else to do (example, because this is the thread dedicated to audio), the the blocking mode is the most appropriate.Received on Tue Oct 30 2018 - 18:57:04 CET
This archive was generated by hypermail 2.3.0 : Tue Aug 09 2022 - 16:23:47 CEST