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:
e46da89
)
Report playback latency for PulseAudio.
author
Carl Hetherington
<cth@carlh.net>
Mon, 15 Apr 2019 11:34:06 +0000
(12:34 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Mon, 15 Apr 2019 19:48:45 +0000
(20:48 +0100)
RtAudio.cpp
patch
|
blob
|
history
diff --git
a/RtAudio.cpp
b/RtAudio.cpp
index 1b27de1fd5c60f883c1842d9d36272828195bb15..264d5f694c2b0fd0187f6957107554280b63cfab 100644
(file)
--- a/
RtAudio.cpp
+++ b/
RtAudio.cpp
@@
-8640,6
+8640,14
@@
void RtApiPulse::callbackEvent( void )
MUTEX_UNLOCK( &stream_.mutex );
RtApi::tickStreamTime();
+ if (pah->s_play) {
+ int e = 0;
+ pa_usec_t const lat = pa_simple_get_latency(pah->s_play, &e);
+ if (e == 0) {
+ stream_.latency[0] = lat * stream_.sampleRate / 1000000;
+ }
+ }
+
if ( doStopStream == 1 )
stopStream();
}