]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
audio_occupancy_now in delay() needs to be in frames, not bytes. Still no luck...
authorJörn Nettingsmeier <nettings@luchtbeweging.nl>
Thu, 14 Feb 2019 20:50:02 +0000 (20:50 +0000)
committerJörn Nettingsmeier <nettings@luchtbeweging.nl>
Thu, 14 Feb 2019 20:50:02 +0000 (20:50 +0000)
audio_jack.c

index eb00b666af108a4fe65e4fb6478fa9a8bcbddbae..525eb64b35cb85193e90b7b31dc4e714641b8ba8 100644 (file)
@@ -490,7 +490,7 @@ int jack_delay(long *the_delay) {
     // this is the buffer occupancy before any
     // subsequent transfer because transfer is blocked
     // by the mutex
-    size_t audio_occupancy_now = jack_ringbuffer_read_space(jackbuf);
+    size_t audio_occupancy_now = jack_ringbuffer_read_space(jackbuf) / bytes_per_frame;
   pthread_mutex_unlock(&buffer_mutex);
 
   int64_t frames_processed_since_latest_latency_check = (delta * 44100) >> 32;