mirror of
				https://github.com/gnif/LookingGlass.git
				synced 2025-11-04 06:31:54 +00:00 
			
		
		
		
	[client] audio/pw: return the actual playback latency
This commit is contained in:
		@@ -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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user