Distorted audio with g722

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

 



On Tue, Dec 8, 2009 at 1:15 PM, Saul Ibarra Corretge
<saul at ag-projects.com> wrote:
>
> As I don't know if this can be detected at runtime, I suggest this fix was applied according to a configuration option (if possible) or a define which can be selected at compile time. What are your thoughts on this?
>
>

Rather than compile time switch, it's probably more usable (and easier
too!) to have a run-time setting for this so that you could turn it
on/off in the GUI. The new APIs would be in pjmedia-codec/g722.h, and
it could look like this:

PJ_DECL(void) pjmedia_codec_g722_set_scaling(int bits);
PJ_DECL(int) pjmedia_codec_g722_get_scaling(void);

where "bits" means the amount of bits to shift during
encoding/decoding. Then just chance the hardcoded "2" bits shifting in
g722_dec_decode() and g722_enc_encode() to use this value.

Patch welcome. ;-)

Cheers
 Benny



[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