Discussion:
[RFC] channels setting
Johannes Weißl
2011-04-26 12:07:16 UTC
Permalink
Hello,

I saw that the following item was added to the TODO list:
- Speaker fill (for 4, 5.1, etc. setups)

How about a new setting "channels" which defaults to 2. cmus will
either downmix (if the input plugin supports that, otherwise just take
the first two channels) or upmix (just simple copy like in pcm.c) the
stream to the requested number. Right now the handling of multichannel
audio is very mixed (some input plugins downmix to stereo, some don't).
What do you think?


Johannes
Philipp Schafft
2011-04-26 13:11:45 UTC
Permalink
reflum,
Post by Johannes Weißl
Hello,
- Speaker fill (for 4, 5.1, etc. setups)
How about a new setting "channels" which defaults to 2. cmus will
either downmix (if the input plugin supports that, otherwise just take
the first two channels) or upmix (just simple copy like in pcm.c) the
stream to the requested number. Right now the handling of multichannel
audio is very mixed (some input plugins downmix to stereo, some don't).
What do you think?
wouldn't this result in the possible case that input and output plugin
supports multichannel and cmus downmixes the data (and the output
upmixes it again)?

I suggest to do the following thing:
Ask the output plugin to open the device with the settings from the
input. If it fails just retry with stereo. Maybe retry with something
confiugrable and not hardcode to stereo. (so the user can for example
ask to try mono if his/her/hir card does only support mono playback
(some external 'fun' devices only support mono)).
--
Philipp.
(Rah of PH2)
Johannes Weißl
2011-04-26 15:26:05 UTC
Permalink
Hello Philipp,
Post by Philipp Schafft
reflum,
Post by Johannes Weißl
Hello,
- Speaker fill (for 4, 5.1, etc. setups)
How about a new setting "channels" which defaults to 2. cmus will
either downmix (if the input plugin supports that, otherwise just take
the first two channels) or upmix (just simple copy like in pcm.c) the
stream to the requested number. Right now the handling of multichannel
audio is very mixed (some input plugins downmix to stereo, some don't).
What do you think?
wouldn't this result in the possible case that input and output plugin
supports multichannel and cmus downmixes the data (and the output
upmixes it again)?
Yes, but only if a user with e.g. 5.1 speakers has channels=2. I guess
that everyone who has such speakers (and want to listen to 5.1) will
change the setting.
Post by Philipp Schafft
Ask the output plugin to open the device with the settings from the
input. If it fails just retry with stereo. Maybe retry with something
confiugrable and not hardcode to stereo. (so the user can for example
ask to try mono if his/her/hir card does only support mono playback
(some external 'fun' devices only support mono)).
Hmm, output plugins almost never fail for any channel setting... how
about a special channels=0 (or channels=-1) to not change the input
channel map? It could even be default.

Currently cmus upmixes always to stereo, so it relies on the sound
server to support mono-only devices.


Johannes
Gregory Petrosyan
2011-04-26 18:08:56 UTC
Permalink
Post by Johannes Weißl
- Speaker fill (for 4, 5.1, etc. setups)
Can you please explain a bit what this entry means?

                Gregory
Johannes Weißl
2011-04-26 18:28:22 UTC
Permalink
Post by Gregory Petrosyan
Post by Johannes Weißl
- Speaker fill (for 4, 5.1, etc. setups)
Can you please explain a bit what this entry means?
I didn't add the entry, so I don't know what it really means. I thought
it means to add additional (identical) channels to stereo, so that all 5
speakers generate sound.

Anyway, current solution isn't satisfying, because we downmix some
formats to stereo (where the library supports it), and some not. There
should definitely be an option to control that (originally I wanted to
call it "downmix_stereo", but with this new feature request it could be
made more common).


Johannes

Loading...