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

Niels Ole Salscheider niels_ole at salscheider-online.de
Sat Feb 25 03:27:44 PST 2012


Hello,

> The resampling is only done at initialization time, so you could use the
> memchunk only locally in pa__init() and copy the data to a plain float
> array in userdata. But I'm not saying that that is necessarily better -
> if you prefer storing the memchunk in userdata, that's ok.

I changed it.

> I had a look at some WAVE documentation[1], and it seems that the file
> may or may not have the channel map information. The channel map
> information is included with files that use the "extensible format". The
> documentation says that the extensible format should be used whenever
> the file contains more than 2 channels. It's still not a strict
> requirement.
[...]

You are right, the impulse response files did not use the "extensible format". 
I changed this for my impulse responses and now it works as expected.
I think we should just require that the impulse response file uses the 
extensible format.

> > And aren't hrir_ss and hrir_map redundant
> > anyway - shouldn't the hrir sample spec and channel map be the same as
> > what the sink has?

I do not think that they are redundant. The sink's sample spec and channel map 
default to the hrir's but they still can be overwritten by the user.

However, I could modify the hrir_data afterwards so that they match if you 
prefer that solution.

> This isn't really good enough for handling NULL hrir_file. If hrir_file
> is NULL, pa_sound_file_load() won't be called, and that's not good.
> There should be something like this:
> 
> if (!(hrir_file = pa_modargs_get_value(ma, "hrir", NULL))) {
>     pa_log("The mandatory 'hrir' module argument is missing.");
>     goto fail;
> }

Fixed.

> hrir_temp_chunk.memblock needs to be set to NULL here, otherwise in case
> of failure it will be unreffed twice.

Fixed.

I have attached a new version of the patch.

Regards,

Ole


More information about the pulseaudio-discuss mailing list