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
2dcb9e7c
Commit
2dcb9e7c
authored
Feb 03, 2009
by
Emmanuel Milou
Browse files
Add a timer to the alsa thread to not jam the CPU load
parent
d6b192f6
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/audio/audiortp.cpp
View file @
2dcb9e7c
...
...
@@ -82,7 +82,7 @@ void
AudioRtp
::
closeRtpSession
()
{
ost
::
MutexLock
m
(
_threadMutex
);
// This will make RTP threads finish.
//
_debug("Stopping AudioRTP\n");
_debug
(
"Stopping AudioRTP
\n
"
);
try
{
delete
_RTXThread
;
_RTXThread
=
0
;
}
catch
(...)
{
...
...
@@ -388,7 +388,6 @@ AudioRtpRTX::run () {
initBuffers
();
int
step
;
try
{
// Init the session
initAudioRtpSession
();
step
=
(
int
)
(
_layerFrameSize
*
_codecSampleRate
/
1000
);
...
...
@@ -425,15 +424,9 @@ AudioRtpRTX::run () {
}
//_debug("stop stream for audiortp loop\n");
audiolayer
->
stopStream
();
}
catch
(
std
::
exception
&
e
)
{
_start
.
post
();
_debug
(
"! ARTP: Stop %s
\n
"
,
e
.
what
());
throw
;
}
catch
(...)
{
_start
.
post
();
_debugException
(
"* ARTP Action: Stop"
);
throw
;
}
_debug
(
"- ARTP Action: Stop
\n
"
);
}
...
...
src/eventthread.cpp
View file @
2dcb9e7c
...
...
@@ -54,6 +54,7 @@ void AudioThread::run (void)
{
while
(
!
testCancel
())
{
_alsa
->
audioCallback
();
Thread
::
sleep
(
3
);
}
}
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