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
217b8bcb
Commit
217b8bcb
authored
15 years ago
by
Alexandre Savard
Browse files
Options
Downloads
Patches
Plain Diff
[#2354] Move pulseaudio disconnectAudioStream after stopping main loop
parent
b44c450f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sflphone-common/src/audio/pulseaudio/pulselayer.cpp
+8
-13
8 additions, 13 deletions
sflphone-common/src/audio/pulseaudio/pulselayer.cpp
with
8 additions
and
13 deletions
sflphone-common/src/audio/pulseaudio/pulselayer.cpp
+
8
−
13
View file @
217b8bcb
...
...
@@ -43,18 +43,19 @@ static void capture_callback (pa_stream* s, size_t bytes, void* userdata)
// static_cast<PulseLayer*> (userdata)->processData();
}
/*
static void stream_suspended_callback (pa_stream *s UNUSED, void *userdata UNUSED)
{
_debug("PulseLayer::Stream Suspended\n");
}
*/
/*
static void stream_moved_callback(pa_stream *s UNUSED, void *userdata UNUSED)
{
_debug("PulseLayer::Stream Moved\n");
}
*/
static
void
playback_underflow_callback
(
pa_stream
*
s
,
void
*
userdata
UNUSED
)
{
...
...
@@ -378,12 +379,11 @@ PulseLayer::stopStream (void)
pa_stream_flush
(
playback
->
pulseStream
(),
NULL
,
NULL
);
pa_stream_flush
(
record
->
pulseStream
(),
NULL
,
NULL
);
disconnectAudioStream
();
if
(
m
)
{
pa_threaded_mainloop_stop
(
m
);
}
disconnectAudioStream
();
_debug
(
"Disconnecting PulseAudio context
\n
"
);
...
...
@@ -484,15 +484,9 @@ void PulseLayer::writeToSpeaker (void)
int
urgentAvailBytes
;
/** Bytes available in the regular ringbuffer ( reserved for voice ) */
int
normalAvailBytes
;
/** Bytes to get in the ring buffer **/
int
byteToGet
;
int
toPlay
;
// const pa_timing_info* info = pa_stream_get_timing_info(s);
// _debug(" pa write_index: %i", info->write_index);
// _debug(" pa write_index_corupt (if not 0): %i" info->write_index_corrupt);
// _debug(" pa read_index: %i", info->read_index);
// _debug(" pa read_index_corrupt (if not 0): %i", info->read_index_corrupt);
SFLDataFormat
*
out
;
// = (SFLDataFormat*)pa_xmalloc(framesPerBuffer);
urgentAvailBytes
=
_urgentRingBuffer
.
AvailForGet
();
...
...
@@ -589,7 +583,8 @@ void PulseLayer::writeToSpeaker (void)
if
(
byteToGet
)
{
// TODO, find out where this problem occurs to get rid of this hack
// Sending an odd number of byte breaks the audio!
// TODO, find out where the problem occurs to get rid of this hack
if
(
(
byteToGet
%
2
)
!=
0
)
byteToGet
=
byteToGet
-
1
;
...
...
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