[asterisk-dev] adding codec+format
Tilghman Lesher
tilghman at meg.abyt.es
Tue Mar 27 12:27:12 CDT 2012
On Tue, Mar 27, 2012 at 6:12 AM, Beñat Urteaga <burteaga at traintic.com> wrote:
>>On 03/23/2012 07:23 AM, Beñat Urteaga wrote:
>>> I'm using asterisk 1.8.8.4 and I'd like to add an audio codec and format
>>> in order to be able to send audio to my end SIP devices at a 8 bit 24
>>> kHz. The devices of course support it. How could I get this? I guess I
>>> should add codec_whatever.c and format_whatever.c files to the source
>>> code directories, but: must I add anything else? For example, may be a
>>> SDP negotiation may need to be made, so I should add something else
>>> apart from the codec and format files?
>>>
>>> I think format_pcm.c and codec_ulaw.c could be a good starting point
>>> (example), but do you recommend something different?
>>>
>>> Any help would be much appreciated!!
>
>>Search the source code for references to G722 (not case sensitive) and
>>that will give you an idea of all the places you'll need to look at and
>>possibly modify to support a new format.
>
>>That sounds like a very odd audio format though. Is it really 8-bit PCM
>>with a 24kHz sample rate?
>
> Hi again! I know it's an odd audio format but it's the best quality we can get with our own devices.
> However, I've been looking at the codec_g722.c, g722.h, g722_encode.c and g722_decode.c files and I'm still quite lost... :S
> Should I leave all the values in coder-decoder parameters (q6[32], iln[32], ilp[32], wl[8]...) as they are? Where is the place where I can change the samplerate to 24 kHz?
>
> Sorry but I'm not an expert programmer and there're some things that I can't get to understand...
You may be interested in taking a course on audio encoding at your
local college. At this point, the problem is that how the data
encodes audio is indistinguishable from magic for you. You're going
to have to get past that point in order for anything else we say here
to make any sense whatsoever. Or hire someone who understands this.
We are talking on two completely different levels, and you need the
higher level to understand where to go from here.
-Tilghman
More information about the asterisk-dev
mailing list