[pulseaudio-discuss] [PATCH] add module-virtual-surround-sink

Niels Ole Salscheider niels_ole at salscheider-online.de
Wed Mar 7 05:53:11 PST 2012


> One minor thing that could be fixed is the naming (sink name and
> description, and sink input description). Currently they are copied from
> module-virtual-sink, and they could be modified to include the word
> "surround" in some way.

> I don't think this error can happen anymore. Both hrir_map.channels and
> u->hrir_channels seem to originate from pa_sound_file_load(), and that
> function shouldn't return inconsistent sample specs and channel maps
> (otherwise it's buggy).

Both fixed.

> I think this is buggy. I think that even if you successfully find a
> channel for each item in mapping_left, some channels can be left
> uninitialized in mapping_right, if the hrir file doesn't have a
> "symmetrical" channel map. So, it should be checked that a channel has
> been found for both mappings.

You are right. I wrongly assumed that the hrir file is always symmetric. I have 
fixed it and attached an updated patch.

> That was my idea, but I'm not so sure about that anymore. I'm not
> confident that it's safe to remap the hrir contents. But what is the use
> case for having a different channel map for the sink than what is in the
> hrir file? To me it would sound sensible to just use the hrir file
> channel map for the sink, and drop the configurability. I know that I
> recommended earlier to have the channel map configurable...
> Hmm... The main motivation for me to push for matching sink and hrir
> channel maps has been that I'd like to get rid of the mapping_left and
> mapping_right variables, but actually I think it's not possible to
> achieve that, because whatever the channel map, it still has to be
> treated differently for the left and the right ear... So, in conclusion,
> feel free to keep the code as is, if you want to keep the
> configurability.

We either have to keep the mapping (at least for the right ear) or store two 
float arrays, one for the left and one for the right ear.
I do not have a strong preference either way. But if we decide to keep the 
mapping for the right ear we can as well keep the one for the left ear and 
leave the channel map configurable. I neither have a use case for this, though.
What approach do you prefer?



More information about the pulseaudio-discuss mailing list