Date: 13 Apr 2005 17:39:36 -0000 From: Rodrigo Graeff <delphus@gmail.com> To: FreeBSD-gnats-submit@FreeBSD.org Cc: ports@FreeBSD.org Subject: ports/79873: [PATCH] audio/amp: update to 0.7.6, take maintainership Message-ID: <20050413173936.92429.qmail@mail.efaxnet.com> Resent-Message-ID: <200504131750.j3DHo362087626@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 79873 >Category: ports >Synopsis: [PATCH] audio/amp: update to 0.7.6, take maintainership >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Wed Apr 13 17:50:03 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Rodrigo Graeff >Release: FreeBSD 5.3-RELEASE i386 >Organization: >Environment: System: FreeBSD iowa.localnet 5.3-RELEASE FreeBSD 5.3-RELEASE #0: Mon Jan 10 20:53:39 BRST 2005 >Description: - Update to 0.7.6 - Change pkg-descr to reflect the new patches changes - Take maintainership - This PR superseds PR ports/79845 Added file(s): - files/patch-audio.c - files/patch-audio.h - files/patch-audioIO_Linux.c - files/patch-dump.c - files/patch-formats.c - files/patch-getbits.c - files/patch-layer2.c - files/patch-layer3.c - files/patch-position.c - files/patch-rtbuf.c Removed file(s): - files/patch-aa - files/patch-ab Port maintainer (ports@FreeBSD.org) is cc'd. Generated with FreeBSD Port Tools 0.63 >How-To-Repeat: >Fix: --- amp-0.7.6,1.patch begins here --- diff -ruN --exclude=CVS /usr/ports/audio/amp/Makefile /root/amp/Makefile --- /usr/ports/audio/amp/Makefile Mon Mar 21 15:16:52 2005 +++ /root/amp/Makefile Wed Apr 13 14:15:10 2005 @@ -6,19 +6,16 @@ # PORTNAME= amp -PORTVERSION= 0.7.5 +PORTVERSION= 0.7.6 PORTEPOCH= 1 CATEGORIES= audio -MASTER_SITES= ftp://ftp.funet.fi/pub/sci/audio/mpeg/amp/ -DISTNAME= ${PORTNAME}-${PORTVERSION}-99 -EXTRACT_SUFX= .tgz +MASTER_SITES= http://www-users.cs.umn.edu/~wburdick/ftp/ -MAINTAINER= ports@FreeBSD.org +MAINTAINER= delphus@gmail.com COMMENT= Another mp3 player GNU_CONFIGURE= yes USE_GMAKE= yes -MAKE_ARGS= CC="${CC}" MAN1= amp.1 PLIST_FILES= bin/amp diff -ruN --exclude=CVS /usr/ports/audio/amp/distinfo /root/amp/distinfo --- /usr/ports/audio/amp/distinfo Mon Mar 21 15:16:52 2005 +++ /root/amp/distinfo Tue Apr 12 23:13:12 2005 @@ -1,2 +1,2 @@ -MD5 (amp-0.7.5-99.tgz) = 34b2345a4648e9ea652baddbc2288a75 -SIZE (amp-0.7.5-99.tgz) = 154473 +MD5 (amp-0.7.6.tar.gz) = c12a27ac84b417bdac3330c3aa366122 +SIZE (amp-0.7.6.tar.gz) = 100337 diff -ruN --exclude=CVS /usr/ports/audio/amp/files/patch-aa /root/amp/files/patch-aa --- /usr/ports/audio/amp/files/patch-aa Fri Aug 23 18:49:50 2002 +++ /root/amp/files/patch-aa Wed Dec 31 21:00:00 1969 @@ -1,41 +0,0 @@ ---- audioIO_Linux.c.orig Sat May 31 10:47:58 1997 -+++ audioIO_Linux.c Fri Aug 23 14:46:27 2002 -@@ -21,12 +21,14 @@ - #ifdef HAVE_MACHINE_SOUNDCARD_H - #include <machine/soundcard.h> - #else --#include <linux/soundcard.h> -+#include <sys/soundcard.h> - #endif - - /* optimal fragment size */ - -+#ifndef OS_BSD - int AUSIZ = 0; -+#endif - - /* declare these static to effectively isolate the audio device */ - -@@ -42,6 +44,9 @@ - void - audioOpen(int frequency, int stereo, int volume) - { -+#ifdef OS_BSD -+ int temp; -+#endif - int supportedMixers, play_format=AFMT_S16_LE; - - if ((audio_fd = open ("/dev/dsp", O_WRONLY, 0)) == -1) -@@ -78,7 +83,12 @@ - if (volume != -1) - audioSetVolume(volume); - -+#ifdef OS_BSD -+ temp = AUSIZ; -+ if (ioctl(audio_fd, SNDCTL_DSP_GETBLKSIZE, &temp) == -1) -+#else - if (ioctl(audio_fd, SNDCTL_DSP_GETBLKSIZE, &AUSIZ) == -1) -+#endif - die("Unable to get fragment size\n"); - } - diff -ruN --exclude=CVS /usr/ports/audio/amp/files/patch-ab /root/amp/files/patch-ab --- /usr/ports/audio/amp/files/patch-ab Mon Mar 21 15:16:52 2005 +++ /root/amp/files/patch-ab Wed Dec 31 21:00:00 1969 @@ -1,33 +0,0 @@ ---- configure.orig Wed Feb 16 14:16:08 2005 -+++ configure Wed Feb 16 14:16:54 2005 -@@ -1323,11 +1323,6 @@ - ARCH_TYPE=`uname -m` - echo "$ac_t""$ARCH_TYPE" 1>&6 - --CC= --CFLAGS= --LDFLAGS= --CFLAGS_ARCH= -- - - - -@@ -1340,17 +1335,10 @@ - ;; - - Linux|FreeBSD) -- CC="gcc" -- if test "$ARCH_TYPE" = "i486" ; then -- CFLAGS_ARCH="-m486" -- fi -- if test "$ARCH_TYPE" = "i586" ; then -- CFLAGS_ARCH="-i586 -pipe" -- fi - if test "$OS_TYPE" = "FreeBSD" ; then - OS_TYPE="BSD" - fi -- CFLAGS="-O6 -ffast-math -fomit-frame-pointer -DNO_BYTE_SWAPPING ${CFLAGS_ARCH}" -+ CFLAGS="${CFLAGS} -ffast-math -fomit-frame-pointer -DNO_BYTE_SWAPPING ${CFLAGS_ARCH}" - ;; - - SunOS) diff -ruN --exclude=CVS /usr/ports/audio/amp/files/patch-audio.c /root/amp/files/patch-audio.c --- /usr/ports/audio/amp/files/patch-audio.c Wed Dec 31 21:00:00 1969 +++ /root/amp/files/patch-audio.c Wed Apr 13 14:17:01 2005 @@ -0,0 +1,35 @@ +--- audio.c Sat Aug 23 08:30:21 1997 ++++ audio.c Wed Apr 13 00:22:25 2005 +@@ -56,7 +56,7 @@ + msg("{ %d } ",frameNo); + } + if (A_SHOW_TIME && !(frameNo%10)) { +- seconds=frameNo*1152/t_sampling_frequency[header->ID][header->sampling_frequency]; ++ seconds=frameNo*(header->ID==0?576:1152)/t_sampling_frequency[header->IDex][header->ID][header->sampling_frequency]; + minutes=seconds/60; + seconds=seconds % 60; + msg("[%d:%02d]",minutes,seconds); +@@ -245,10 +245,6 @@ + switch (err) { + case GETHDR_ERR: die("error reading mpeg bitstream. exiting.\n"); + break; +- case GETHDR_NS : warn("this is a file in MPEG 2.5 format, which is not defined\n"); +- warn("by ISO/MPEG. It is \"a special Fraunhofer format\".\n"); +- warn("amp does not support this format. sorry.\n"); +- break; + case GETHDR_FL1: warn("ISO/MPEG layer 1 is not supported by amp (yet).\n"); + break; + case GETHDR_FF : warn("free format bitstreams are not supported. sorry.\n"); +@@ -268,10 +264,10 @@ + { + if (A_AUDIO_PLAY) + if (AUDIO_BUFFER_SIZE==0) +- audioOpen(t_sampling_frequency[header->ID][header->sampling_frequency], ++ audioOpen(t_sampling_frequency[header->IDex][header->ID][header->sampling_frequency], + (header->mode!=3 && !A_DOWNMIX),A_SET_VOLUME); + else +- audioBufferOpen(t_sampling_frequency[header->ID][header->sampling_frequency], ++ audioBufferOpen(t_sampling_frequency[header->IDex][header->ID][header->sampling_frequency], + (header->mode!=3 && !A_DOWNMIX),A_SET_VOLUME); + return 0; + } diff -ruN --exclude=CVS /usr/ports/audio/amp/files/patch-audio.h /root/amp/files/patch-audio.h --- /usr/ports/audio/amp/files/patch-audio.h Wed Dec 31 21:00:00 1969 +++ /root/amp/files/patch-audio.h Wed Apr 13 14:17:01 2005 @@ -0,0 +1,114 @@ +--- audio.h Thu Aug 21 10:00:18 1997 ++++ audio.h Wed Apr 13 00:21:47 2005 +@@ -9,6 +9,7 @@ + #include <stdio.h> + + struct AUDIO_HEADER { ++ int IDex; + int ID; + int layer; + int protection_bit; +@@ -55,8 +56,8 @@ + + extern int scalefac_l[2][2][22]; + extern int scalefac_s[2][2][13][3]; +-extern int t_b8_l[2][3][22]; +-extern int t_b8_s[2][3][13]; ++extern int t_b8_l[2][2][3][22]; ++extern int t_b8_s[2][2][3][13]; + extern short t_bitrate[2][3][15]; + + extern int is[2][578]; +@@ -64,7 +65,7 @@ + + extern int *t_l,*t_s; + extern int nch; +-extern int t_sampling_frequency[2][3]; ++extern int t_sampling_frequency[2][2][3]; + + extern int A_QUIET,A_SHOW_CNT,A_FORMAT_WAVE,A_DUMP_BINARY; + extern int A_WRITE_TO_AUDIO,A_WRITE_TO_FILE; +@@ -106,9 +107,14 @@ + + int *t_l,*t_s; + int nch; +-int t_sampling_frequency[2][3] = { +-{ 22050 , 24000 , 16000}, +-{ 44100 , 48000 , 32000} ++int t_sampling_frequency[2][2][3] = { ++ { /* MPEG 2.5 samplerates */ ++ { 11025, 12000, 8000}, ++ { 0, } ++ },{ /* MPEG 2.0/1.0 samplerates */ ++ { 22050 , 24000 , 16000}, ++ { 44100 , 48000 , 32000} ++ } + }; + + /* GUI control stuff */ +@@ -143,28 +149,47 @@ + /* the last sfb is given implicitly on pg.28. of the standard. scalefactors + * for that one are 0, pretab also + */ ++/* The new leftmost index is for IDex, so the first six (only three used) ++ are for MPEG 2.5, and the next six are for MPEG 1.0, 2.0 ++*/ + /* leftmost index denotes ID, so first three tables are for MPEG2 (header->ID==0) + * and the other three are for MPEG1 (header->ID==1) + */ + /* 22.05, 24, 16 */ +-int t_b8_l[2][3][22]={{ /* table B.8b ISO/IEC 11172-3 */ +-{5,11,17,23,29,35,43,53,65,79,95,115,139,167,199,237,283,335,395,463,521,575}, +-{5,11,17,23,29,35,43,53,65,79,95,113,135,161,193,231,277,331,393,463,539,575}, +-{5,11,17,23,29,35,43,53,65,79,95,115,139,167,199,237,283,335,395,463,521,575} +-},{ +-{3,7,11,15,19,23,29,35,43,51,61,73,89,109,133,161,195,237,287,341,417,575}, +-{3,7,11,15,19,23,29,35,41,49,59,71,87,105,127,155,189,229,275,329,383,575}, +-{3,7,11,15,19,23,29,35,43,53,65,81,101,125,155,193,239,295,363,447,549,575} +-}}; +-int t_b8_s[2][3][13]={{ /* table B.8b ISO/IEC 11172-3 */ +-{3,7,11,17,23,31,41,55,73,99,131,173,191}, +-{3,7,11,17,25,35,47,61,79,103,135,179,191}, +-{3,7,11,17,25,35,47,61,79,103,133,173,191} +-},{ +-{3,7,11,15,21,29,39,51,65,83,105,135,191}, +-{3,7,11,15,21,27,37,49,63,79,99,125,191}, +-{3,7,11,15,21,29,41,57,77,103,137,179,191} +-}}; ++int t_b8_l[2][2][3][22]={ ++ {{ /* MPEG 2.5; This table probably isn't correct. */ ++ {5,11,17,23,29,35,43,53,65,79,95,115,139,167,199,237,283,335,395,463,521,575}, ++ {5,11,17,23,29,35,43,53,65,79,95,115,139,167,199,237,283,335,395,463,521,575}, ++ {11,23,35,47,59,71,87,107,131,159,191,231,279,335,399,475,565,567,569,571,573,575} ++ },{ ++ {0,}, ++ }},{{ /* table B.8b ISO/IEC 11172-3 (MPEG 1.0/2.0) */ ++ {5,11,17,23,29,35,43,53,65,79,95,115,139,167,199,237,283,335,395,463,521,575}, ++ {5,11,17,23,29,35,43,53,65,79,95,113,135,161,193,231,277,331,393,463,539,575}, ++ {5,11,17,23,29,35,43,53,65,79,95,115,139,167,199,237,283,335,395,463,521,575} ++ },{ ++ {3,7,11,15,19,23,29,35,43,51,61,73,89,109,133,161,195,237,287,341,417,575}, ++ {3,7,11,15,19,23,29,35,41,49,59,71,87,105,127,155,189,229,275,329,383,575}, ++ {3,7,11,15,19,23,29,35,43,53,65,81,101,125,155,193,239,295,363,447,549,575} ++ }} ++}; ++int t_b8_s[2][2][3][13]={ ++ {{ /* MPEG 2.5; This table probably isn't correct. */ ++ {3,7,11,17,25,35,47,61,79,103,133,173,191}, ++ {3,7,11,17,25,35,47,61,79,103,133,173,191}, ++ {7,15,23,35,51,71,95,123,159,161,163,165,167} ++ },{ ++ {0,}, ++ }},{{ /* table B.8b ISO/IEC 11172-3 */ ++ {3,7,11,17,23,31,41,55,73,99,131,173,191}, ++ {3,7,11,17,25,35,47,61,79,103,135,179,191}, ++ {3,7,11,17,25,35,47,61,79,103,133,173,191} ++ },{ ++ {3,7,11,15,21,29,39,51,65,83,105,135,191}, ++ {3,7,11,15,21,27,37,49,63,79,99,125,191}, ++ {3,7,11,15,21,29,41,57,77,103,137,179,191} ++ }} ++}; + + int args(int argc,char **argv); + void initialise_decoder(void); diff -ruN --exclude=CVS /usr/ports/audio/amp/files/patch-audioIO_Linux.c /root/amp/files/patch-audioIO_Linux.c --- /usr/ports/audio/amp/files/patch-audioIO_Linux.c Wed Dec 31 21:00:00 1969 +++ /root/amp/files/patch-audioIO_Linux.c Wed Apr 13 14:16:55 2005 @@ -0,0 +1,41 @@ +--- audioIO_Linux.c.orig Sat May 31 10:47:58 1997 ++++ audioIO_Linux.c Fri Aug 23 14:46:27 2002 +@@ -21,12 +21,14 @@ + #ifdef HAVE_MACHINE_SOUNDCARD_H + #include <machine/soundcard.h> + #else +-#include <linux/soundcard.h> ++#include <sys/soundcard.h> + #endif + + /* optimal fragment size */ + ++#ifndef OS_BSD + int AUSIZ = 0; ++#endif + + /* declare these static to effectively isolate the audio device */ + +@@ -42,6 +44,9 @@ + void + audioOpen(int frequency, int stereo, int volume) + { ++#ifdef OS_BSD ++ int temp; ++#endif + int supportedMixers, play_format=AFMT_S16_LE; + + if ((audio_fd = open ("/dev/dsp", O_WRONLY, 0)) == -1) +@@ -78,7 +83,12 @@ + if (volume != -1) + audioSetVolume(volume); + ++#ifdef OS_BSD ++ temp = AUSIZ; ++ if (ioctl(audio_fd, SNDCTL_DSP_GETBLKSIZE, &temp) == -1) ++#else + if (ioctl(audio_fd, SNDCTL_DSP_GETBLKSIZE, &AUSIZ) == -1) ++#endif + die("Unable to get fragment size\n"); + } + diff -ruN --exclude=CVS /usr/ports/audio/amp/files/patch-dump.c /root/amp/files/patch-dump.c --- /usr/ports/audio/amp/files/patch-dump.c Wed Dec 31 21:00:00 1969 +++ /root/amp/files/patch-dump.c Wed Apr 13 14:17:01 2005 @@ -0,0 +1,28 @@ +--- dump.c Sat May 31 17:19:38 1997 ++++ dump.c Wed Apr 13 00:21:47 2005 +@@ -46,19 +46,21 @@ + void show_header(struct AUDIO_HEADER *header) + { + int bitrate=t_bitrate[header->ID][3-header->layer][header->bitrate_index]; +-int fs=t_sampling_frequency[header->ID][header->sampling_frequency]; +-int mpg,layer; ++int fs=t_sampling_frequency[header->IDex][header->ID][header->sampling_frequency]; ++int mpg,mpg_ex,layer; + char stm[8]; + if (A_QUIET) return; + layer=4-header->layer; + if (header->ID==1) mpg=1; + else mpg=2; ++ if (header->IDex==1) mpg_ex=0; ++ else mpg_ex=5; + if (header->mode==3) strcpy(stm,"mono"); + else strcpy(stm,"stereo"); + + printf("\n\ + Properties: %s %dHz\n\ +-Coding Method: MPEG%1d.0 layer%1d\n\ ++Coding Method: MPEG%1d.%1d layer%1d\n\ + Bitrate: %dkbit/s\n"\ +- ,stm,fs,mpg,layer,bitrate); ++ ,stm,fs,mpg,mpg_ex,layer,bitrate); + } diff -ruN --exclude=CVS /usr/ports/audio/amp/files/patch-formats.c /root/amp/files/patch-formats.c --- /usr/ports/audio/amp/files/patch-formats.c Wed Dec 31 21:00:00 1969 +++ /root/amp/files/patch-formats.c Wed Apr 13 14:17:01 2005 @@ -0,0 +1,11 @@ +--- formats.c Sat May 31 14:47:58 1997 ++++ formats.c Wed Apr 13 00:21:47 2005 +@@ -27,7 +27,7 @@ + int len,fs,i; + + len=ftell(out_file)-44; +- fs=t_sampling_frequency[header->ID][header->sampling_frequency]; ++ fs=t_sampling_frequency[header->IDex][header->ID][header->sampling_frequency]; + rewind(out_file); + fwrite(ispred,1,20,out_file); + diff -ruN --exclude=CVS /usr/ports/audio/amp/files/patch-getbits.c /root/amp/files/patch-getbits.c --- /usr/ports/audio/amp/files/patch-getbits.c Wed Dec 31 21:00:00 1969 +++ /root/amp/files/patch-getbits.c Wed Apr 13 14:17:01 2005 @@ -0,0 +1,41 @@ +--- getbits.c Wed Aug 20 10:30:21 1997 ++++ getbits.c Wed Apr 13 00:21:47 2005 +@@ -91,6 +91,7 @@ + */ + static inline void parse_header(struct AUDIO_HEADER *header) + { ++ header->IDex=_getbits(1); + header->ID=_getbits(1); + header->layer=_getbits(2); + header->protection_bit=_getbits(1); +@@ -112,11 +113,17 @@ + header->bitrate_index==15 || + header->sampling_frequency==3) return -1; + ++ /* Rule out invalid MPEG 2.5 headers */ ++ if (header->IDex==0 && ++ (header->ID==1 || header->layer!=1 || ++ header->bitrate_index > 8)) return -1; ++ + /* an additional check to make shure that stuffing never gets mistaken + * for a syncword. This rules out some legal layer1 streams, but who + * cares about layer1 anyway :-). I must get this right sometime. + */ + if ( header->ID==1 && header->layer==3 && header->protection_bit==1) return -1; ++ + return 0; + } + +@@ -132,11 +139,7 @@ + if ((retval=_fillbfr(4))!=0) return retval; + + for(;;) { +- while ((s=_getbits(12)) != 0xfff) { +- if (s==0xffe) { +- parse_header(&tmp); +- if (header_sanity_check(&tmp)==0) return GETHDR_NS; +- } ++ while (_getbits(11) != 0x7ff) { + if ((retval=readsync())!=0) return retval; + } + diff -ruN --exclude=CVS /usr/ports/audio/amp/files/patch-layer2.c /root/amp/files/patch-layer2.c --- /usr/ports/audio/amp/files/patch-layer2.c Wed Dec 31 21:00:00 1969 +++ /root/amp/files/patch-layer2.c Wed Apr 13 14:17:01 2005 @@ -0,0 +1,11 @@ +--- layer2.c Mon Jun 16 14:53:15 1997 ++++ layer2.c Wed Apr 13 00:21:47 2005 +@@ -34,7 +34,7 @@ + if (header->protection_bit==0) hsize+=2; + + bitrate=t_bitrate[header->ID][3-header->layer][header->bitrate_index]; +- fs=t_sampling_frequency[header->ID][header->sampling_frequency]; ++ fs=t_sampling_frequency[header->IDex][header->ID][header->sampling_frequency]; + if (header->ID) mean_frame_size=144000*bitrate/fs; + else mean_frame_size=72000*bitrate/fs; + diff -ruN --exclude=CVS /usr/ports/audio/amp/files/patch-layer3.c /root/amp/files/patch-layer3.c --- /usr/ports/audio/amp/files/patch-layer3.c Wed Dec 31 21:00:00 1969 +++ /root/amp/files/patch-layer3.c Wed Apr 13 14:17:01 2005 @@ -0,0 +1,22 @@ +--- layer3.c Mon Aug 18 09:42:17 1997 ++++ layer3.c Wed Apr 13 00:21:47 2005 +@@ -61,7 +61,7 @@ + /* MPEG2 only has one granule + */ + bitrate=t_bitrate[header->ID][3-header->layer][header->bitrate_index]; +- fs=t_sampling_frequency[header->ID][header->sampling_frequency]; ++ fs=t_sampling_frequency[header->IDex][header->ID][header->sampling_frequency]; + if (header->ID) mean_frame_size=144000*bitrate/fs; + else mean_frame_size=72000*bitrate/fs; + +@@ -96,8 +96,8 @@ + + /* these two should go away + */ +- t_l=&t_b8_l[header->ID][header->sampling_frequency][0]; +- t_s=&t_b8_s[header->ID][header->sampling_frequency][0]; ++ t_l=&t_b8_l[header->IDex][header->ID][header->sampling_frequency][0]; ++ t_s=&t_b8_s[header->IDex][header->ID][header->sampling_frequency][0]; + + /* debug/dump stuff + */ diff -ruN --exclude=CVS /usr/ports/audio/amp/files/patch-position.c /root/amp/files/patch-position.c --- /usr/ports/audio/amp/files/patch-position.c Wed Dec 31 21:00:00 1969 +++ /root/amp/files/patch-position.c Wed Apr 13 14:17:01 2005 @@ -0,0 +1,20 @@ +--- position.c Sat May 31 14:47:58 1997 ++++ position.c Wed Apr 13 00:21:47 2005 +@@ -40,7 +40,7 @@ + } + + bitrate=t_bitrate[tmp.ID][3-tmp.layer][tmp.bitrate_index]; +- fs=t_sampling_frequency[tmp.ID][tmp.sampling_frequency]; ++ fs=t_sampling_frequency[tmp.IDex][tmp.ID][tmp.sampling_frequency]; + if (tmp.ID) mean_frame_size=144000*bitrate/fs; + else mean_frame_size=72000*bitrate/fs; + fillbfr(mean_frame_size + tmp.padding_bit - hsize); +@@ -73,7 +73,7 @@ + * so we have to go back one frame + 4 bytes + 1 byte (in case padding was used). + */ + bitrate=t_bitrate[tmp.ID][3-tmp.layer][tmp.bitrate_index]; +- fs=t_sampling_frequency[tmp.ID][tmp.sampling_frequency]; ++ fs=t_sampling_frequency[tmp.IDex][tmp.ID][tmp.sampling_frequency]; + if (tmp.ID) mean_frame_size=144000*bitrate/fs; + else mean_frame_size=72000*bitrate/fs; + diff -ruN --exclude=CVS /usr/ports/audio/amp/files/patch-rtbuf.c /root/amp/files/patch-rtbuf.c --- /usr/ports/audio/amp/files/patch-rtbuf.c Wed Dec 31 21:00:00 1969 +++ /root/amp/files/patch-rtbuf.c Wed Apr 13 14:17:01 2005 @@ -0,0 +1,21 @@ +--- rtbuf.c Sat Aug 23 07:16:40 1997 ++++ rtbuf.c Wed Apr 13 00:21:47 2005 +@@ -337,15 +337,15 @@ + (mpegheader->mode != 3) ? "stereo" : "mono"); + return -1; + } +- apar = t_sampling_frequency[mpegheader->ID][mpegheader->sampling_frequency]; ++ apar = t_sampling_frequency[mpegheader->IDex][mpegheader->ID][mpegheader->sampling_frequency]; + if (ioctl(audio_fd, SNDCTL_DSP_SPEED, &apar) == -1) { + perror("ioctl: SNDCTL_DSP_SPEED"); + return -1; + } +- if (apar != t_sampling_frequency[mpegheader->ID][mpegheader->sampling_frequency]) { ++ if (apar != t_sampling_frequency[mpegheader->IDex][mpegheader->ID][mpegheader->sampling_frequency]) { + fprintf(stderr, "Warning: requested sampling rate %d does not " + "match effective %d\n", +- t_sampling_frequency[mpegheader->ID][mpegheader->sampling_frequency], ++ t_sampling_frequency[mpegheader->IDex][mpegheader->ID][mpegheader->sampling_frequency], + apar); + } + diff -ruN --exclude=CVS /usr/ports/audio/amp/pkg-descr /root/amp/pkg-descr --- /usr/ports/audio/amp/pkg-descr Sun Aug 31 19:20:00 1997 +++ /root/amp/pkg-descr Wed Apr 13 00:58:43 2005 @@ -1,10 +1,9 @@ ------------------------- From the README file ------------------------ amp (Audio Mpeg Player) is an MPEG audio decoder which I originally started putting together as a side project of the MPEG hardware design project at FER/Zagreb - just to confirm my knowledge of the standard. It works with -both MPEG1 and MPEG2 audio streams (except for the multichannel extensions -defined in MPEG2), layer3 only for now. ----------------------------- End of quote ---------------------------- +both MPEG1 and MPEG2 audio streams, layer3 and for now the multichannel +extensions defined in MPEG2 too. +patch by justin@nullsoft.com -- Vanilla -vanilla@MinJe.com.TW +Rodrigo Graeff +delphus@gmail.org --- amp-0.7.6,1.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050413173936.92429.qmail>