mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-22 22:01:46 +00:00
[client] audio/pw: return the actual playback latency
This commit is contained in:
parent
4fadf3a130
commit
d6bbc4f89c
1 changed files with 8 additions and 1 deletions
|
@ -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 a new issue