Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
6b8f740e
Commit
6b8f740e
authored
Jun 10, 2009
by
Alexandre Savard
Browse files
[#936] speex 32 khz integration completed
parent
df90af1e
Changes
3
Hide whitespace changes
Inline
Side-by-side
sflphone-common/src/audio/codecs/speexcodec_nb.cpp
View file @
6b8f740e
...
...
@@ -113,12 +113,9 @@ class Speex : public AudioCodec{
{
int
ratio
=
320
/
_speex_frame_size
;
printf
(
"Codec::codecDecode() size %i
\n
"
,
size
);
printf
(
"Codec::codecDecode() ratio %i
\n
"
,
ratio
);
printf
(
"Codec::codecDecode() _speex_frame_size %i
\n
"
,
_speex_frame_size
);
speex_bits_read_from
(
&
_speex_dec_bits
,
(
char
*
)
src
,
size
);
speex_decode_int
(
_speex_dec_state
,
&
_speex_dec_bits
,
dst
);
printf
(
"Codec::codecDecode() _speex_frame_size * ratio %i
\n
"
,
_speex_frame_size
*
ratio
);
return
_speex_frame_size
*
ratio
;
}
...
...
@@ -131,10 +128,10 @@ class Speex : public AudioCodec{
speex_preprocess_run
(
_preprocess_state
,
src
);
#endif
printf
(
"Codec::codecEncode() size %i
\n
"
,
size
);
speex_encode_int
(
_speex_enc_state
,
src
,
&
_speex_enc_bits
);
int
nbBytes
=
speex_bits_write
(
&
_speex_enc_bits
,
(
char
*
)
dst
,
size
);
printf
(
"Codec::codecEncode() nbBytes %i
\n
"
,
nbBytes
);
return
nbBytes
;
}
...
...
sflphone-common/src/audio/codecs/speexcodec_ub.cpp
View file @
6b8f740e
...
...
@@ -113,13 +113,11 @@ class Speex : public AudioCodec{
{
// int ratio = 320 / _speex_frame_size;
printf
(
"Codec::codecDecode() size %i
\n
"
,
size
);
// printf("Codec::codecDecode() ratio %i\n", ratio);
printf
(
"Codec::codecDecode() _speex_frame_size %i
\n
"
,
_speex_frame_size
);
speex_bits_read_from
(
&
_speex_dec_bits
,
(
char
*
)
src
,
size
);
speex_decode_int
(
_speex_dec_state
,
&
_speex_dec_bits
,
dst
);
// printf("Codec::codecEncode() _speex_frame_size * ratio %i\n", _speex_frame_size * ratio);
return
640
;
// return the nuber of byte, not the number of sample
return
_speex_frame_size
*
2
;
}
virtual
int
codecEncode
(
unsigned
char
*
dst
,
short
*
src
,
unsigned
int
size
)
...
...
@@ -131,12 +129,11 @@ class Speex : public AudioCodec{
speex_preprocess_run
(
_preprocess_state
,
src
);
#endif
printf
(
"Codec::codecEncode() size: %i
\n
"
,
size
);
printf
(
"Codec::codecEncode() _speex_frame_size %i
\n
"
,
_speex_frame_size
);
speex_encode_int
(
_speex_enc_state
,
src
,
&
_speex_enc_bits
);
int
speex_nbByte
=
speex_bits_nbytes
(
&
_speex_enc_bits
);
speex_bits_nbytes
(
&
_speex_enc_bits
);
int
nbBytes
=
speex_bits_write
(
&
_speex_enc_bits
,
(
char
*
)
dst
,
size
);
printf
(
"Codec::codecEncode() nbBytes: %i
\n
"
,
nbBytes
);
return
nbBytes
;
}
...
...
sflphone-common/src/audio/codecs/speexcodec_wb.cpp
View file @
6b8f740e
...
...
@@ -111,14 +111,11 @@ class Speex : public AudioCodec{
virtual
int
codecDecode
(
short
*
dst
,
unsigned
char
*
src
,
unsigned
int
size
)
{
int
ratio
=
320
/
_speex_frame_size
;
printf
(
"Codec::codecDecode() size %i
\n
"
,
size
);
printf
(
"Codec::codecDecode() ratio %i
\n
"
,
ratio
);
printf
(
"Codec::codecDecode() _speex_frame_size %i
\n
"
,
_speex_frame_size
);
speex_bits_read_from
(
&
_speex_dec_bits
,
(
char
*
)
src
,
size
);
speex_decode_int
(
_speex_dec_state
,
&
_speex_dec_bits
,
dst
);
printf
(
"Codec::codecDecode() _speex_frame_size * ratio %i
\n
"
,
_speex_frame_size
*
ratio
);
return
2
*
_speex_frame_size
*
ratio
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment