diff options
author | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> | 2003-03-27 20:12:38 +0000 |
---|---|---|
committer | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> | 2003-03-27 20:12:38 +0000 |
commit | 870e06f4308c93bfc386fde3cf06d19e95185cc4 (patch) | |
tree | 56738a351e7973fc61187565ff2235f424e375ec /audio/toolame | |
parent | f84ca11d4bd2f5a6b429873a2ebe36e2334c7570 (diff) | |
download | ports-870e06f4308c93bfc386fde3cf06d19e95185cc4.tar.gz ports-870e06f4308c93bfc386fde3cf06d19e95185cc4.zip |
Notes
Diffstat (limited to 'audio/toolame')
-rw-r--r-- | audio/toolame/Makefile | 8 | ||||
-rw-r--r-- | audio/toolame/distinfo | 2 | ||||
-rw-r--r-- | audio/toolame/files/patch-psycho_3.c | 51 | ||||
-rw-r--r-- | audio/toolame/files/patch-psycho_4.c | 22 | ||||
-rw-r--r-- | audio/toolame/pkg-plist | 5 |
5 files changed, 77 insertions, 11 deletions
diff --git a/audio/toolame/Makefile b/audio/toolame/Makefile index 29a6a23ec836..2efc9e4c952e 100644 --- a/audio/toolame/Makefile +++ b/audio/toolame/Makefile @@ -6,7 +6,7 @@ # PORTNAME= toolame -PORTVERSION= 0.2k +PORTVERSION= 0.2l CATEGORIES= audio MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} @@ -20,7 +20,7 @@ USE_GMAKE= yes USE_REINPLACE= yes ALL_TARGET= ${PORTNAME} -DOC_FILES= CHANGES COPYING FUTURE GPL HISTORY README README.VBR +DOC_FILES= FUTURE HISTORY LGPL.txt README pre-everything:: .ifndef(WITH_OPTIMIZED_CFLAGS) @@ -47,10 +47,6 @@ post-patch: @${REINPLACE_CMD} -E -e \ 's@\$$\((ARCH|OPTIM|WARNINGS)\)@@g' \ ${WRKSRC}/Makefile -# we can't rely on existence of _sincos in gcc - @${REINPLACE_CMD} -E \ - -e 's|-DSINCOS||' \ - ${WRKSRC}/Makefile post-configure: # C{C,FLAGS} safeness diff --git a/audio/toolame/distinfo b/audio/toolame/distinfo index 5e1542dc85e1..4182e8054eb2 100644 --- a/audio/toolame/distinfo +++ b/audio/toolame/distinfo @@ -1 +1 @@ -MD5 (toolame-02k.tgz) = 9cb28bac4c74d8cd9b07bb3849d0543c +MD5 (toolame-02l.tgz) = 5946e2dd78fbb57e54386b3b5d873fee diff --git a/audio/toolame/files/patch-psycho_3.c b/audio/toolame/files/patch-psycho_3.c new file mode 100644 index 000000000000..e602e68edfe0 --- /dev/null +++ b/audio/toolame/files/patch-psycho_3.c @@ -0,0 +1,51 @@ +--- psycho_3.c.orig Thu Mar 27 16:46:02 2003 ++++ psycho_3.c Thu Mar 27 16:51:53 2003 +@@ -131,10 +131,10 @@ + int i; + static int init = 0; + static FLOAT *window; ++ register const FLOAT sqrt_8_over_3 = pow (8.0 / 3.0, 0.5); + + if (!init) { /* calculate window function for the Fourier transform */ + window = (FLOAT *) mem_alloc (sizeof (DFFT), "window"); +- register FLOAT sqrt_8_over_3 = pow (8.0 / 3.0, 0.5); + for (i = 0; i < BLKSIZE; i++) { + window[i] = sqrt_8_over_3 * 0.5 * (1 - cos (2.0 * PI * i / (BLKSIZE))) / BLKSIZE; + } +@@ -340,6 +340,7 @@ + int i,j,k; + FLOAT LTtm[SUBSIZE]; + FLOAT LTnm[SUBSIZE]; ++ FLOAT av,dz,vf; + + for (i=0;i<SUBSIZE;i++) { + LTtm[i] = DBMIN; +@@ -353,10 +354,9 @@ + if (tonelabel[k]==TONE) { + for (j=0;j<SUBSIZE;j++) { + /* figure out how it masks the levels around it */ +- FLOAT dz = bark[freq_subset[j]] - bark[k]; ++ dz = bark[freq_subset[j]] - bark[k]; + if (dz >= -3.0 && dz < 8.0) { +- FLOAT vf; +- FLOAT av = -1.525 - 0.275 * bark[k] - 4.5 + Xtm[k]; ++ av = -1.525 - 0.275 * bark[k] - 4.5 + Xtm[k]; + /* masking function for lower & upper slopes */ + if (dz < -1) + vf = 17 * (dz + 1) - (0.4 * Xtm[k] + 6); +@@ -434,6 +434,7 @@ + void psycho_3_init(options *glopts) { + int i; + int cbase = 0; /* current base index for the bark range calculation */ ++ register const FLOAT sfreq = (FLOAT) s_freq[header->version][header->sampling_frequency] * 1000; + + fft_buf = (D1408 *) mem_alloc ((long) sizeof (D1408) * 2, "fft_buf"); + +@@ -441,7 +442,6 @@ + psycho_3_init_add_db(); + + /* For each spectral line calculate the bark and the ATH (in dB) */ +- FLOAT sfreq = (FLOAT) s_freq[header->version][header->sampling_frequency] * 1000; + for (i=1;i<HBLKSIZE; i++) { + FLOAT freq = i * sfreq/BLKSIZE; + bark[i] = freq2bark(freq); diff --git a/audio/toolame/files/patch-psycho_4.c b/audio/toolame/files/patch-psycho_4.c new file mode 100644 index 000000000000..df557a4cdf30 --- /dev/null +++ b/audio/toolame/files/patch-psycho_4.c @@ -0,0 +1,22 @@ +--- psycho_4.c.orig Thu Mar 27 16:58:41 2003 ++++ psycho_4.c Thu Mar 27 16:59:20 2003 +@@ -330,6 +330,8 @@ + void psycho_4_init (double sfreq, options *glopts) + { + int i, j; ++ int partition_count; /* keep a count of the partitions */ ++ int cbase; /* current base index for the bark range calculation */ + + /* Allocate memory for all the static variables */ + psycho_4_allocmem(); +@@ -365,8 +367,8 @@ + Starting from line 0, all lines within 0.33 of the starting + bark are added to the same partition. When a line is greater + by 0.33 of a bark, start a new partition. */ +- int partition_count = 0; /* keep a count of the partitions */ +- int cbase = 0; /* current base index for the bark range calculation */ ++ partition_count = 0; ++ cbase = 0; + for (i=0;i<HBLKSIZE;i++) { + if ((bark[i] - bark[cbase]) > 0.33) { /* 1/3 critical band? */ + /* this frequency line is too different from the starting line, diff --git a/audio/toolame/pkg-plist b/audio/toolame/pkg-plist index a07bba77377f..501eb7b49a5b 100644 --- a/audio/toolame/pkg-plist +++ b/audio/toolame/pkg-plist @@ -1,9 +1,6 @@ bin/toolame -%%PORTDOCS%%share/doc/toolame/CHANGES -%%PORTDOCS%%share/doc/toolame/COPYING %%PORTDOCS%%share/doc/toolame/FUTURE -%%PORTDOCS%%share/doc/toolame/GPL %%PORTDOCS%%share/doc/toolame/HISTORY +%%PORTDOCS%%share/doc/toolame/LGPL.txt %%PORTDOCS%%share/doc/toolame/README -%%PORTDOCS%%share/doc/toolame/README.VBR %%PORTDOCS%%@dirrm share/doc/toolame |