report ringbuffer readspace as latency.
authorTorben Hohn <torbenh@gmx.de>
Tue, 31 Mar 2009 15:46:19 +0000 (31 17:46 +0200)
committerTorben Hohn <torbenh@gmx.de>
Tue, 31 Mar 2009 15:46:19 +0000 (31 17:46 +0200)
flashsupport.c

index b6f84e7..a88bf1c 100644 (file)
@@ -1229,7 +1229,8 @@ static int FPX_SoundOutput_Close(void *ptr) {
 
 static int FPX_SoundOutput_Latency(void *ptr) {
        // heh ? jack has no latency :P
-    return 0;
+    struct jack_output_data *p = ptr;
+    return jack_ringbuffer_read_space( p->buffer ) / 4;
 }
 #endif