diff options
Diffstat (limited to 'audio/xmms/patches/patch-aa')
-rw-r--r-- | audio/xmms/patches/patch-aa | 64 |
1 files changed, 44 insertions, 20 deletions
diff --git a/audio/xmms/patches/patch-aa b/audio/xmms/patches/patch-aa index 3e51f7a928e..941670e84ff 100644 --- a/audio/xmms/patches/patch-aa +++ b/audio/xmms/patches/patch-aa @@ -1,8 +1,17 @@ -$NetBSD: patch-aa,v 1.3 2000/03/12 20:36:27 tron Exp $ +$NetBSD: patch-aa,v 1.4 2001/05/20 20:52:24 rh Exp $ ---- Input/cdaudio/cdaudio.c.orig Thu Jan 27 21:30:36 2000 -+++ Input/cdaudio/cdaudio.c Sun Mar 12 18:00:27 2000 -@@ -113,10 +113,21 @@ +--- Input/cdaudio/cdaudio.c.orig Sun May 20 17:45:46 2001 ++++ Input/cdaudio/cdaudio.c +@@ -95,7 +95,7 @@ + #define STOP_UNLOCK() pthread_mutex_unlock(&stop_mutex) + + +-#if !defined(CDROMVOLREAD) && !(defined(HAVE_SYS_CDIO_H) && defined(__FreeBSD__)) ++#if !defined(CDROMVOLREAD) && !(defined(HAVE_SYS_CDIO_H) && (defined(__NetBSD__) || defined(__FreeBSD__))) + static gint volume_left = 100, volume_right = 100; + #endif + +@@ -139,10 +139,21 @@ if (!cdda_cfg.directory) cdda_cfg.directory = g_strdup("/cdrom"); # else @@ -24,16 +33,22 @@ $NetBSD: patch-aa,v 1.3 2000/03/12 20:36:27 tron Exp $ # endif #else if (!cdda_cfg.device) -@@ -280,7 +291,7 @@ - { - if (cdda_fd < 0) - return; +@@ -374,12 +385,12 @@ + pthread_attr_setdetachstate(attr, PTHREAD_CREATE_DETACHED); + } + -#if defined(HAVE_SYS_CDIO_H) && defined(__FreeBSD__) -+#if defined(HAVE_SYS_CDIO_H) && (defined(__FreeBSD__) || defined(__NetBSD__)) - ioctl(cdda_fd, CDIOCSTOP, 0); ++#if defined(HAVE_SYS_CDIO_H) && (defined(__NetBSD__) || defined(__FreeBSD__)) + /* ioctl(cdda_fd, CDIOCSTOP, 0); */ + ioctl(cdda_fd, CDIOCPAUSE, 0); #else - ioctl(cdda_fd, CDROMSTOP, 0); -@@ -291,8 +302,8 @@ + /* ioctl(cdda_fd, CDROMSTOP, 0); */ +- ioctl(cdda_fd, CDROMPAUSE); ++ ioctl(cdda_fd, CDROMPAUSE, 0); + #endif + close(cdda_fd); + cdda_fd = -1; +@@ -392,8 +403,8 @@ static void cdda_pause(short p) { @@ -44,7 +59,7 @@ $NetBSD: patch-aa,v 1.3 2000/03/12 20:36:27 tron Exp $ #else ioctl(cdda_fd, p ? CDROMPAUSE : CDROMRESUME); #endif -@@ -303,7 +314,7 @@ +@@ -404,7 +415,7 @@ { struct cdda_msf *end, start; @@ -53,7 +68,7 @@ $NetBSD: patch-aa,v 1.3 2000/03/12 20:36:27 tron Exp $ struct ioc_play_msf msf; #else struct cdrom_msf msf; -@@ -318,7 +329,7 @@ +@@ -419,7 +430,7 @@ else end = &cd_toc.track[track + 1]; @@ -62,7 +77,7 @@ $NetBSD: patch-aa,v 1.3 2000/03/12 20:36:27 tron Exp $ msf.start_m = start.minute; msf.start_s = start.second; msf.start_f = start.frame; -@@ -342,7 +353,7 @@ +@@ -443,7 +454,7 @@ static int get_time(void) { gint frame, start_frame, length; @@ -71,7 +86,7 @@ $NetBSD: patch-aa,v 1.3 2000/03/12 20:36:27 tron Exp $ struct ioc_read_subchannel subchnl; struct cd_sub_channel_info subinfo; -@@ -436,7 +447,7 @@ +@@ -534,7 +545,7 @@ if (!cdda_cfg.use_oss_mixer) { @@ -80,7 +95,7 @@ $NetBSD: patch-aa,v 1.3 2000/03/12 20:36:27 tron Exp $ struct ioc_vol vol; if (cdda_fd != -1) -@@ -464,7 +475,7 @@ +@@ -562,7 +573,7 @@ static void set_volume(int l, int r) { @@ -89,7 +104,7 @@ $NetBSD: patch-aa,v 1.3 2000/03/12 20:36:27 tron Exp $ struct ioc_vol vol; #else struct cdrom_volctrl vol; -@@ -497,7 +508,7 @@ +@@ -595,7 +606,7 @@ { if (cdda_fd != -1) { @@ -98,7 +113,16 @@ $NetBSD: patch-aa,v 1.3 2000/03/12 20:36:27 tron Exp $ vol.vol[0] = vol.vol[2] = (l * 255) / 100; vol.vol[1] = vol.vol[3] = (r * 255) / 100; ioctl(cdda_fd, CDIOCSETVOL, &vol); -@@ -521,6 +532,10 @@ +@@ -605,7 +616,7 @@ + ioctl(cdda_fd, CDROMVOLCTRL, &vol); + #endif + } +-#if !defined(CDROMVOLREAD) && !(defined(HAVE_SYS_CDIO_H) && defined(__FreeBSD__)) ++#if !defined(CDROMVOLREAD) && !(defined(HAVE_SYS_CDIO_H) && (defined(__FreeBSD__) || defined(__NetBSD__))) + volume_left = l; + volume_right = r; + #endif +@@ -619,6 +630,10 @@ #if defined(HAVE_SYS_CDIO_H) && defined(__FreeBSD__) struct ioc_toc_header tochdr; struct ioc_read_toc_single_entry tocentry; @@ -109,7 +133,7 @@ $NetBSD: patch-aa,v 1.3 2000/03/12 20:36:27 tron Exp $ #else struct cdrom_tochdr tochdr; struct cdrom_tocentry tocentry; -@@ -564,6 +579,41 @@ +@@ -662,6 +677,41 @@ info->leadout.minute = tocentry.entry.addr.msf.minute; info->leadout.second = tocentry.entry.addr.msf.second; info->leadout.frame = tocentry.entry.addr.msf.frame; |