Disabling single channel with libasound

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Good afternoon,

I'm trying to implement functions for capture and playout of PCM audio samples with the libasound API (version 1.0.16-2, under Debian 5.0) and need to limit capture/playback to a single channel - in short, it should be possible to playout/capture PCM samples only through the right or left channel (which can be choosen) of a given audio device, completely ignoring the other channel. Although it would be possible to simply playback/record from both channels and masking the unneeded one by setting the corresponding sample values to a null value, this approach seems rather clumsy to me. It would be preferable to simply configure an audio device with capture/playback limited to either the right or the left channel, returning samples from this channel only (i. e. without interleaved samples from the other channel).

Although I've searched through the ALSA doc, I couldn't find a suitable configuration option for channel choice - maybe I just oversaw it, because I would be rather surprised, if there would be no option to simply turn off an entire channel (or maybe there IS a good reason for this functionality not to exist?).Note that the channel-parameter in the snd_pcm_hw_params_set_channels()-function does not help me because it doesn't allow setting the explicit channel (left or right) from where to capture or playout.

Thanks in advance for all answers,

pk
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user

[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux