commit 6ab49178eb5f263e369fa6682183c4008b5c0c7f sin <sin@2f30.org> 2014-12-31 18:10:30 +0000 We can only handle 16-bit on the outputs at the moment
alsa.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/alsa.c b/alsa.c index cb6620f..c990293 100644 --- a/alsa.c +++ b/alsa.c @@ -65,6 +65,11 @@ alsaopen(Format *fmt) snd_pcm_format_t format = SND_PCM_FORMAT_S16_LE; int r; + if (fmt->bits != 16) { + warnx("unsupported number of bits"); + return -1; + } + if ((r = snd_pcm_open(&hdl, device, SND_PCM_STREAM_PLAYBACK, 0)) < 0) { warnx("snd_pcm_open: %s\n", snd_strerror(r)); return -1;