pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/www/seamonkey/files seamonkey: This gets the newer get...
details: https://anonhg.NetBSD.org/pkgsrc/rev/e7ddb4570e11
branches: trunk
changeset: 397005:e7ddb4570e11
user: nia <nia%pkgsrc.org@localhost>
date: Fri Jun 14 13:26:18 2019 +0000
description:
seamonkey: This gets the newer get_position too.
diffstat:
www/seamonkey/files/cubeb_sun.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diffs (34 lines):
diff -r 273d11b15d24 -r e7ddb4570e11 www/seamonkey/files/cubeb_sun.c
--- a/www/seamonkey/files/cubeb_sun.c Fri Jun 14 12:20:42 2019 +0000
+++ b/www/seamonkey/files/cubeb_sun.c Fri Jun 14 13:26:18 2019 +0000
@@ -98,6 +98,7 @@
char input_name[32];
char output_name[32];
uint64_t frames_written;
+ uint64_t blocks_written;
};
int
@@ -664,10 +665,22 @@
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