quiniouben / vban

VBAN protocol open-source implementation
GNU General Public License v3.0
450 stars 63 forks source link

Select more channels ? #3

Closed natcl closed 7 years ago

natcl commented 8 years ago

I see the Vban protocol can support 8 channels. I understand the this receptor is limited to 2 channels but would it be possible to receive more than 2 channels and tell the receptor to select any of those 8 channels ?

Thanks !

quiniouben commented 8 years ago

Actually, this receptor will try to open the "default" Alsa device with a configuration corresponding to the incoming stream. Therefore, it will try (and probably fail) to open it with 8 channels if the stream has 8 channels. This is surely a good idea to improve this behavior. Thank you for your feedback.

natcl commented 8 years ago

Do you know how to change the default card ? I can't seem to make it ouput on my USB soundcard on a Raspberry pi. Thanks !

natcl commented 8 years ago

Was able to change my default soundcard. Works fine with 2 channels but doesn't seem to work at all when I try more than 4 channels.

quiniouben commented 8 years ago

I am glad to know you could have audio. I am not surprised that > 2 channels streams don't play correctly : most (well, all...) Alsa devices are mono / stereo. So your first comment is correct : vban_receptor is not really able to play something else than mono or stereo stream, because Alsa devices are not. I keep this enhancement request open until this situation improves.

EDIT: ok, sorry, Alsa multichannel output is not so rare, it's only that default output is very often the stereo one.

natcl commented 8 years ago

Thanks, and just as general information, I was able to get 8 channels working on the pi with that specific soundcard using Pure Data, not sure how they manage the output but that seemed to work. Perhaps they use portaudio ?

Thanks !

quiniouben commented 8 years ago

Thanks for your tip. As edited in my latest above comment, it's because vban_receptor only uses the "default" output. One first enhancement would be to give the choice of the output to the user in command line parameter. About more features, the root informations comes from VB-Audio who specified VBAN protocol : http://vbaudio.jcedeveloppement.com/forum/viewforum.php?f=9

quiniouben commented 8 years ago

As stated in issue #6 latest comment, output device selection has been added.

highgain86j commented 8 years ago

@quiniouben Many thanks to your work. People must try and love this stuff if they haven't by now.

quiniouben commented 7 years ago

I just commited the option to select channels from the incoming stream. the option is -cLIST_OF_CHANNELS where LIST_OF_CHANNELS is a comma separated list of channels counting from 1. Examples: 1- if you receive a stream from which you want to only take channel 1 and open audio in mono, simply do:

vban_receptor -iIP_ADDRESS -pPORT -sSTREAMNAME -c1

2- If you want to keep channel 1 only but open your audio output in stereo:

vban_receptor -iIP_ADDRESS -pPORT -sSTREAMNAME -c1,1

3- If you want to take channels 3 and 4 and make a stereo pair but inverted:

vban_receptor -iIP_ADDRESS -pPORT -sSTREAMNAME -c4,3

and so on. enjoy