Add two widely used constants
#define DEFAULT_SAMPLE_RATE 8000 #define DEFAULT_SAMPLES_PER_MS ((DEFAULT_SAMPLE_RATE)/1000) to the main header, and remove equivalent ones from plc.[ch] This will simplify the cleanup of the codec/ and formats/ files. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@15969 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
9fd49cde05
commit
034c8b2f00
|
@ -20,6 +20,9 @@
|
|||
|
||||
#define DEFAULT_LANGUAGE "en"
|
||||
|
||||
#define DEFAULT_SAMPLE_RATE 8000
|
||||
#define DEFAULT_SAMPLES_PER_MS ((DEFAULT_SAMPLE_RATE)/1000)
|
||||
|
||||
#define AST_CONFIG_MAX_PATH 255
|
||||
|
||||
/* provided in asterisk.c */
|
||||
|
|
|
@ -95,8 +95,6 @@ When a real packet is not available in time, call plc_fillin() to create a sythe
|
|||
That's it!
|
||||
*/
|
||||
|
||||
#define SAMPLE_RATE 8000
|
||||
|
||||
/*! Minimum allowed pitch (66 Hz) */
|
||||
#define PLC_PITCH_MIN 120
|
||||
/*! Maximum allowed pitch (200 Hz) */
|
||||
|
|
2
plc.c
2
plc.c
|
@ -56,7 +56,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||
/* We do a straight line fade to zero volume in 50ms when we are filling in for missing data. */
|
||||
#define ATTENUATION_INCREMENT 0.0025 /* Attenuation per sample */
|
||||
|
||||
#define ms_to_samples(t) (((t)*SAMPLE_RATE)/1000)
|
||||
#define ms_to_samples(t) (((t)*DEFAULT_SAMPLE_RATE)/1000)
|
||||
|
||||
static inline int16_t fsaturate(double damp)
|
||||
{
|
||||
|
|
Reference in New Issue