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
97e587ad
Commit
97e587ad
authored
18 years ago
by
yanmorin
Browse files
Options
Downloads
Patches
Plain Diff
*** empty log message ***
parent
f8cdc96f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/audio/audiolayer.cpp
+1
-0
1 addition, 0 deletions
src/audio/audiolayer.cpp
src/audio/audiortp.cpp
+6
-4
6 additions, 4 deletions
src/audio/audiortp.cpp
src/global.h
+2
-2
2 additions, 2 deletions
src/global.h
with
9 additions
and
6 deletions
src/audio/audiolayer.cpp
+
1
−
0
View file @
97e587ad
...
...
@@ -411,6 +411,7 @@ AudioLayer::audioCallback (const void *inputBuffer, void *outputBuffer,
// Additionally handle the mic's audio stream
micAvailPut
=
_micRingBuffer
.
AvailForPut
();
toPut
=
(
micAvailPut
<=
(
int
)(
framesPerBuffer
*
sizeof
(
SFLDataFormat
)))
?
micAvailPut
:
framesPerBuffer
*
sizeof
(
SFLDataFormat
);
//_debug("AL: Nb sample: %d char, [0]=%f [1]=%f [2]=%f\n", toPut, in[0], in[1], in[2]);
_micRingBuffer
.
Put
(
in
,
toPut
,
micVolume
);
return
paContinue
;
...
...
This diff is collapsed.
Click to expand it.
src/audio/audiortp.cpp
+
6
−
4
View file @
97e587ad
...
...
@@ -234,12 +234,12 @@ AudioRtpRTX::sendSessionFromMic(int timestamp)
// 3. encode it
// 4. send it
try
{
if
(
_ca
==
0
)
{
return
;
}
// no call, so we do nothing
if
(
_ca
==
0
)
{
_debug
(
" !ARTP: No call associated (mic)
\n
"
);
return
;
}
// no call, so we do nothing
AudioLayer
*
audiolayer
=
Manager
::
instance
().
getAudioDriver
();
if
(
!
audiolayer
)
{
return
;
}
if
(
!
audiolayer
)
{
_debug
(
" !ARTP: No audiolayer available for mic
\n
"
);
return
;
}
AudioCodec
*
audiocodec
=
_ca
->
getAudioCodec
();
if
(
!
audiocodec
)
{
return
;
}
if
(
!
audiocodec
)
{
_debug
(
" !ARTP: No audiocodec available for mic
\n
"
);
return
;
}
// we have to get 20ms of data from the mic *20/1000 = /50
// rate/50 shall be lower than RTP_20S_48KHZ_MAX
...
...
@@ -250,6 +250,7 @@ AudioRtpRTX::sendSessionFromMic(int timestamp)
// take the lower
int
bytesAvail
=
(
availBytesFromMic
<
maxBytesToGet
)
?
availBytesFromMic
:
maxBytesToGet
;
//_debug("available = %d, maxBytesToGet = %d\n", availBytesFromMic, maxBytesToGet);
// Get bytes from micRingBuffer to data_from_mic
int
nbSample
=
audiolayer
->
getMic
(
_dataAudioLayer
,
bytesAvail
)
/
sizeof
(
SFLDataFormat
);
...
...
@@ -289,8 +290,9 @@ AudioRtpRTX::sendSessionFromMic(int timestamp)
//_debug("begin: %p, nbSample: %d\n", toSIP, nbSample);
//_debug("has to fill: %d chars at %p\n", (RTP_20S_8KHZ_MAX-nbSample)*sizeof(int16), toSIP + nbSample);
memset
(
toSIP
+
nbSample
,
0
,
(
RTP_20S_8KHZ_MAX
-
nbSample
)
*
sizeof
(
int16
));
//
nbSample = RTP_20S_8KHZ_MAX;
nbSample
=
RTP_20S_8KHZ_MAX
;
}
//_debug("AR: Nb sample: %d int, [0]=%d [1]=%d [2]=%d\n", nbSample, toSIP[0], toSIP[1], toSIP[2]);
// for the mono: range = 0 to RTP_FRAME2SEND * sizeof(int16)
// codecEncode(char *dest, int16* src, size in bytes of the src)
...
...
This diff is collapsed.
Click to expand it.
src/global.h
+
2
−
2
View file @
97e587ad
...
...
@@ -58,8 +58,8 @@ typedef short int16;
#define _debugInit(...)
#endif
#define SFLPHONED_VERSION "0.
6.3
"
#define SFLPHONED_VERSIONNUM 0x000
603
#define SFLPHONED_VERSION "0.
7.0
"
#define SFLPHONED_VERSIONNUM 0x000
700
#define PROGNAME "sflphoned"
#define PROGNAME_GLOBAL "sflphone"
...
...
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