Re: Playing multichannel audio files

Rodolfo Medina <[email protected]>
Newsgroups gmane.comp.audio.sox
Message-ID <[email protected]>
Rodolfo Medina <[email protected]> writes:

> Jeremy Nicoll - ml sox users <[email protected]> writes:
>
>> On 2018-03-06 09:08, Rodolfo Medina wrote:
>>> Hi all sox users.
>>>
>>> I have a multichannel audio file: suppose three channels.  What I want is
>>> to listen to that file by listening to each of those channels through a
>>> different loud speaker.  In order to do so, I imagine
>
> ...though I may be wrong...
>
>
>>> each channel being sent to a different sound card.  Can sox perform that,
>>> and how?  In sox manual I couldn't find an answer.
>>
>> What sound hardware does your computer have?  Do you actually have more than
>> one soundcard?
>>
>> Since you posted on Debian-Users, is there a way in Debian to list what these
>> separate sound devices' names are?
>
> Two different soundcards, and three devices, seem to be detected:
>
> $ arecord -l
> **** List of CAPTURE Hardware Devices ****
> card 1: Generic [HD-Audio Generic], device 0: ALC662 rev3 Analog [ALC662 rev3
> Analog]
>   Subdevices: 1/1
>   Subdevice #0: subdevice #0
> card 1: Generic [HD-Audio Generic], device 2: ALC662 rev3 Alt Analog [ALC662
> rev3 Alt Analog]
>   Subdevices: 1/1
>   Subdevice #0: subdevice #0
> card 2: Device [USB Audio Device], device 0: USB Audio [USB Audio]
>   Subdevices: 0/1
>   Subdevice #0: subdevice #0
>
>
>> Do you have a way (forgetting your audio file for a moment) of getting sound
>> out to three separate places?
>
> If I could have sox (or any other software) send different channel outputs to
> different soundcards, I could think of plugging a loud speaker into each
> soundcard and so getting sound out to three separate places...
>
>
>> Do you have any other sound-playing software?
>
> I normally use mplayer to play sound.


Since sox can split a three-channel file into three one-channel files, the
problem is virtually solved once we manage to send two audio outputs into two
different audio cards.  This seems to be done simply with `&&', e.g:

 $ mplayer -ao alsa:device=hw=2.0 file1.wav && mplayer file2.wav

, but unfortunately only one output is heard at a time...

Rodolfo

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.