[asterisk-dev] #define SAMPLE_RATE 8000 somewhere ?

Luigi Rizzo rizzo at icir.org
Thu Feb 23 06:50:57 MST 2006


it is well know that most of asterisk code
assumes the sample rate is 8 KHz. However, i think
the various '8000' (or derived values) hardwired in the code
should be replaced by some #define to make the code easier
to read.

In my branch (team/rizzo/base 10862) i have put the following:

	include/asterisk.h:#define SAMPLE_RATE 8000
	include/asterisk.h:#define SAMPLES_PER_MS  ((SAMPLE_RATE)/1000)

  (note that the SAMPLE_RATE #define is already in plc.h);

Fortunately the change is not very extensive.
Any interest in merging it ? If so i will submit a patch on mantis.

	cheers
	luigi



More information about the asterisk-dev mailing list