Re: [PATCH] Fix Speex Resampler multi channel mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Nanang,

in the header documentation [1] the in_len and out_len parameters for speex_resampler_process_interleaved_int() are documented as "This is all per-channel" which I read as *_len represents the number of samples per channel. Therefore, I think the number of channels must be respected in the samples_per_frame counts. We use a stereo setup that uses the Speex resampler (because of the licensing restrictions of libresample) and with the patch applied the resampler works flawless in stereo mode. Without the patch we got completely garbled sound.

As far as I can say, after these simple patches, we didn't have any problems using the Speex resampler. It's stable and the quality also seems to be very good. I think the resampler is a very good alternative for the people that can't use libresample.

Regards
Tobias

[1] ./pjproject/pjproject-2.6/third_party/speex/include/speex/speex_resampler.h

--

Lindenbaum GmbH
Dipl.-Inform. Tobias Schlager, Software Engineer
Erbprinzenstr. 4-12, 76133 Karlsruhe, Deutschland
Tel: +49 721 48 08 48 - 000, Fax: +49 721 48 08 48 - 801,
E-Mail: tobias.schlager@xxxxxxxxxxxxx

Firmensitz: Erbprinzenstr. 4-12, Eingang A, 76133 Karlsruhe
Registergericht: Amtsgericht Mannheim, HRB 706184
Geschäftsführer: Dr. Ralf Nikolai
Steuernummer: 35007/02060, USt. ID: DE 263797265

http://www.lindenbaum.eu



Von: pjsip [pjsip-bounces@xxxxxxxxxxxxxxx]" im Auftrag von "Nanang Izzuddin [nanang@xxxxxxxxx]
Gesendet: Donnerstag, 10. August 2017 08:57
An: pjsip list
Betreff: Re: [PATCH] Fix Speex Resampler multi channel mode

Hi Tobias,

The speex_resampler_process_interleaved_int() seems to take (and return) number of samples *of all channels*, so 'in_samples_per_frame' and 'out_samples_per_frame' should be set as samples of all channels too (instead of samples of one channel as represented in the patch). So IMO the current code is also suitable for multiple channels already. Please feel free to clarify if you think otherwise.

BR,
nanang


On Wed, Aug 9, 2017 at 1:56 PM, Tobias Schlager <Tobias.Schlager@xxxxxxxxxxxxx> wrote:
Hi all,

this patch fixes the Speex resampler multi channel mode (e.g. stereo) by fixing the sample count calculation (which didn't resect the current channel count).

Regards
Tobias



_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org


_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux