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
50fd7648
Commit
50fd7648
authored
15 years ago
by
Alexandre Savard
Browse files
Options
Downloads
Patches
Plain Diff
[#2308] Moved pulseaudio mainloop locking from AudioStream disconnect stream
to PulseLayer AudioStreams deletion
parent
96f64a4f
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/pulseaudio/audiostream.cpp
+2
-2
2 additions, 2 deletions
sflphone-common/src/audio/pulseaudio/audiostream.cpp
sflphone-common/src/audio/pulseaudio/pulselayer.cpp
+12
-3
12 additions, 3 deletions
sflphone-common/src/audio/pulseaudio/pulselayer.cpp
with
14 additions
and
5 deletions
sflphone-common/src/audio/pulseaudio/audiostream.cpp
+
2
−
2
View file @
50fd7648
...
...
@@ -99,7 +99,7 @@ AudioStream::disconnectStream (void)
{
_debug
(
"Destroy audio streams
\n
"
);
pa_threaded_mainloop_lock
(
_mainloop
);
//
pa_threaded_mainloop_lock (_mainloop);
if
(
_audiostream
)
{
pa_stream_disconnect
(
_audiostream
);
...
...
@@ -107,7 +107,7 @@ AudioStream::disconnectStream (void)
_audiostream
=
NULL
;
}
pa_threaded_mainloop_unlock
(
_mainloop
);
//
pa_threaded_mainloop_unlock (_mainloop);
return
true
;
}
...
...
This diff is collapsed.
Click to expand it.
sflphone-common/src/audio/pulseaudio/pulselayer.cpp
+
12
−
3
View file @
50fd7648
...
...
@@ -294,16 +294,26 @@ bool PulseLayer::openDevice (int indexIn UNUSED, int indexOut UNUSED, int sample
void
PulseLayer
::
closeCaptureStream
(
void
)
{
if
(
record
)
{
pa_threaded_mainloop_lock
(
m
);
delete
record
;
record
=
NULL
;
pa_threaded_mainloop_unlock
(
m
);
}
}
void
PulseLayer
::
closePlaybackStream
(
void
)
{
if
(
playback
)
{
pa_threaded_mainloop_lock
(
m
);
delete
playback
;
playback
=
NULL
;
pa_threaded_mainloop_unlock
(
m
);
}
}
...
...
@@ -471,13 +481,12 @@ void PulseLayer::writeToSpeaker (void)
if
(
urgentAvailBytes
>
0
)
{
_debug
(
"Urgent Avail?????????????????????
\n
"
);
// Urgent data (dtmf, incoming call signal) come first.
//_debug("Play urgent!: %i\e" , urgentAvail);
toGet
=
(
urgentAvailBytes
<
(
int
)
(
framesPerBuffer
*
sizeof
(
SFLDataFormat
)))
?
urgentAvailBytes
:
framesPerBuffer
*
sizeof
(
SFLDataFormat
);
out
=
(
SFLDataFormat
*
)
pa_xmalloc
(
toGet
*
sizeof
(
SFLDataFormat
));
_urgentRingBuffer
.
Get
(
out
,
toGet
,
100
);
pa_stream_write
(
playback
->
pulseStream
(),
out
,
toGet
,
NULL
,
0
,
PA_SEEK_RELATIVE
);
// Consume the regular one as well (same amount of bytes)
_mainBuffer
.
discard
(
toGet
);
...
...
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