From 427f4ca0d7a4d564252656c114ff561803f8b1d9 Mon Sep 17 00:00:00 2001 From: mycroft Date: Thu, 2 Oct 2003 01:16:40 +0000 Subject: Adjustments for NetBSD audio interface... * play.samples is in bytes, not frames. (XXX I wonder if we can fix this or it's too late??) * Set blocksize much smaller so that xine thinks the pointer is "real-time". --- graphics/xine-lib/distinfo | 4 +-- graphics/xine-lib/patches/patch-ac | 56 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 55 insertions(+), 5 deletions(-) (limited to 'graphics') diff --git a/graphics/xine-lib/distinfo b/graphics/xine-lib/distinfo index 6df845a95bc..7f894b99fda 100644 --- a/graphics/xine-lib/distinfo +++ b/graphics/xine-lib/distinfo @@ -1,10 +1,10 @@ -$NetBSD: distinfo,v 1.5 2003/09/30 12:17:01 seb Exp $ +$NetBSD: distinfo,v 1.6 2003/10/02 01:16:40 mycroft Exp $ SHA1 (xine-lib-1-rc0a.tar.gz) = ee41ba602179a9f02208a15e3dff36a1dfa00fac Size (xine-lib-1-rc0a.tar.gz) = 4211552 bytes SHA1 (patch-aa) = 692e3266d6250899daee1cf1c5e6733f8576a5f4 SHA1 (patch-ab) = 4da2e4cdcb0f0f5273eae4caa196c06e3ae6064b -SHA1 (patch-ac) = 3a3ba0bf3262f28e58cac81eac158a29786045a3 +SHA1 (patch-ac) = f3a80aee7eea45cb1f6918024fba4030052cf4fc SHA1 (patch-ad) = ed65116acfa1f32a0508338a11567589bc2b4123 SHA1 (patch-ae) = cf7486ed50a782fcfb17ad0985e76a7ae09a2938 SHA1 (patch-ag) = dd466b04766e9f7c43106ee163e339cf30a6a6ad diff --git a/graphics/xine-lib/patches/patch-ac b/graphics/xine-lib/patches/patch-ac index 553160641ac..7f6d748fce0 100644 --- a/graphics/xine-lib/patches/patch-ac +++ b/graphics/xine-lib/patches/patch-ac @@ -1,7 +1,7 @@ -$NetBSD: patch-ac,v 1.1.1.1 2003/04/06 11:06:02 rh Exp $ +$NetBSD: patch-ac,v 1.2 2003/10/02 01:16:40 mycroft Exp $ ---- src/audio_out/audio_sun_out.c.orig Sat Mar 8 08:27:29 2003 -+++ src/audio_out/audio_sun_out.c +--- src/audio_out/audio_sun_out.c.orig 2003-07-13 19:29:04.000000000 +0000 ++++ src/audio_out/audio_sun_out.c 2003-10-02 01:12:46.000000000 +0000 @@ -41,6 +41,11 @@ #ifdef __svr4__ #include @@ -14,3 +14,53 @@ $NetBSD: patch-ac,v 1.1.1.1 2003/04/06 11:06:02 rh Exp $ #include "xine_internal.h" #include "xineutils.h" +@@ -161,6 +166,9 @@ + info.play.precision = AUDIO_PRECISION_16; + info.play.encoding = AUDIO_ENCODING_LINEAR; + info.play.samples = 0; ++#ifdef __NetBSD__ ++ info.blocksize = 1024; ++#endif + if (ioctl(fd, AUDIO_SETINFO, &info)) { + fprintf(stderr, "rtsc: SETINFO failed\n"); + goto error; +@@ -175,6 +183,9 @@ + fprintf(stderr, "rtsc: GETINFO1, %s\n", strerror(errno)); + goto error; + } ++#ifdef __NetBSD__ ++ info.play.samples /= 4; ++#endif + + last_samplecnt = info.play.samples; + min_increment = ~0; +@@ -197,6 +208,9 @@ + fprintf(stderr, "rtsc: GETINFO2 failed, %s\n", strerror(errno)); + goto error; + } ++#ifdef __NetBSD__ ++ info.play.samples /= 4; ++#endif + if (info.play.samples < last_samplecnt) { + fprintf(stderr, "rtsc: %u > %u?\n", last_samplecnt, info.play.samples); + goto error; +@@ -463,6 +477,9 @@ + info.play.sample_rate = this->input_sample_rate; + info.play.eof = 0; + info.play.samples = 0; ++#ifdef __NetBSD__ ++ info.blocksize = 1024; ++#endif + + this->convert_u8_s8 = 0; + +@@ -568,6 +585,9 @@ + + if (ioctl(this->audio_fd, AUDIO_GETINFO, &info) == 0 && + (this->frames_in_buffer == 0 || info.play.samples > 0)) { ++#ifdef __NetBSD__ ++ info.play.samples /= this->bytes_per_frame; ++#endif + + if (info.play.samples < this->last_samplecnt) { + fprintf(stderr, "audio_sun_out: broken sound driver, sample counter runs backwards, cur %u < prev %u\n", -- cgit v1.2.3