summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAlfred E. Heggestad <aeh@db.org>2016-05-01 21:01:27 +0200
committerAlfred E. Heggestad <aeh@db.org>2016-05-01 21:01:27 +0200
commitb839fce160d88ed93846af45fe34f655fe80c682 (patch)
tree788b7fdd6c00b9ef79fc596f8cd74c597f04a82a /modules
parent5148e7def697fc91d2ff7ec812d07b665f65397d (diff)
aucodec: split srate into srate and crate (Clock Rate)
Diffstat (limited to 'modules')
-rw-r--r--modules/amr/amr.c4
-rw-r--r--modules/bv32/bv32.c2
-rw-r--r--modules/codec2/codec2.c1
-rw-r--r--modules/g711/g711.c4
-rw-r--r--modules/g722/g722.c2
-rw-r--r--modules/g7221/g7221.c1
-rw-r--r--modules/g726/g726.c8
-rw-r--r--modules/gsm/gsm.c2
-rw-r--r--modules/ilbc/ilbc.c2
-rw-r--r--modules/isac/isac.c4
-rw-r--r--modules/l16/l16.c16
-rw-r--r--modules/mpa/mpa.c3
-rw-r--r--modules/opus/opus.c1
-rw-r--r--modules/silk/silk.c2
-rw-r--r--modules/speex/speex.c12
15 files changed, 34 insertions, 30 deletions
diff --git a/modules/amr/amr.c b/modules/amr/amr.c
index 74e353a..0596812 100644
--- a/modules/amr/amr.c
+++ b/modules/amr/amr.c
@@ -292,7 +292,7 @@ static int decode_nb(struct audec_state *st, int16_t *sampv,
#ifdef AMR_WB
static struct aucodec amr_wb = {
- LE_INIT, NULL, "AMR-WB", 16000, 1, NULL,
+ LE_INIT, NULL, "AMR-WB", 16000, 16000, 1, NULL,
encode_update, encode_wb,
decode_update, decode_wb,
NULL, amr_fmtp_enc, amr_fmtp_cmp
@@ -300,7 +300,7 @@ static struct aucodec amr_wb = {
#endif
#ifdef AMR_NB
static struct aucodec amr_nb = {
- LE_INIT, NULL, "AMR", 8000, 1, NULL,
+ LE_INIT, NULL, "AMR", 8000, 8000, 1, NULL,
encode_update, encode_nb,
decode_update, decode_nb,
NULL, amr_fmtp_enc, amr_fmtp_cmp
diff --git a/modules/bv32/bv32.c b/modules/bv32/bv32.c
index c19a8bc..f604885 100644
--- a/modules/bv32/bv32.c
+++ b/modules/bv32/bv32.c
@@ -151,7 +151,7 @@ static int plc(struct audec_state *st, int16_t *sampv, size_t *sampc)
static struct aucodec bv32 = {
- LE_INIT, 0, "BV32", 16000, 1, NULL,
+ LE_INIT, 0, "BV32", 16000, 16000, 1, NULL,
encode_update, encode,
decode_update, decode, plc,
NULL, NULL
diff --git a/modules/codec2/codec2.c b/modules/codec2/codec2.c
index 422adc9..67fd7e6 100644
--- a/modules/codec2/codec2.c
+++ b/modules/codec2/codec2.c
@@ -165,6 +165,7 @@ static struct aucodec codec2 = {
NULL,
"CODEC2",
8000,
+ 8000,
1,
NULL,
encode_update,
diff --git a/modules/g711/g711.c b/modules/g711/g711.c
index acee027..0353fe0 100644
--- a/modules/g711/g711.c
+++ b/modules/g711/g711.c
@@ -97,12 +97,12 @@ static int pcma_decode(struct audec_state *ads, int16_t *sampv,
static struct aucodec pcmu = {
- LE_INIT, "0", "PCMU", 8000, 1, NULL,
+ LE_INIT, "0", "PCMU", 8000, 8000, 1, NULL,
NULL, pcmu_encode, NULL, pcmu_decode, NULL, NULL, NULL
};
static struct aucodec pcma = {
- LE_INIT, "8", "PCMA", 8000, 1, NULL,
+ LE_INIT, "8", "PCMA", 8000, 8000, 1, NULL,
NULL, pcma_encode, NULL, pcma_decode, NULL, NULL, NULL
};
diff --git a/modules/g722/g722.c b/modules/g722/g722.c
index bc0fda0..2b5a7a4 100644
--- a/modules/g722/g722.c
+++ b/modules/g722/g722.c
@@ -162,7 +162,7 @@ static int decode(struct audec_state *st, int16_t *sampv, size_t *sampc,
static struct aucodec g722 = {
- LE_INIT, "9", "G722", 8000, 1, NULL,
+ LE_INIT, "9", "G722", 16000, 8000, 1, NULL,
encode_update, encode,
decode_update, decode, NULL,
NULL, NULL
diff --git a/modules/g7221/g7221.c b/modules/g7221/g7221.c
index 7211c15..7651e92 100644
--- a/modules/g7221/g7221.c
+++ b/modules/g7221/g7221.c
@@ -13,6 +13,7 @@ static struct g7221_aucodec g7221 = {
.ac = {
.name = "G7221",
.srate = 16000,
+ .crate = 16000,
.ch = 1,
.encupdh = g7221_encode_update,
.ench = g7221_encode,
diff --git a/modules/g726/g726.c b/modules/g726/g726.c
index 3553f47..a23a985 100644
--- a/modules/g726/g726.c
+++ b/modules/g726/g726.c
@@ -149,28 +149,28 @@ static int decode(struct audec_state *st, int16_t *sampv,
static struct g726_aucodec g726[4] = {
{
{
- LE_INIT, 0, "G726-40", 8000, 1, NULL,
+ LE_INIT, 0, "G726-40", 8000, 8000, 1, NULL,
encode_update, encode, decode_update, decode, 0, 0, 0
},
40000
},
{
{
- LE_INIT, 0, "G726-32", 8000, 1, NULL,
+ LE_INIT, 0, "G726-32", 8000, 8000, 1, NULL,
encode_update, encode, decode_update, decode, 0, 0, 0
},
32000
},
{
{
- LE_INIT, 0, "G726-24", 8000, 1, NULL,
+ LE_INIT, 0, "G726-24", 8000, 8000, 1, NULL,
encode_update, encode, decode_update, decode, 0, 0, 0
},
24000
},
{
{
- LE_INIT, 0, "G726-16", 8000, 1, NULL,
+ LE_INIT, 0, "G726-16", 8000, 8000, 1, NULL,
encode_update, encode, decode_update, decode, 0, 0, 0
},
16000
diff --git a/modules/gsm/gsm.c b/modules/gsm/gsm.c
index 86203b9..2fc006e 100644
--- a/modules/gsm/gsm.c
+++ b/modules/gsm/gsm.c
@@ -149,7 +149,7 @@ static int decode(struct audec_state *st, int16_t *sampv, size_t *sampc,
static struct aucodec ac_gsm = {
- LE_INIT, "3", "GSM", 8000, 1, NULL,
+ LE_INIT, "3", "GSM", 8000, 8000, 1, NULL,
encode_update, encode, decode_update, decode, NULL, NULL, NULL
};
diff --git a/modules/ilbc/ilbc.c b/modules/ilbc/ilbc.c
index 229dc28..7c2ceed 100644
--- a/modules/ilbc/ilbc.c
+++ b/modules/ilbc/ilbc.c
@@ -327,7 +327,7 @@ static int pkloss(struct audec_state *st, int16_t *sampv, size_t *sampc)
static struct aucodec ilbc = {
- LE_INIT, 0, "iLBC", 8000, 1, ilbc_fmtp,
+ LE_INIT, 0, "iLBC", 8000, 8000, 1, ilbc_fmtp,
encode_update, encode, decode_update, decode, pkloss, 0, 0
};
diff --git a/modules/isac/isac.c b/modules/isac/isac.c
index 648031a..9e98c35 100644
--- a/modules/isac/isac.c
+++ b/modules/isac/isac.c
@@ -186,11 +186,11 @@ static int plc(struct audec_state *st, int16_t *sampv, size_t *sampc)
static struct aucodec isacv[] = {
{
- LE_INIT, 0, "isac", 32000, 1, NULL,
+ LE_INIT, 0, "isac", 32000, 32000, 1, NULL,
encode_update, encode, decode_update, decode, plc, NULL, NULL
},
{
- LE_INIT, 0, "isac", 16000, 1, NULL,
+ LE_INIT, 0, "isac", 16000, 16000, 1, NULL,
encode_update, encode, decode_update, decode, plc, NULL, NULL
}
};
diff --git a/modules/l16/l16.c b/modules/l16/l16.c
index a8dc97f..2f81caa 100644
--- a/modules/l16/l16.c
+++ b/modules/l16/l16.c
@@ -62,14 +62,14 @@ static int decode(struct audec_state *st, int16_t *sampv, size_t *sampc,
/* See RFC 3551 */
static struct aucodec l16v[NR_CODECS] = {
- {LE_INIT, "10", "L16", 44100, 2, 0, 0, encode, 0, decode, 0, 0, 0},
- {LE_INIT, 0, "L16", 32000, 2, 0, 0, encode, 0, decode, 0, 0, 0},
- {LE_INIT, 0, "L16", 16000, 2, 0, 0, encode, 0, decode, 0, 0, 0},
- {LE_INIT, 0, "L16", 8000, 2, 0, 0, encode, 0, decode, 0, 0, 0},
- {LE_INIT, "11", "L16", 44100, 1, 0, 0, encode, 0, decode, 0, 0, 0},
- {LE_INIT, 0, "L16", 32000, 1, 0, 0, encode, 0, decode, 0, 0, 0},
- {LE_INIT, 0, "L16", 16000, 1, 0, 0, encode, 0, decode, 0, 0, 0},
- {LE_INIT, 0, "L16", 8000, 1, 0, 0, encode, 0, decode, 0, 0, 0},
+{LE_INIT, "10", "L16", 44100, 44100, 2, 0, 0, encode, 0, decode, 0, 0, 0},
+{LE_INIT, 0, "L16", 32000, 32000, 2, 0, 0, encode, 0, decode, 0, 0, 0},
+{LE_INIT, 0, "L16", 16000, 16000, 2, 0, 0, encode, 0, decode, 0, 0, 0},
+{LE_INIT, 0, "L16", 8000, 8000, 2, 0, 0, encode, 0, decode, 0, 0, 0},
+{LE_INIT, "11", "L16", 44100, 44100, 1, 0, 0, encode, 0, decode, 0, 0, 0},
+{LE_INIT, 0, "L16", 32000, 32000, 1, 0, 0, encode, 0, decode, 0, 0, 0},
+{LE_INIT, 0, "L16", 16000, 16000, 1, 0, 0, encode, 0, decode, 0, 0, 0},
+{LE_INIT, 0, "L16", 8000, 8000, 1, 0, 0, encode, 0, decode, 0, 0, 0},
};
diff --git a/modules/mpa/mpa.c b/modules/mpa/mpa.c
index 88ebfbe..6c2081b 100644
--- a/modules/mpa/mpa.c
+++ b/modules/mpa/mpa.c
@@ -82,7 +82,8 @@ static struct aucodec mpa = {
.pt = NULL, /* for the time being, to cope
with AVT AC1 interop problems, we do not use "14" here */
.name = "MPA",
- .srate = 90000,
+ .srate = 48000,
+ .crate = 90000,
.ch = 1,
.fmtp = "",
.encupdh = mpa_encode_update,
diff --git a/modules/opus/opus.c b/modules/opus/opus.c
index ec483f6..bf92604 100644
--- a/modules/opus/opus.c
+++ b/modules/opus/opus.c
@@ -29,6 +29,7 @@
static struct aucodec opus = {
.name = "opus",
.srate = 48000,
+ .crate = 48000,
.ch = 2,
.fmtp = "stereo=1;sprop-stereo=1",
.encupdh = opus_encode_update,
diff --git a/modules/silk/silk.c b/modules/silk/silk.c
index 8232188..73432d2 100644
--- a/modules/silk/silk.c
+++ b/modules/silk/silk.c
@@ -226,7 +226,7 @@ static int plc(struct audec_state *st, int16_t *sampv, size_t *sampc)
static struct aucodec silk[] = {
{
- LE_INIT, 0, "SILK", 24000, 1, NULL,
+ LE_INIT, 0, "SILK", 24000, 24000, 1, NULL,
encode_update, encode, decode_update, decode, plc, 0, 0
},
diff --git a/modules/speex/speex.c b/modules/speex/speex.c
index 0780e8c..13c6e79 100644
--- a/modules/speex/speex.c
+++ b/modules/speex/speex.c
@@ -462,19 +462,19 @@ static void config_parse(struct conf *conf)
static struct aucodec speexv[] = {
/* Stereo Speex */
- {LE_INIT, 0, "speex", 32000, 2, speex_fmtp_wb,
+ {LE_INIT, 0, "speex", 32000, 32000, 2, speex_fmtp_wb,
encode_update, encode, decode_update, decode, pkloss, 0, 0},
- {LE_INIT, 0, "speex", 16000, 2, speex_fmtp_wb,
+ {LE_INIT, 0, "speex", 16000, 16000, 2, speex_fmtp_wb,
encode_update, encode, decode_update, decode, pkloss, 0, 0},
- {LE_INIT, 0, "speex", 8000, 2, speex_fmtp_nb,
+ {LE_INIT, 0, "speex", 8000, 8000, 2, speex_fmtp_nb,
encode_update, encode, decode_update, decode, pkloss, 0, 0},
/* Standard Speex */
- {LE_INIT, 0, "speex", 32000, 1, speex_fmtp_wb,
+ {LE_INIT, 0, "speex", 32000, 32000, 1, speex_fmtp_wb,
encode_update, encode, decode_update, decode, pkloss, 0, 0},
- {LE_INIT, 0, "speex", 16000, 1, speex_fmtp_wb,
+ {LE_INIT, 0, "speex", 16000, 16000, 1, speex_fmtp_wb,
encode_update, encode, decode_update, decode, pkloss, 0, 0},
- {LE_INIT, 0, "speex", 8000, 1, speex_fmtp_nb,
+ {LE_INIT, 0, "speex", 8000, 8000, 1, speex_fmtp_nb,
encode_update, encode, decode_update, decode, pkloss, 0, 0},
};