Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
cf2b8d50
Commit
cf2b8d50
authored
16 years ago
by
Alexandre Savard
Browse files
Options
Downloads
Patches
Plain Diff
add nbSampleMax for unresampled data (#1143)
parent
c7c1b7aa
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sflphone-common/src/audio/audiortp.cpp
+2
-1
2 additions, 1 deletion
sflphone-common/src/audio/audiortp.cpp
sflphone-common/src/audio/codecs/celtcodec.cpp
+3
-3
3 additions, 3 deletions
sflphone-common/src/audio/codecs/celtcodec.cpp
with
5 additions
and
4 deletions
sflphone-common/src/audio/audiortp.cpp
+
2
−
1
View file @
cf2b8d50
...
...
@@ -398,7 +398,7 @@ AudioRtpRTX::sendSessionFromMic(int timestamp)
int
nbSamplesMax
=
_layerFrameSize
*
_audiocodec
->
getClockRate
()
/
1000
;
_debug
(
"_nbSamplesMax %i
\n
"
,
nbSamplesMax
);
//
_debug("resample data = %i\n", nb_sample_up);
_debug
(
"resample data = %i
\n
"
,
nb_sample_up
);
nbSample
=
reSampleData
(
_audiocodec
->
getClockRate
(),
nb_sample_up
,
DOWN_SAMPLING
);
if
(
nbSample
<
nbSamplesMax
-
10
)
{
// if only 10 is missing, it's ok
...
...
@@ -410,6 +410,7 @@ AudioRtpRTX::sendSessionFromMic(int timestamp)
}
else
{
int
nbSamplesMax
=
128
;
// no resampling required
compSize
=
_audiocodec
->
codecEncode
(
micDataEncoded
,
micData
,
nbSample
*
sizeof
(
int16
));
...
...
This diff is collapsed.
Click to expand it.
sflphone-common/src/audio/codecs/celtcodec.cpp
+
3
−
3
View file @
cf2b8d50
...
...
@@ -26,8 +26,7 @@
class
Celt
:
public
AudioCodec
{
public:
Celt
(
int
payload
=
0
)
:
AudioCodec
(
payload
,
"celt"
),
_celt_frame_size
(
128
)
:
AudioCodec
(
payload
,
"celt"
)
{
_clockRate
=
44100
;
_frameSize
=
512
;
// fixed frameSize, TODO: support 64 to 512 frame size
...
...
@@ -86,7 +85,8 @@ class Celt : public AudioCodec{
virtual
int
codecEncode
(
unsigned
char
*
dst
,
short
*
src
,
unsigned
int
size
)
{
int
len
=
0
;
len
=
celt_encode
(
enc
,
(
celt_int16_t
*
)
src
,
NULL
,
dst
,
size
);
len
=
celt_encode
(
enc
,
(
celt_int16_t
*
)
src
,
NULL
,
dst
,
128
);
// returns the number of bytes writen
return
len
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment