mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[client] audio/pw: return the actual playback latency
This commit is contained in:
parent
4fadf3a130
commit
d6bbc4f89c
@ -366,7 +366,14 @@ static void pipewire_playbackMute(bool mute)
|
||||
|
||||
static size_t pipewire_playbackLatency(void)
|
||||
{
|
||||
return 0;
|
||||
struct pw_time time = { 0 };
|
||||
|
||||
pw_thread_loop_lock(pw.thread);
|
||||
if (pw_stream_get_time(pw.playback.stream, &time) < 0)
|
||||
DEBUG_ERROR("pw_stream_get_time failed");
|
||||
pw_thread_loop_unlock(pw.thread);
|
||||
|
||||
return time.delay + time.queued / pw.playback.stride;
|
||||
}
|
||||
|
||||
static void pipewire_recordStopStream(void)
|
||||
|
Loading…
Reference in New Issue
Block a user