[asterisk-dev] #define SAMPLE_RATE 8000 somewhere ?
creslin at digium.com
Thu Feb 23 08:37:21 MST 2006
On Feb 23, 2006, at 8:40 AM, Paul Cadach wrote:
> Luigi Rizzo wrote:
>> include/asterisk.h:#define SAMPLE_RATE 8000
>> include/asterisk.h:#define SAMPLES_PER_MS ((SAMPLE_RATE)/1000)
> Due to existance of codecs with different sample rate it isn't the
> solution to define constant sample rate somewhere
> (outside codebase). Right solution is to provide some sort of
> knoweledge about current sample rate per call/RTP stream.
I must agree; I have already in one of my branches replaced most of
the hard coded 8000 samples per/second assumptions with a variable
which is per-codec dependent field. You can check out my
asterisk-wideband tree from svn to see, though I haven't updated it in
a while. I've just about got done with a codec_g722.c though, so I
should be making more updates to it soon.
More information about the asterisk-dev