aboutsummaryrefslogtreecommitdiffstats
path: root/audio/amp
diff options
context:
space:
mode:
authornovel <novel@FreeBSD.org>2005-04-17 23:19:41 +0800
committernovel <novel@FreeBSD.org>2005-04-17 23:19:41 +0800
commit2a37fa3596337c8c2ebe17afde036ad48608f2f8 (patch)
tree0e6a14cc22aada738d12306d66097150cb1f9faf /audio/amp
parente3731e886b3c5b6b9fb00818891f3d93d8ced3ad (diff)
downloadfreebsd-ports-gnome-2a37fa3596337c8c2ebe17afde036ad48608f2f8.tar.gz
freebsd-ports-gnome-2a37fa3596337c8c2ebe17afde036ad48608f2f8.tar.zst
freebsd-ports-gnome-2a37fa3596337c8c2ebe17afde036ad48608f2f8.zip
- Update to 0.7.6
- Change pkg-descr to reflect the new patches changes - Pass maintainership to submitter PR: 79873 Submitted by: Rodrigo Graeff <delphus@gmail.com>
Diffstat (limited to 'audio/amp')
-rw-r--r--audio/amp/Makefile9
-rw-r--r--audio/amp/distinfo4
-rw-r--r--audio/amp/files/patch-ab33
-rw-r--r--audio/amp/files/patch-audio.c35
-rw-r--r--audio/amp/files/patch-audio.h114
-rw-r--r--audio/amp/files/patch-audioIO_Linux.c (renamed from audio/amp/files/patch-aa)0
-rw-r--r--audio/amp/files/patch-dump.c28
-rw-r--r--audio/amp/files/patch-formats.c11
-rw-r--r--audio/amp/files/patch-getbits.c41
-rw-r--r--audio/amp/files/patch-layer2.c11
-rw-r--r--audio/amp/files/patch-layer3.c22
-rw-r--r--audio/amp/files/patch-position.c20
-rw-r--r--audio/amp/files/patch-rtbuf.c21
-rw-r--r--audio/amp/pkg-descr11
14 files changed, 311 insertions, 49 deletions
diff --git a/audio/amp/Makefile b/audio/amp/Makefile
index 21acafb0c3b7..998e64efc6a8 100644
--- a/audio/amp/Makefile
+++ b/audio/amp/Makefile
@@ -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 --git a/audio/amp/distinfo b/audio/amp/distinfo
index c2aa33cb2629..058297e4a37d 100644
--- a/audio/amp/distinfo
+++ b/audio/amp/distinfo
@@ -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 --git a/audio/amp/files/patch-ab b/audio/amp/files/patch-ab
deleted file mode 100644
index f5daaa14c312..000000000000
--- a/audio/amp/files/patch-ab
+++ /dev/null
@@ -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 --git a/audio/amp/files/patch-audio.c b/audio/amp/files/patch-audio.c
new file mode 100644
index 000000000000..ba8aed625001
--- /dev/null
+++ b/audio/amp/files/patch-audio.c
@@ -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 --git a/audio/amp/files/patch-audio.h b/audio/amp/files/patch-audio.h
new file mode 100644
index 000000000000..88940fd95be2
--- /dev/null
+++ b/audio/amp/files/patch-audio.h
@@ -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 --git a/audio/amp/files/patch-aa b/audio/amp/files/patch-audioIO_Linux.c
index b5d69bf22062..b5d69bf22062 100644
--- a/audio/amp/files/patch-aa
+++ b/audio/amp/files/patch-audioIO_Linux.c
diff --git a/audio/amp/files/patch-dump.c b/audio/amp/files/patch-dump.c
new file mode 100644
index 000000000000..efefaa8c74be
--- /dev/null
+++ b/audio/amp/files/patch-dump.c
@@ -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 --git a/audio/amp/files/patch-formats.c b/audio/amp/files/patch-formats.c
new file mode 100644
index 000000000000..24028dceee75
--- /dev/null
+++ b/audio/amp/files/patch-formats.c
@@ -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 --git a/audio/amp/files/patch-getbits.c b/audio/amp/files/patch-getbits.c
new file mode 100644
index 000000000000..65a78b07e73b
--- /dev/null
+++ b/audio/amp/files/patch-getbits.c
@@ -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 --git a/audio/amp/files/patch-layer2.c b/audio/amp/files/patch-layer2.c
new file mode 100644
index 000000000000..98d27660e6f2
--- /dev/null
+++ b/audio/amp/files/patch-layer2.c
@@ -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 --git a/audio/amp/files/patch-layer3.c b/audio/amp/files/patch-layer3.c
new file mode 100644
index 000000000000..29291ac4f8c0
--- /dev/null
+++ b/audio/amp/files/patch-layer3.c
@@ -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 --git a/audio/amp/files/patch-position.c b/audio/amp/files/patch-position.c
new file mode 100644
index 000000000000..2d6a169401fc
--- /dev/null
+++ b/audio/amp/files/patch-position.c
@@ -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 --git a/audio/amp/files/patch-rtbuf.c b/audio/amp/files/patch-rtbuf.c
new file mode 100644
index 000000000000..b9285dbb42c4
--- /dev/null
+++ b/audio/amp/files/patch-rtbuf.c
@@ -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 --git a/audio/amp/pkg-descr b/audio/amp/pkg-descr
index d36cff99bdc7..295c82899664 100644
--- a/audio/amp/pkg-descr
+++ b/audio/amp/pkg-descr
@@ -1,10 +1,5 @@
------------------------- From the README file ------------------------
-amp (Audio Mpeg Player) is an MPEG audio decoder which I originally started
+amp (Audio Mpeg Player) is an MPEG audio decoder which was 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 ----------------------------
-
-- Vanilla
-vanilla@MinJe.com.TW
+both MPEG1 and MPEG2 audio streams, layer3 and for now the multichannel
+extensions defined in MPEG2 too.