The channels was hard coded to 2 instead of what was passed in (Otherwise probably should return an error)
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.
This bugfix goes after 2 issues;