Port audio output from OSS to libao #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First of all, thank you for your awesome tools. I wanted to try fbff, but I use sndio (which in turn uses alsa-lib on linux). It turns out libao can output audio data to a variety of sound devices, including alsa, oss, sndio, and PulseAudio; it also provides a pretty simple api. I was pleasantly surprised how few changes were necessary, so I thought I'd share.
Libao has its own configuration file to select which output driver to use. Users can have their own configuration file if they wish.
I've tested these changes using sndio and the default alsa configuration on my computer. I have no reason to think that this wouldn't work for oss or PulseAudio users either provided they have it configured. Instead of using OSSDSP environment variable, an oss user would need to add a dev option in their libao configuration if using something other than /dev/dsp or /dev/sound/dsp.