]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Make the pipewire latency 200000 (uS?) instead of 20000.
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Mon, 25 Sep 2023 15:19:32 +0000 (16:19 +0100)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Mon, 25 Sep 2023 15:19:32 +0000 (16:19 +0100)
audio_pw.c

index 4271ba09d1d429c481933bc97f1ca6e1128cefd3..ee28fa5134ba3ab9ff46e944ac376cebc47cef4b 100644 (file)
@@ -359,11 +359,11 @@ static void start(int sample_rate, int sample_format) {
   data.rate = sample_rate;
   data.channels = 2;
   data.stride = spa_format_samplesize(data.format) * data.channels;
-  data.latency = 20000;
+  data.latency = 20000; // looks like microseconds
 
   nom = nearbyint((data.latency * data.rate) / 1000000.0);
 
-  pw_properties_setf(data.props, PW_KEY_NODE_LATENCY, "%u/%u", nom, data.rate);
+  pw_properties_setf(data.props, PW_KEY_NODE_LATENCY, "%u/%u", nom, data.rate); // looks like samples in the data.latency period
 
   debug(1, "pw: rate: %d", data.rate);
   debug(1, "pw: channgels: %d", data.channels);