]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Stop using snd_pcm_status_get_driver_htstamp in the alsa precision timing function...
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Sat, 27 Mar 2021 16:12:42 +0000 (16:12 +0000)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Sat, 27 Mar 2021 16:12:42 +0000 (16:12 +0000)
audio_alsa.c
configure.ac

index 45a51321e52e7b658993e2ca347e533017b07214..1360619dfe669b8b028bf190d2dc55bbbe62e307 100644 (file)
@@ -1455,12 +1455,19 @@ int precision_delay_and_status(snd_pcm_state_t *state, snd_pcm_sframes_t *delay,
   int ret = snd_pcm_status(alsa_handle, alsa_snd_pcm_status);
   if (ret == 0) {
 
-// must be 1.1 or later to use snd_pcm_status_get_driver_htstamp
-//#if SND_LIB_MINOR == 0
     snd_pcm_status_get_htstamp(alsa_snd_pcm_status, &update_timestamp);
-//#else
-//    snd_pcm_status_get_driver_htstamp(alsa_snd_pcm_status, &update_timestamp);
-//#endif
+
+/*
+// must be 1.1 or later to use snd_pcm_status_get_driver_htstamp
+#if SND_LIB_MINOR != 0
+    snd_htimestamp_t driver_htstamp;
+    snd_pcm_status_get_driver_htstamp(alsa_snd_pcm_status, &driver_htstamp);
+    uint64_t driver_htstamp_ns = driver_htstamp.tv_sec;
+    driver_htstamp_ns = driver_htstamp_ns * 1000000000;
+    driver_htstamp_ns = driver_htstamp_ns + driver_htstamp.tv_nsec;
+    debug(1,"driver_htstamp: %f.", driver_htstamp_ns * 0.000000001);
+#endif
+*/
 
     *state = snd_pcm_status_get_state(alsa_snd_pcm_status);
 
index 36697d7a3f835c4254f794da89763781123c361f..21ba3ceca332c31b2aadb17ba189f4552ca9c53a 100644 (file)
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.50])
-AC_INIT([shairport-sync], [3.3.8d5], [4265913+mikebrady@users.noreply.github.com])
+AC_INIT([shairport-sync], [3.3.8d6], [4265913+mikebrady@users.noreply.github.com])
 AM_INIT_AUTOMAKE
 AC_CONFIG_SRCDIR([shairport.c])
 AC_CONFIG_HEADERS([config.h])