From c212bd101b661e0008c02fa8c23ad9f1deb9417a Mon Sep 17 00:00:00 2001 From: Seiichirou Hiraoka Date: Wed, 16 Dec 1998 04:43:28 +0000 Subject: Update to 1.0b1 PR: ports/9065 Submitted by: clkao@CirX.ORG --- audio/wmcdplay/Makefile | 4 +- audio/wmcdplay/distinfo | 2 +- audio/wmcdplay/files/patch-aa | 199 ++++++++++++++++-------------------------- audio/wmcdplay/pkg-descr | 2 +- 4 files changed, 80 insertions(+), 127 deletions(-) (limited to 'audio') diff --git a/audio/wmcdplay/Makefile b/audio/wmcdplay/Makefile index 85aed189c133..b020b02f6821 100644 --- a/audio/wmcdplay/Makefile +++ b/audio/wmcdplay/Makefile @@ -6,9 +6,11 @@ # $Id: Makefile,v 1.1.1.1 1998/12/09 05:44:06 vanilla Exp $ # -DISTNAME= wmcdplay-0.8 +DISTNAME= wmcdplay +PKGNAME= wmcdplay-1.0b1 CATEGORIES= audio MASTER_SITES= http://www.geocities.com/SiliconValley/Vista/2471/ +EXTRACT_SUFX= .tgz MAINTAINER= clkao@CirX.ORG diff --git a/audio/wmcdplay/distinfo b/audio/wmcdplay/distinfo index deaf97b1853b..2829632701e9 100644 --- a/audio/wmcdplay/distinfo +++ b/audio/wmcdplay/distinfo @@ -1 +1 @@ -MD5 (wmcdplay-0.8.tar.gz) = c6c6ccf979e74b5f63e1551ba40dab7a +MD5 (wmcdplay.tgz) = 3b84b902186ba65770c268841ca12ae2 diff --git a/audio/wmcdplay/files/patch-aa b/audio/wmcdplay/files/patch-aa index 1ce21d1cb74b..498347e738ac 100644 --- a/audio/wmcdplay/files/patch-aa +++ b/audio/wmcdplay/files/patch-aa @@ -1,51 +1,30 @@ ---- cdctl.h.orig Sat Dec 5 23:23:28 1998 -+++ cdctl.h Sat Dec 5 23:23:27 1998 -@@ -11,7 +11,7 @@ - // define these if you have troubles, otherwise they slow responses - // #define _CDCTL_STOP_BEFORE_PLAY - // #define _CDCTL_START_BEFORE_PLAY --// #define _CDCTL_HARD_STOP -+#define _CDCTL_HARD_STOP - - #include - #include -@@ -20,8 +20,7 @@ +--- cdctl.h.orig Sun Dec 13 12:43:20 1998 ++++ cdctl.h Sun Dec 13 12:43:20 1998 +@@ -30,7 +30,8 @@ #include #include #include --#include -#include +#include ++#define CD_MSF_OFFSET 150 // CD status values #define ssData 0 -@@ -67,6 +66,9 @@ - #define FALSE 0 - #endif - -+#define CD_MSF_OFFSET 150 -+#define CDROM_DATA_TRACK 4 -+ - class CDCtl - { - public: -@@ -102,12 +104,11 @@ +@@ -113,10 +114,10 @@ case acStop: - #ifdef _CDCTL_HARD_STOP -- ioctl(cdfd,CDROMSTOP); -+ ioctl(cdfd,CDIOCSTOP); - #endif - #ifndef _CDCTL_HARD_STOP + #ifdef _CDCTL_SOFT_STOP - ioctl(cdfd,CDROMSTART); + ioctl(cdfd,CDIOCSTART); #endif -- - break; - case acPlay: - status_state=ssPlaying; -@@ -115,10 +116,10 @@ - tskOurPlay=TRUE; + #ifndef _CDCTL_SOFT_STOP +- ioctl(cdfd,CDROMSTOP); ++ ioctl(cdfd,CDIOCSTOP); + #endif + tskOurPlay=false; + +@@ -127,10 +128,10 @@ + tskOurPlay=true; break; case acPause: - ioctl(cdfd,CDROMPAUSE); @@ -57,7 +36,7 @@ break; case acPrev: newtrk--; -@@ -145,13 +146,13 @@ +@@ -157,13 +158,13 @@ } break; case acEject: @@ -73,58 +52,65 @@ status_state=ssNoCD; break; } -@@ -160,9 +161,15 @@ +@@ -172,9 +173,13 @@ } void doStatus(){ if(cdfdopen){ - struct cdrom_subchnl sc; -- sc.cdsc_format=CDROM_LBA; +- sc.cdsc_format=CDROM_MSF; - if(ioctl(cdfd, CDROMSUBCHNL, &sc)){ -+ struct ioc_read_subchannel irs; ++ struct ioc_read_subchannel sc; + struct cd_sub_channel_info csci; -+ -+ memset(&irs, 0, sizeof(irs)); -+ irs.data=&csci; -+ irs.data_len=sizeof(csci); -+ irs.address_format=CD_LBA_FORMAT; -+ irs.data_format=CD_MEDIA_CATALOG; -+ if(ioctl(cdfd, CDIOCREADSUBCHANNEL, &irs)){ ++ sc.address_format=CD_MSF_FORMAT; ++ sc.data=&csci; ++ sc.data_len=sizeof(csci); ++ sc.data_format=CD_MEDIA_CATALOG; ++ if(ioctl(cdfd, CDIOCREADSUBCHANNEL, &sc)){ if(status_state!=ssNoCD) status_state=ssTrayOpen; status_track=0; -@@ -171,18 +178,18 @@ - else{ +@@ -185,18 +190,18 @@ if(status_state==ssNoCD || status_state==ssTrayOpen) readTOC(); + int start,now,stop; - switch(sc.cdsc_audiostatus){ - case CDROM_AUDIO_PLAY: + switch(csci.header.audio_status){ + case CD_AS_PLAY_IN_PROGRESS: if(status_state==ssStopped) - tskOurPlay=FALSE; + tskOurPlay=false; status_state=ssPlaying; break; - case CDROM_AUDIO_PAUSED: + case CD_AS_PLAY_PAUSED: if(status_state==ssStopped) - tskOurPlay=FALSE; + tskOurPlay=false; status_state=ssPaused; break; - case CDROM_AUDIO_COMPLETED: + case CD_AS_PLAY_COMPLETED: + if(tskOurPlay){ + status_state=ssPlaying; + selecttrack(); +@@ -212,7 +217,7 @@ if(tskOurPlay){ - selecttrack(); - doStatus(); -@@ -194,7 +201,7 @@ - default: - status_state=ssStopped; + start = cd_trklist[status_track].track_start; + stop = start + cd_trklist[status_track].track_len - _CDCTL_SENSITIVITY; +- now = ((sc.cdsc_absaddr.msf.minute) * 60 + sc.cdsc_absaddr.msf.second) * 75 + sc.cdsc_absaddr.msf.frame - CD_MSF_OFFSET; ++ now = ((csci.what.position.absaddr.msf.minute) * 60 + csci.what.position.absaddr.msf.second) * 75 + csci.what.position.absaddr.msf.frame - CD_MSF_OFFSET; + if(now>0 && (now=stop)){ + status_state=ssPlaying; + selecttrack(); +@@ -227,7 +232,7 @@ + + status_state=ssStopped; } - trackinfo(&sc); + trackinfo(&csci); if(cd_trklist[status_track].track_data) status_state=ssData; } -@@ -202,19 +209,21 @@ +@@ -235,19 +240,21 @@ } void setVolume(int l, int r){ if(cdfdopen){ @@ -154,11 +140,7 @@ } } int getVolumeL(){ -@@ -260,36 +269,67 @@ - return status_pos-cd_trklist[status_track].track_start; - } - private: -+#if 0 +@@ -296,12 +303,30 @@ void readTOC(){ if(cd_trklist!=NULL) free(cd_trklist); @@ -167,84 +149,53 @@ - cd_tracks=hdr.cdth_trk1; + struct ioc_toc_header hdr; + ioctl(cdfd, CDIOREADTOCHEADER, &hdr); -+ cd_tracks=hdr.ending_track - hdr.starting_track + 1; ++ cd_tracks=hdr.ending_track; cd_trklist=(struct CDTrack *)malloc(cd_tracks*sizeof(struct CDTrack)); -- struct cdrom_tocentry te; -+ struct ioc_read_toc_single_entry te; ++#ifdef __FreeBSD__ ++ struct ioc_read_toc_entry te; ++ ++ te.data_len = (cd_tracks + 1) * sizeof(struct cd_toc_entry); ++ te.data = (struct cd_toc_entry *)malloc(te.data_len); ++ te.address_format = CD_LBA_FORMAT; ++ te.starting_track = 0; ++ ioctl(cdfd, CDIOREADTOCENTRYS, &te); ++ for(int i = 0; i < cd_tracks; i++) { ++ cd_trklist[i].track_data = te.data[i].control & 4 ? true : false; ++ cd_trklist[i].track_start = ntohl(te.data[i].addr.lba); ++ cd_trklist[i].track_len = ntohl(te.data[i + 1].addr.lba) ++ - cd_trklist[i].track_start; ++ } ++ cd_len = ntohl(te.data[cd_tracks].addr.lba); ++ free(te.data); ++#else + struct cdrom_tocentry te; int prev_addr=0; ++ for(int i=0;i<=cd_tracks;i++){ if(i==cd_tracks) -- te.cdte_track=CDROM_LEADOUT; -+ te.track=CDROM_LEADOUT; - else -- te.cdte_track=i+1; -- te.cdte_format=CDROM_LBA; -- ioctl(cdfd, CDROMREADTOCENTRY, &te); -+ te.track=i+1; -+ te.address_format=CD_LBA_FORMAT; -+ ioctl(cdfd, CDIOREADTOCENTRY, &te); - if(i>0) -- cd_trklist[i-1].track_len = te.cdte_addr.lba - prev_addr; -- prev_addr=te.cdte_addr.lba; -+ cd_trklist[i-1].track_len = ntohl(te.entry.addr.lba) - prev_addr; -+ prev_addr=ntohl(te.entry.addr.lba); - if(icdsc_absaddr.lba; -+ status_pos=ntohl(subchnl->what.position.absaddr.lba); +- status_pos=((subchnl->cdsc_absaddr.msf.minute) * 60 + subchnl->cdsc_absaddr.msf.second) * 75 + subchnl->cdsc_absaddr.msf.frame - CD_MSF_OFFSET; ++ status_pos=((subchnl->what.position.absaddr.msf.minute) * 60 + subchnl->what.position.absaddr.msf.second) * 75 + subchnl->what.position.absaddr.msf.frame - CD_MSF_OFFSET; for(status_track=0;status_track -FreeBSD port patches contributed by Chia-hsing Yu +FreeBSD port patches contributed by Chia-Hsing Yu -- cgit v1.2.3