Skip to content
Snippets Groups Projects
Commit 951e1a30 authored by Alexandre Savard's avatar Alexandre Savard
Browse files

add framesize to codec, independant from audiolayer (#1143)

parent 59c6b0a0
No related branches found
No related tags found
No related merge requests found
...@@ -28,6 +28,7 @@ public: ...@@ -28,6 +28,7 @@ public:
: AudioCodec(payload, "PCMA") : AudioCodec(payload, "PCMA")
{ {
_clockRate = 8000; _clockRate = 8000;
_frameSize = 160; // 20 ms at 8kHz
_channel = 1; _channel = 1;
_bitrate = 64; _bitrate = 64;
_bandwidth = 80; _bandwidth = 80;
......
...@@ -30,7 +30,7 @@ class Celt : public AudioCodec{ ...@@ -30,7 +30,7 @@ class Celt : public AudioCodec{
_celt_frame_size(128) _celt_frame_size(128)
{ {
_clockRate = 44100; _clockRate = 44100;
_frameSize = 512; _frameSize = 512; // fixed frameSize, TODO: support 64 to 512 frame size
_channel = 1; _channel = 1;
_bitrate = 0; _bitrate = 0;
_bandwidth = 0; _bandwidth = 0;
......
...@@ -36,6 +36,7 @@ class Speex : public AudioCodec{ ...@@ -36,6 +36,7 @@ class Speex : public AudioCodec{
_preprocess_state() _preprocess_state()
{ {
_clockRate = 8000; _clockRate = 8000;
_frameSize = 160; // 20 ms at 8kHz
_channel = 1; _channel = 1;
_bitrate = 0; _bitrate = 0;
_bandwidth = 0; _bandwidth = 0;
......
...@@ -36,6 +36,7 @@ class Speex : public AudioCodec{ ...@@ -36,6 +36,7 @@ class Speex : public AudioCodec{
_preprocess_state() _preprocess_state()
{ {
_clockRate = 16000; _clockRate = 16000;
_frameSize = 320; // 20 ms at 16 kHz
_channel = 1; _channel = 1;
_bitrate = 0; _bitrate = 0;
_bandwidth = 0; _bandwidth = 0;
......
...@@ -30,6 +30,7 @@ public: ...@@ -30,6 +30,7 @@ public:
: AudioCodec(payload, "PCMU") : AudioCodec(payload, "PCMU")
{ {
_clockRate = 8000; _clockRate = 8000;
_frameSize = 160; // 20 ms at 8kHz
_channel = 1; _channel = 1;
_bitrate = 64; _bitrate = 64;
_bandwidth = 80; _bandwidth = 80;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment