Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
cf4371a0
Commit
cf4371a0
authored
May 01, 2018
by
Marcelo Fernandez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent PulseAudio driver to lock its mutex for too long
parent
007d1754
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
audio_driver_pulseaudio.cpp
drivers/pulseaudio/audio_driver_pulseaudio.cpp
+11
-2
No files found.
drivers/pulseaudio/audio_driver_pulseaudio.cpp
View file @
cf4371a0
...
...
@@ -340,13 +340,22 @@ void AudioDriverPulseAudio::thread_func(void *p_udata) {
bytes
=
byte_size
;
}
int
ret
=
pa_stream_write
(
ad
->
pa_str
,
ptr
,
bytes
,
NULL
,
0LL
,
PA_SEEK_RELATIVE
);
ret
=
pa_stream_write
(
ad
->
pa_str
,
ptr
,
bytes
,
NULL
,
0LL
,
PA_SEEK_RELATIVE
);
if
(
ret
>=
0
)
{
byte_size
-=
bytes
;
ptr
=
(
const
char
*
)
ptr
+
bytes
;
}
}
else
{
pa_mainloop_iterate
(
ad
->
pa_ml
,
1
,
NULL
);
ret
=
pa_mainloop_iterate
(
ad
->
pa_ml
,
0
,
NULL
);
if
(
ret
==
0
)
{
// If pa_mainloop_iterate returns 0 sleep for 1 msec to wait
// for the stream to be able to process more bytes
ad
->
unlock
();
OS
::
get_singleton
()
->
delay_usec
(
1000
);
ad
->
lock
();
}
}
}
}
...
...
Write
Preview
Markdown
is supported
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