[pulseaudio-discuss] Crash and/or distortion when remapping a remapped sink.
lennart at poettering.net
Sat Aug 8 07:39:04 PDT 2009
On Sat, 08.08.09 13:42, Colin Guthrie (gmane at colin.guthr.ie) wrote:
>> The distortion is probably caused because the handling of having two
>> mono channels is not what you expect. i.e. we probably just add them,
>> effectively amplifiyng the original signal 2x, which might easily
>> trigger clipping.
>> If you run PA in debug mode the resamplers/remixers will dump a little
>> table that tells you how each input channel is added up for the output
>> channels. Could you please find out that table and check out if that
>> triggers your problem? (i.e. both input mono channels are multiplied
>> by factor 1.0 instead of 0.5?)
> Here's the full output.
> From what I can see, yes when the second sink is loaded there is a
> factor of 1.0 involved.
> I presume there is no way to do what I originally wanted? (Incidentally
> I don't specifically want this... it was more an experiment for a user
> on the list who wanted to mix everything to the left channel but still
> have a balance control - he was deaf in one ear).
When we mix channels, we just add them up. Normally that is the right
thing to do. This might cause clipping but as long as the two signals
are sufficientlly different this doesn't happen too often. However if
you sum up two identical signals you amplify them 2x.
Now, the resampler/remixer doesn't know if your two signals are the
same. So the current vehaviour is not really wrong and I wouldn't
consider it a bug.
Now, I am not really sure why you want to do what ou want to do with
two levels of remap sinks anyway. You should be able to do with just one:
sink_name=fakestereo channels=2 channel_map=left,right master=alsa_output.pci-0000_00_1b.0.analog-stereo master_channel_map=left,left
This will simply rename the L and R channels into two L channels.
Lennart Poettering Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/ GnuPG 0x1A015CC4
More information about the pulseaudio-discuss