pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/www/seamonkey/files



Module Name:    pkgsrc
Committed By:   nia
Date:           Fri Jun 14 13:26:18 UTC 2019

Modified Files:
        pkgsrc/www/seamonkey/files: cubeb_sun.c

Log Message:
seamonkey: This gets the newer get_position too.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/www/seamonkey/files/cubeb_sun.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/www/seamonkey/files/cubeb_sun.c
diff -u pkgsrc/www/seamonkey/files/cubeb_sun.c:1.2 pkgsrc/www/seamonkey/files/cubeb_sun.c:1.3
--- pkgsrc/www/seamonkey/files/cubeb_sun.c:1.2  Thu Jun 13 23:08:05 2019
+++ pkgsrc/www/seamonkey/files/cubeb_sun.c      Fri Jun 14 13:26:18 2019
@@ -98,6 +98,7 @@ struct cubeb_stream {
   char input_name[32];
   char output_name[32];
   uint64_t frames_written;
+  uint64_t blocks_written;
 };
 
 int
@@ -664,10 +665,22 @@ sun_stream_start(cubeb_stream * s)
 static int
 sun_stream_get_position(cubeb_stream * s, uint64_t * position)
 {
+#ifdef AUDIO_GETOOFFS
+  struct audio_offset offset;
+
+  if (ioctl(s->play_fd, AUDIO_GETOOFFS, &offset) == -1) {
+    return CUBEB_ERROR;
+  }
+  s->blocks_written += offset.deltablks;
+  *position = BYTES_TO_FRAMES(s->blocks_written * s->p_info.blocksize,
+                              s->p_info.play.channels);
+  return CUBEB_OK;
+#else
   pthread_mutex_lock(&s->mutex);
   *position = s->frames_written;
   pthread_mutex_unlock(&s->mutex);
   return CUBEB_OK;
+#endif
 }
 
 static int



Home | Main Index | Thread Index | Old Index