tcl-snack/snack2.2.10-nomp3.patch
2008-09-12 21:14:51 +00:00

161 lines
6.4 KiB
Diff

diff -up snack2.2.10/doc/python-man.html.BAD snack2.2.10/doc/python-man.html
--- snack2.2.10/doc/python-man.html.BAD 2008-06-11 15:12:44.000000000 -0400
+++ snack2.2.10/doc/python-man.html 2008-06-11 15:13:47.000000000 -0400
@@ -158,7 +158,7 @@ than or equal to 1, or <tt>"Mono"</tt> o
be read -- not all of them can be&nbsp;<emph>written</emph>.)</dd>
<ul type="">
<li> "WAV"</li>
- <li> "MP3"</li>
+ <li> "MP3" (MP3 support is disabled in Fedora releases)</li>
<li> "AU"</li>
<li> "SND"</li>
<li> "AIFF"</li>
@@ -381,7 +381,7 @@ operation</td>
<h4> read (<i>filename</i>)</h4>
Reads new sound data from a file. Current supported file formats are WAV,
-MP3, AU, SND, AIFF, SD, SMP, CSL, and RAW binary. The command returns the
+MP3 (disabled in Fedora), AU, SND, AIFF, SD, SMP, CSL, and RAW binary. The command returns the
file format detected. It is possible to force a file to be read as RAW using
by setting the option <b>fileformat=RAW</b>. In this case, properties of
the sound data can be specified by hand, using the <b>rate, channels, encoding,
diff -up snack2.2.10/generic/jkSound.h.BAD snack2.2.10/generic/jkSound.h
--- snack2.2.10/generic/jkSound.h.BAD 2008-06-11 15:15:03.000000000 -0400
+++ snack2.2.10/generic/jkSound.h 2008-06-11 15:15:44.000000000 -0400
@@ -413,6 +413,9 @@ extern int swapCmd(Sound *s, Tcl_Interp
#define MP3_STRING "MP3"
#define CSL_STRING "CSL"
+/*
+ * MP3 code is disabled due to patents.
+ *
extern char *GuessMP3File(char *buf, int len);
extern int GetMP3Header(Sound *s, Tcl_Interp *interp, Tcl_Channel ch,
@@ -434,6 +437,8 @@ extern void FreeMP3Header(Sound *s);
extern int ConfigMP3Header(Sound *s, Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]);
+ */
+
typedef enum {
SNACK_WIN_HAMMING,
diff -up snack2.2.10/unix/Makefile.in.BAD snack2.2.10/unix/Makefile.in
--- snack2.2.10/unix/Makefile.in.BAD 2008-06-11 15:09:59.000000000 -0400
+++ snack2.2.10/unix/Makefile.in 2008-06-11 15:10:14.000000000 -0400
@@ -43,13 +43,13 @@ SHLIB_SUFFIX = @SHLIB_SUFFIX@
all: libsound${SHLIB_SUFFIX} libsnack${SHLIB_SUFFIX} @DOSTUBLIB@ @LIBNIST@ @LIBOGG@ editversion
OBJSO = sound.o jkSound.o jkSoundEngine.o jkSoundEdit.o jkSoundFile.o \
- g711.o @AOBJ@ jkFormatMP3.o jkSoundProc.o ffa.o jkPitchCmd.o \
+ g711.o @AOBJ@ jkSoundProc.o ffa.o jkPitchCmd.o \
@STUBINITOBJ@ jkAudio.o jkMixer.o shape.o jkFilter.o jkSynthesis.o \
jkFilterIIR.o jkGetF0.o sigproc.o jkFormant.o sigproc2.o
OBJSN = snack.o jkSound.o jkSoundEngine.o jkSoundEdit.o jkSoundFile.o \
jkCanvSpeg.o jkCanvWave.o jkCanvSect.o ffa.o g711.o @AOBJ@ \
- jkFormatMP3.o jkSoundProc.o jkPitchCmd.o @STUBINITOBJ@ \
+ jkSoundProc.o jkPitchCmd.o @STUBINITOBJ@ \
jkAudio.o jkMixer.o shape.o jkFilter.o jkSynthesis.o jkFilterIIR.o \
jkGetF0.o sigproc.o jkFormant.o sigproc2.o
@@ -73,9 +73,6 @@ jkSoundFile.o: $(GENERIC_DIR)/jkSoundFil
g711.o: $(GENERIC_DIR)/g711.c
$(CC) -c $(CFLAGS) $(GENERIC_DIR)/g711.c
-jkFormatMP3.o: $(GENERIC_DIR)/jkFormatMP3.c
- $(CC) -c $(CFLAGS) $(GENERIC_DIR)/jkFormatMP3.c
-
jkSoundProc.o: $(GENERIC_DIR)/jkSoundProc.c
$(CC) -c $(CFLAGS) $(GENERIC_DIR)/jkSoundProc.c
diff -up snack2.2.10/unix/snack.tcl.BAD snack2.2.10/unix/snack.tcl
--- snack2.2.10/unix/snack.tcl.BAD 2008-06-11 15:10:44.000000000 -0400
+++ snack2.2.10/unix/snack.tcl 2008-06-11 15:11:26.000000000 -0400
@@ -216,7 +216,7 @@ namespace eval snack {
if {$::tcl_platform(platform) == "windows"} {
set l [concat {{{MS Wav Files} {.wav}} {{Smp Files} {.smp}} {{Snd Files} {.snd}} {{AU Files} {.au}} {{AIFF Files} {.aif}} {{AIFF Files} {.aiff}} {{Waves Files} {.sd}} {{MP3 Files} {.mp3}} {{CSL Files} {.nsp}}} $loadTypes {{{All Files} * }}]
} else {
- set l [concat {{{MS Wav Files} {.wav .WAV}} {{Smp Files} {.smp .SMP}} {{Snd Files} {.snd .SND}} {{AU Files} {.au .AU}} {{AIFF Files} {.aif .AIF}} {{AIFF Files} {.aiff .AIFF}} {{Waves Files} {.sd .SD}} {{MP3 Files} {.mp3 .MP3}} {{CSL Files} {.nsp .NSP}}} $loadTypes {{{All Files} * }}]
+ set l [concat {{{MS Wav Files} {.wav .WAV}} {{Smp Files} {.smp .SMP}} {{Snd Files} {.snd .SND}} {{AU Files} {.au .AU}} {{AIFF Files} {.aif .AIF}} {{AIFF Files} {.aiff .AIFF}} {{Waves Files} {.sd .SD}} {{CSL Files} {.nsp .NSP}}} $loadTypes {{{All Files} * }}]
}
return [swapListElem $l $filebox(l$fmt)]
}
@@ -229,7 +229,6 @@ namespace eval snack {
set filebox(SD) .sd
set filebox(SND) .snd
set filebox(AIFF) .aif
- set filebox(MP3) .mp3
set filebox(CSL) .nsp
set filebox(lWAV) 0
@@ -239,7 +238,7 @@ namespace eval snack {
set filebox(lAIFF) 4
# skip 2 because of aif and aiff
set filebox(lSD) 6
- set filebox(lMP3) 7
+ # skip 1 because of mp3
set filebox(lCSL) 8
set filebox(lRAW) end
# Do not forget to update indexes
@@ -350,7 +349,6 @@ namespace eval snack {
set filebox(.sd) SD
set filebox(.aif) AIFF
set filebox(.aiff) AIFF
- set filebox(.mp3) MP3
set filebox(.nsp) CSL
set filebox() WAV
diff -up snack2.2.10/generic/jkSoundFile.c.BAD snack2.2.10/generic/jkSoundFile.c
--- snack2.2.10/generic/jkSoundFile.c.BAD 2008-06-11 15:22:35.000000000 -0400
+++ snack2.2.10/generic/jkSoundFile.c 2008-06-11 15:24:16.000000000 -0400
@@ -35,9 +35,11 @@ GuessWavFile(char *buf, int len)
{
if (len < 21) return(QUE_STRING);
if (strncasecmp("RIFF", buf, strlen("RIFF")) == 0) {
+/*
if (buf[20] == 85) {
return(MP3_STRING);
}
+*/
if (strncasecmp("WAVE", &buf[8], strlen("WAVE")) == 0) {
return(WAV_STRING);
}
@@ -3305,6 +3307,8 @@ Snack_FileFormat snackRawFormat = {
(Snack_FileFormat *) NULL
};
+/*
+
Snack_FileFormat snackMp3Format = {
MP3_STRING,
GuessMP3File,
@@ -3321,6 +3325,8 @@ Snack_FileFormat snackMp3Format = {
(Snack_FileFormat *) NULL
};
+*/
+
Snack_FileFormat snackSmpFormat = {
SMP_STRING,
GuessSmpFile,
@@ -3427,15 +3433,13 @@ SnackDefineFileFormats(Tcl_Interp *inter
snackAuFormat.nextPtr = &snackSmpFormat;
snackSmpFormat.nextPtr = &snackCslFormat;
snackCslFormat.nextPtr = &snackSdFormat;
- snackSdFormat.nextPtr = &snackMp3Format;
- snackMp3Format.nextPtr = &snackRawFormat;
+ snackSdFormat.nextPtr = &snackRawFormat;
snackRawFormat.nextPtr = NULL;
}
*/
{
snackFileFormats = &snackWavFormat;
- snackWavFormat.nextPtr = &snackMp3Format;
- snackMp3Format.nextPtr = &snackAiffFormat;
+ snackWavFormat.nextPtr = &snackAiffFormat;
snackAiffFormat.nextPtr = &snackAuFormat;
snackAuFormat.nextPtr = &snackSmpFormat;
snackSmpFormat.nextPtr = &snackCslFormat;