projects
/
rtaudio-cdist.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
949fd03
)
Report playback latency for PulseAudio.
author
Carl Hetherington
<cth@carlh.net>
Sat, 19 Mar 2016 21:15:52 +0000
(21:15 +0000)
committer
Carl Hetherington
<cth@carlh.net>
Sat, 19 Mar 2016 21:15:52 +0000
(21:15 +0000)
RtAudio.cpp
patch
|
blob
|
history
diff --git
a/RtAudio.cpp
b/RtAudio.cpp
index f2c871f3309577f2d8ba15181b40f871d8fdec96..07f13277c353c08027b7f8d5fceba8f4c37f4c5f 100644
(file)
--- a/
RtAudio.cpp
+++ b/
RtAudio.cpp
@@
-8310,6
+8310,14
@@
void RtApiPulse::callbackEvent( void )
MUTEX_UNLOCK( &stream_.mutex );
\r
RtApi::tickStreamTime();
\r
\r
+ if (pah->s_play) {
\r
+ int e = 0;
\r
+ pa_usec_t const lat = pa_simple_get_latency(pah->s_play, &e);
\r
+ if (e == 0) {
\r
+ stream_.latency[0] = lat * stream_.sampleRate / 1000000;
\r
+ }
\r
+ }
\r
+
\r
if ( doStopStream == 1 )
\r
stopStream();
\r
}
\r