Rename 'compander' to 'compandor'

This commit is contained in:
Andreas Eversberg
2016-06-20 19:37:56 +02:00
parent 86daa5a64a
commit 2ee51022f4
14 changed files with 49 additions and 49 deletions

View File

@@ -19,7 +19,7 @@ libcommon_a_SOURCES = \
../common/mncc_sock.c \
../common/cause.c \
../common/emphasis.c \
../common/compander.c \
../common/compandor.c \
../common/sender.c \
../common/display_wave.c \
../common/main_common.c

View File

@@ -1,4 +1,4 @@
/* Compander to use various networks like C-Netz / NMT / AMPS
/* Compandor to use various networks like C-Netz / NMT / AMPS
*
* (C) 2016 by Andreas Eversberg <jolly@eversberg.eu>
* All Rights Reserved
@@ -21,7 +21,7 @@
#include <stdint.h>
#include <string.h>
#include <math.h>
#include "compander.h"
#include "compandor.h"
//#define db2level(db) pow(10, (double)db / 20.0)
@@ -37,12 +37,12 @@
static double sqrt_tab[10000];
/*
* Init compander according to ITU-T G.162 specification
* Init compandor according to ITU-T G.162 specification
*
* Hopefully this is correct
*
*/
void init_compander(compander_t *state, int samplerate, double attack_ms, double recovery_ms, int unaffected_level)
void init_compandor(compandor_t *state, int samplerate, double attack_ms, double recovery_ms, int unaffected_level)
{
int i;
@@ -64,7 +64,7 @@ void init_compander(compander_t *state, int samplerate, double attack_ms, double
sqrt_tab[i] = sqrt(i * 0.001);
}
void compress_audio(compander_t *state, int16_t *samples, int num)
void compress_audio(compandor_t *state, int16_t *samples, int num)
{
int32_t sample;
double value, peak, envelope, step_up, step_down, unaffected;
@@ -114,7 +114,7 @@ void compress_audio(compander_t *state, int16_t *samples, int num)
state->c.peak = peak;
}
void expand_audio(compander_t *state, int16_t *samples, int num)
void expand_audio(compandor_t *state, int16_t *samples, int num)
{
int32_t sample;
double value, peak, envelope, step_up, step_down, unaffected;

View File

@@ -1,4 +1,4 @@
typedef struct compander {
typedef struct compandor {
struct {
double unaffected;
double step_up;
@@ -13,9 +13,9 @@ typedef struct compander {
double peak;
double envelope;
} e;
} compander_t;
} compandor_t;
void init_compander(compander_t *state, int samplerate, double attack_ms, double recovery_ms, int unaffected_level);
void compress_audio(compander_t *state, int16_t *samples, int num);
void expand_audio(compander_t *state, int16_t *samples, int num);
void init_compandor(compandor_t *state, int samplerate, double attack_ms, double recovery_ms, int unaffected_level);
void compress_audio(compandor_t *state, int16_t *samples, int num);
void expand_audio(compandor_t *state, int16_t *samples, int num);