diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-05-26 03:33:13 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-05-26 03:33:13 +0200 |
commit | 8d3f8a67a0fba847a9ef95fe93f2ca582067db8c (patch) | |
tree | d2917aefe10f77899cea2bdc3c2d457db921bbbb /src/alsa.c | |
parent | 65837e669bf8b02819f02db9d7d21a47babe1356 (diff) |
alsa: disable multichannel support for alsa
Diffstat (limited to 'src/alsa.c')
-rw-r--r-- | src/alsa.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -233,6 +233,11 @@ static int open_alsa(ca_context *c, struct outstanding *out) { ca_return_val_if_fail(c->private, CA_ERROR_STATE); ca_return_val_if_fail(out, CA_ERROR_INVALID); + /* In ALSA we need to open different devices for doing + * multichannel audio. This cnnot be done in a backend-independant + * wa, hence we limit ourselves to mono/stereo only. */ + ca_return_val_if_fail(ca_sound_file_get_nchannels(out->file) <= 2, CA_ERROR_NOTSUPPORTED); + p = PRIVATE(c); if ((ret = snd_pcm_open(&out->pcm, c->device ? c->device : "default", SND_PCM_STREAM_PLAYBACK, 0)) < 0) |