jarikomppa / soloud

Free, easy, portable audio engine for games
http://soloud-audio.com
Other
1.69k stars 270 forks source link

[Bugfix][ALSA]Fixes a bug where snd_pcm_writei will hang the mix thread #364

Open bradc6 opened 1 year ago

bradc6 commented 1 year ago

This bugfix goes after 2 issues;

  1. The channels was hard coded to 2 instead of what was passed in (Otherwise probably should return an error)
  2. Ensure that there is IO available to write to the ALSA device before we write, otherwise we will hang. This behavior occurs for me when using pulseaudio's ALSA plugin.