|
|
bb8f236 |
diff -up snack2.2.10/doc/python-man.html.mpg123 snack2.2.10/doc/python-man.html
|
|
|
bb8f236 |
--- snack2.2.10/doc/python-man.html.mpg123 2005-12-14 06:29:39.000000000 -0500
|
|
|
bb8f236 |
+++ snack2.2.10/doc/python-man.html 2019-07-30 16:14:55.453593911 -0400
|
|
|
bb8f236 |
@@ -158,7 +158,6 @@ than or equal to 1, or <tt>"Mono"</tt> o
|
|
|
bb8f236 |
be read -- not all of them can be <emph>written</emph>.)
|
|
|
bb8f236 |
|
|
|
bb8f236 |
"WAV"
|
|
|
bb8f236 |
- "MP3"
|
|
|
bb8f236 |
"AU"
|
|
|
bb8f236 |
"SND"
|
|
|
bb8f236 |
"AIFF"
|
|
|
bb8f236 |
@@ -381,7 +380,7 @@ operation
|
|
|
bb8f236 |
|
|
|
bb8f236 |
read (filename)
|
|
|
bb8f236 |
Reads new sound data from a file. Current supported file formats are WAV,
|
|
|
bb8f236 |
-MP3, AU, SND, AIFF, SD, SMP, CSL, and RAW binary. The command returns the
|
|
|
bb8f236 |
+AU, SND, AIFF, SD, SMP, CSL, and RAW binary. The command returns the
|
|
|
bb8f236 |
file format detected. It is possible to force a file to be read as RAW using
|
|
|
bb8f236 |
by setting the option fileformat=RAW. In this case, properties of
|
|
|
bb8f236 |
the sound data can be specified by hand, using the rate, channels, encoding,
|
|
|
bb8f236 |
diff -up snack2.2.10/doc/tcl-man.html.mpg123 snack2.2.10/doc/tcl-man.html
|
|
|
bb8f236 |
--- snack2.2.10/doc/tcl-man.html.mpg123 2005-12-14 06:29:39.000000000 -0500
|
|
|
bb8f236 |
+++ snack2.2.10/doc/tcl-man.html 2019-07-30 16:14:55.453593911 -0400
|
|
|
bb8f236 |
@@ -46,7 +46,7 @@
|
|
|
bb8f236 |
|
|
|
bb8f236 |
|
|
|
bb8f236 |
|
|
|
bb8f236 |
-Standard extension packages (sound, snackogg, snacksphere)
|
|
|
bb8f236 |
+Standard extension packages (sound, snackogg, snackmpg, snacksphere)
|
|
|
bb8f236 |
|
|
|
bb8f236 |
|
|
|
bb8f236 |
|
|
|
bb8f236 |
@@ -650,7 +650,7 @@ fmt? ?-rate f? ?-channels n? ?-en
|
|
|
bb8f236 |
endianess? ?-start start? ?-end end? ?-guessproperties boolean?
|
|
|
bb8f236 |
?-progress callback?
|
|
|
bb8f236 |
Reads new sound data from a file. Current supported file formats are
|
|
|
bb8f236 |
-WAV, MP3, AU, SND, AIFF, SD, SMP, CSL, and RAW binary. The command returns
|
|
|
bb8f236 |
+WAV, AU, SND, AIFF, SD, SMP, CSL, and RAW binary. The command returns
|
|
|
bb8f236 |
the file format detected. It is possible to force a file to be read as
|
|
|
bb8f236 |
RAW using "-fileformat
|
|
|
bb8f236 |
RAW". In this case the properties of the
|
|
|
bb8f236 |
@@ -1064,6 +1064,8 @@ description on how to use the -progre
|
|
|
bb8f236 |
The sound package gives you the snack::audio, snack::filter, snack::mixer, and snack::sound commands. Basicly the same functions as the snack package except for graphics. This is useful on some systems if you want to use the tclsh interpreter.
|
|
|
bb8f236 |
snackogg
|
|
|
bb8f236 |
The snackogg package adds support for the Ogg/Vorbis compressed sound file format. Ogg format files and streams are detected automatically. Encoding is supported. Simply use the extension .ogg when writing files or use the option -fileformat ogg. When creating Ogg files the additional options -nominalbitrate, -maxbitrate, -minbitrate, and -comment apply.
|
|
|
bb8f236 |
+snackmpg
|
|
|
bb8f236 |
+The snackmpg package adds support for the MP3 compressed sound file format. MP3 format files and streams are detected automatically. Encoding is not currently supported. MP3 supports the following new readonly options: -author, -album, -title, -year, -tag, -genre, -played, -remain.
|
|
|
bb8f236 |
snacksphere
|
|
|
bb8f236 |
The snacksphere package adds support for reading the NIST/Sphere sound file formats. Sphere files are detected automatically.
|
|
|
bb8f236 |
|
|
|
bb8f236 |
diff -up snack2.2.10/generic/jkSoundFile.c.mpg123 snack2.2.10/generic/jkSoundFile.c
|
|
|
bb8f236 |
--- snack2.2.10/generic/jkSoundFile.c.mpg123 2019-07-30 16:16:32.624468486 -0400
|
|
|
bb8f236 |
+++ snack2.2.10/generic/jkSoundFile.c 2019-07-30 16:16:48.089130226 -0400
|
|
|
bb8f236 |
@@ -1785,7 +1785,7 @@ PutAuHeader(Sound *s, Tcl_Interp *interp
|
|
|
bb8f236 |
}
|
|
|
bb8f236 |
|
|
|
bb8f236 |
#define WAVE_FORMAT_PCM 1
|
|
|
bb8f236 |
-#ifndef WIN
|
|
|
bb8f236 |
+#ifndef WAVE_FORMAT_ALAW
|
|
|
bb8f236 |
# define WAVE_FORMAT_IEEE_FLOAT 3
|
|
|
bb8f236 |
# define WAVE_FORMAT_ALAW 6
|
|
|
bb8f236 |
# define WAVE_FORMAT_MULAW 7
|
|
|
bb8f236 |
@@ -3305,6 +3305,7 @@ Snack_FileFormat snackRawFormat = {
|
|
|
bb8f236 |
(Snack_FileFormat *) NULL
|
|
|
bb8f236 |
};
|
|
|
bb8f236 |
|
|
|
bb8f236 |
+#ifdef USE_OLD_MP3
|
|
|
bb8f236 |
Snack_FileFormat snackMp3Format = {
|
|
|
bb8f236 |
MP3_STRING,
|
|
|
bb8f236 |
GuessMP3File,
|
|
|
bb8f236 |
@@ -3320,6 +3321,7 @@ Snack_FileFormat snackMp3Format = {
|
|
|
bb8f236 |
ConfigMP3Header,
|
|
|
bb8f236 |
(Snack_FileFormat *) NULL
|
|
|
bb8f236 |
};
|
|
|
bb8f236 |
+#endif
|
|
|
bb8f236 |
|
|
|
bb8f236 |
Snack_FileFormat snackSmpFormat = {
|
|
|
bb8f236 |
SMP_STRING,
|
|
|
bb8f236 |
@@ -3434,8 +3436,12 @@ SnackDefineFileFormats(Tcl_Interp *inter
|
|
|
bb8f236 |
*/
|
|
|
bb8f236 |
{
|
|
|
bb8f236 |
snackFileFormats = &snackWavFormat;
|
|
|
bb8f236 |
+#ifdef BUILTIN_MP3
|
|
|
bb8f236 |
snackWavFormat.nextPtr = &snackMp3Format;
|
|
|
bb8f236 |
snackMp3Format.nextPtr = &snackAiffFormat;
|
|
|
bb8f236 |
+#else
|
|
|
bb8f236 |
+ snackWavFormat.nextPtr = &snackAiffFormat;
|
|
|
bb8f236 |
+#endif
|
|
|
bb8f236 |
snackAiffFormat.nextPtr = &snackAuFormat;
|
|
|
bb8f236 |
snackAuFormat.nextPtr = &snackSmpFormat;
|
|
|
bb8f236 |
snackSmpFormat.nextPtr = &snackCslFormat;
|
|
|
bb8f236 |
@@ -3570,8 +3576,13 @@ GetSample(SnackLinkedFileInfo *infoPtr,
|
|
|
bb8f236 |
Snack_WriteLogInt(" Read Tries", maxt-tries);
|
|
|
bb8f236 |
Snack_WriteLogInt(" Read Samples", nRead);
|
|
|
bb8f236 |
}
|
|
|
bb8f236 |
+ if (tries<=0) {
|
|
|
bb8f236 |
+ Snack_ProgressCallback(s->cmdPtr, s->interp, "Tries exceeded", -1.0);
|
|
|
bb8f236 |
+ }
|
|
|
bb8f236 |
infoPtr->validSamples = nRead;
|
|
|
bb8f236 |
- memcpy(infoPtr->buffer, junkBuffer, nRead * sizeof(float));
|
|
|
bb8f236 |
+ if (nRead>0) {
|
|
|
bb8f236 |
+ memcpy(infoPtr->buffer, junkBuffer, nRead * sizeof(float));
|
|
|
bb8f236 |
+ }
|
|
|
bb8f236 |
}
|
|
|
bb8f236 |
|
|
|
bb8f236 |
if (ff->readProc == NULL) { /* unpack block */
|
|
|
bb8f236 |
diff -up snack2.2.10/unix/Makefile.in.mpg123 snack2.2.10/unix/Makefile.in
|
|
|
bb8f236 |
--- snack2.2.10/unix/Makefile.in.mpg123 2005-12-14 06:29:39.000000000 -0500
|
|
|
bb8f236 |
+++ snack2.2.10/unix/Makefile.in 2019-07-30 16:14:55.453593911 -0400
|
|
|
bb8f236 |
@@ -43,13 +43,13 @@ SHLIB_SUFFIX = @SHLIB_SUFFIX@
|
|
|
bb8f236 |
all: libsound${SHLIB_SUFFIX} libsnack${SHLIB_SUFFIX} @DOSTUBLIB@ @LIBNIST@ @LIBOGG@ editversion
|
|
|
bb8f236 |
|
|
|
bb8f236 |
OBJSO = sound.o jkSound.o jkSoundEngine.o jkSoundEdit.o jkSoundFile.o \
|
|
|
bb8f236 |
- g711.o @AOBJ@ jkFormatMP3.o jkSoundProc.o ffa.o jkPitchCmd.o \
|
|
|
bb8f236 |
+ g711.o @AOBJ@ jkSoundProc.o ffa.o jkPitchCmd.o \
|
|
|
bb8f236 |
@STUBINITOBJ@ jkAudio.o jkMixer.o shape.o jkFilter.o jkSynthesis.o \
|
|
|
bb8f236 |
jkFilterIIR.o jkGetF0.o sigproc.o jkFormant.o sigproc2.o
|
|
|
bb8f236 |
|
|
|
bb8f236 |
OBJSN = snack.o jkSound.o jkSoundEngine.o jkSoundEdit.o jkSoundFile.o \
|
|
|
bb8f236 |
jkCanvSpeg.o jkCanvWave.o jkCanvSect.o ffa.o g711.o @AOBJ@ \
|
|
|
bb8f236 |
- jkFormatMP3.o jkSoundProc.o jkPitchCmd.o @STUBINITOBJ@ \
|
|
|
bb8f236 |
+ jkSoundProc.o jkPitchCmd.o @STUBINITOBJ@ \
|
|
|
bb8f236 |
jkAudio.o jkMixer.o shape.o jkFilter.o jkSynthesis.o jkFilterIIR.o \
|
|
|
bb8f236 |
jkGetF0.o sigproc.o jkFormant.o sigproc2.o
|
|
|
bb8f236 |
|
|
|
bb8f236 |
@@ -296,12 +296,21 @@ libsnacksphere${SHLIB_SUFFIX}: ${OBJNIST
|
|
|
bb8f236 |
LIBOGG = @OGGLIBS@ -lc @TCL_LIB_SPEC@ -L. @SNACK_STUB_LIB_FLAG@
|
|
|
bb8f236 |
OBJOGG = SnackOgg.o
|
|
|
bb8f236 |
|
|
|
bb8f236 |
+LIBMPG = -lmpg123 -lc @TCL_LIB_SPEC@ -L. @SNACK_STUB_LIB_FLAG@
|
|
|
bb8f236 |
+OBJMPG = SnackMpg.o
|
|
|
bb8f236 |
+
|
|
|
bb8f236 |
SnackOgg.o: $(GENERIC_DIR)/SnackOgg.c
|
|
|
bb8f236 |
$(CC) @OGGINC@ -c $(CFLAGS) -DUSE_SNACK_STUBS $(GENERIC_DIR)/SnackOgg.c
|
|
|
bb8f236 |
|
|
|
bb8f236 |
libsnackogg${SHLIB_SUFFIX}: ${OBJOGG}
|
|
|
bb8f236 |
${SHLIB_LD} ${OBJOGG} ${LIBOGG} -o libsnackogg${SHLIB_SUFFIX}
|
|
|
bb8f236 |
|
|
|
bb8f236 |
+SnackMpg.o: $(GENERIC_DIR)/SnackMpg.c
|
|
|
bb8f236 |
+ $(CC) -c $(CFLAGS) -DUSE_SNACK_STUBS $(GENERIC_DIR)/SnackMpg.c
|
|
|
bb8f236 |
+
|
|
|
bb8f236 |
+libsnackmpg${SHLIB_SUFFIX}: ${OBJMPG}
|
|
|
bb8f236 |
+ ${SHLIB_LD} ${OBJMPG} ${LIBMPG} -o libsnackmpg${SHLIB_SUFFIX}
|
|
|
bb8f236 |
+
|
|
|
bb8f236 |
install:
|
|
|
bb8f236 |
@if [ ! -d ${DESTDIR}${SNACK_INSTALL_PATH}/snack${VERSION} ] ; then \
|
|
|
bb8f236 |
echo "Making directory ${DESTDIR}${SNACK_INSTALL_PATH}/snack${VERSION}"; \
|
|
|
bb8f236 |
@@ -314,6 +323,7 @@ install:
|
|
|
bb8f236 |
if test -f libsnackstub${VERSION}.a; then cp -f libsnackstub${VERSION}.a ${DESTDIR}${SNACK_INSTALL_PATH}/; fi
|
|
|
bb8f236 |
if test -f libsnacksphere${SHLIB_SUFFIX}; then cp -f libsnacksphere${SHLIB_SUFFIX} ${DESTDIR}${SNACK_INSTALL_PATH}/snack${VERSION}/; fi
|
|
|
bb8f236 |
if test -f libsnackogg${SHLIB_SUFFIX}; then cp -f libsnackogg${SHLIB_SUFFIX} ${DESTDIR}${SNACK_INSTALL_PATH}/snack${VERSION}/; fi
|
|
|
bb8f236 |
+ if test -f libsnackmpg${SHLIB_SUFFIX}; then cp -f libsnackmpg${SHLIB_SUFFIX} ${DESTDIR}${SNACK_INSTALL_PATH}/snack${VERSION}/; fi
|
|
|
bb8f236 |
cp -f $(UNIX_DIR)/snack.tcl ${DESTDIR}${SNACK_INSTALL_PATH}/snack${VERSION}/
|
|
|
bb8f236 |
cp -f pkgIndex.tcl ${DESTDIR}${SNACK_INSTALL_PATH}/snack${VERSION}/
|
|
|
bb8f236 |
|
|
|
bb8f236 |
diff -up snack2.2.10/unix/pkgIndex.tcl.dll.mpg123 snack2.2.10/unix/pkgIndex.tcl.dll
|
|
|
bb8f236 |
--- snack2.2.10/unix/pkgIndex.tcl.dll.mpg123 2005-12-14 06:29:39.000000000 -0500
|
|
|
bb8f236 |
+++ snack2.2.10/unix/pkgIndex.tcl.dll 2019-07-30 16:14:55.454593890 -0400
|
|
|
bb8f236 |
@@ -11,3 +11,5 @@ package ifneeded sound 2.2 [list load [f
|
|
|
bb8f236 |
package ifneeded snacksphere 1.2 [list load [file join $dir libsnacksphere.dll]]
|
|
|
bb8f236 |
|
|
|
bb8f236 |
package ifneeded snackogg 1.3 [list load [file join $dir libsnackogg.dll]]
|
|
|
bb8f236 |
+
|
|
|
bb8f236 |
+package ifneeded snackmpg 1.3 [list load [file join $dir libsnackmpg.dll]]
|