diff -up snack2.2.10/doc/python-man.html.mpg123 snack2.2.10/doc/python-man.html
--- snack2.2.10/doc/python-man.html.mpg123 2005-12-14 06:29:39.000000000 -0500
+++ snack2.2.10/doc/python-man.html 2019-07-30 16:14:55.453593911 -0400
@@ -158,7 +158,6 @@ than or equal to 1, or "Mono" o
be read -- not all of them can be
snackogg
snackmpg +
snacksphere
diff -up snack2.2.10/generic/jkSoundFile.c.mpg123 snack2.2.10/generic/jkSoundFile.c --- snack2.2.10/generic/jkSoundFile.c.mpg123 2019-07-30 16:16:32.624468486 -0400 +++ snack2.2.10/generic/jkSoundFile.c 2019-07-30 16:16:48.089130226 -0400 @@ -1785,7 +1785,7 @@ PutAuHeader(Sound *s, Tcl_Interp *interp } #define WAVE_FORMAT_PCM 1 -#ifndef WIN +#ifndef WAVE_FORMAT_ALAW # define WAVE_FORMAT_IEEE_FLOAT 3 # define WAVE_FORMAT_ALAW 6 # define WAVE_FORMAT_MULAW 7 @@ -3305,6 +3305,7 @@ Snack_FileFormat snackRawFormat = { (Snack_FileFormat *) NULL }; +#ifdef USE_OLD_MP3 Snack_FileFormat snackMp3Format = { MP3_STRING, GuessMP3File, @@ -3320,6 +3321,7 @@ Snack_FileFormat snackMp3Format = { ConfigMP3Header, (Snack_FileFormat *) NULL }; +#endif Snack_FileFormat snackSmpFormat = { SMP_STRING, @@ -3434,8 +3436,12 @@ SnackDefineFileFormats(Tcl_Interp *inter */ { snackFileFormats = &snackWavFormat; +#ifdef BUILTIN_MP3 snackWavFormat.nextPtr = &snackMp3Format; snackMp3Format.nextPtr = &snackAiffFormat; +#else + snackWavFormat.nextPtr = &snackAiffFormat; +#endif snackAiffFormat.nextPtr = &snackAuFormat; snackAuFormat.nextPtr = &snackSmpFormat; snackSmpFormat.nextPtr = &snackCslFormat; @@ -3570,8 +3576,13 @@ GetSample(SnackLinkedFileInfo *infoPtr, Snack_WriteLogInt(" Read Tries", maxt-tries); Snack_WriteLogInt(" Read Samples", nRead); } + if (tries<=0) { + Snack_ProgressCallback(s->cmdPtr, s->interp, "Tries exceeded", -1.0); + } infoPtr->validSamples = nRead; - memcpy(infoPtr->buffer, junkBuffer, nRead * sizeof(float)); + if (nRead>0) { + memcpy(infoPtr->buffer, junkBuffer, nRead * sizeof(float)); + } } if (ff->readProc == NULL) { /* unpack block */ diff -up snack2.2.10/unix/Makefile.in.mpg123 snack2.2.10/unix/Makefile.in --- snack2.2.10/unix/Makefile.in.mpg123 2005-12-14 06:29:39.000000000 -0500 +++ snack2.2.10/unix/Makefile.in 2019-07-30 16:14:55.453593911 -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 @@ -296,12 +296,21 @@ libsnacksphere${SHLIB_SUFFIX}: ${OBJNIST LIBOGG = @OGGLIBS@ -lc @TCL_LIB_SPEC@ -L. @SNACK_STUB_LIB_FLAG@ OBJOGG = SnackOgg.o +LIBMPG = -lmpg123 -lc @TCL_LIB_SPEC@ -L. @SNACK_STUB_LIB_FLAG@ +OBJMPG = SnackMpg.o + SnackOgg.o: $(GENERIC_DIR)/SnackOgg.c $(CC) @OGGINC@ -c $(CFLAGS) -DUSE_SNACK_STUBS $(GENERIC_DIR)/SnackOgg.c libsnackogg${SHLIB_SUFFIX}: ${OBJOGG} ${SHLIB_LD} ${OBJOGG} ${LIBOGG} -o libsnackogg${SHLIB_SUFFIX} +SnackMpg.o: $(GENERIC_DIR)/SnackMpg.c + $(CC) -c $(CFLAGS) -DUSE_SNACK_STUBS $(GENERIC_DIR)/SnackMpg.c + +libsnackmpg${SHLIB_SUFFIX}: ${OBJMPG} + ${SHLIB_LD} ${OBJMPG} ${LIBMPG} -o libsnackmpg${SHLIB_SUFFIX} + install: @if [ ! -d ${DESTDIR}${SNACK_INSTALL_PATH}/snack${VERSION} ] ; then \ echo "Making directory ${DESTDIR}${SNACK_INSTALL_PATH}/snack${VERSION}"; \ @@ -314,6 +323,7 @@ install: if test -f libsnackstub${VERSION}.a; then cp -f libsnackstub${VERSION}.a ${DESTDIR}${SNACK_INSTALL_PATH}/; fi if test -f libsnacksphere${SHLIB_SUFFIX}; then cp -f libsnacksphere${SHLIB_SUFFIX} ${DESTDIR}${SNACK_INSTALL_PATH}/snack${VERSION}/; fi if test -f libsnackogg${SHLIB_SUFFIX}; then cp -f libsnackogg${SHLIB_SUFFIX} ${DESTDIR}${SNACK_INSTALL_PATH}/snack${VERSION}/; fi + if test -f libsnackmpg${SHLIB_SUFFIX}; then cp -f libsnackmpg${SHLIB_SUFFIX} ${DESTDIR}${SNACK_INSTALL_PATH}/snack${VERSION}/; fi cp -f $(UNIX_DIR)/snack.tcl ${DESTDIR}${SNACK_INSTALL_PATH}/snack${VERSION}/ cp -f pkgIndex.tcl ${DESTDIR}${SNACK_INSTALL_PATH}/snack${VERSION}/ diff -up snack2.2.10/unix/pkgIndex.tcl.dll.mpg123 snack2.2.10/unix/pkgIndex.tcl.dll --- snack2.2.10/unix/pkgIndex.tcl.dll.mpg123 2005-12-14 06:29:39.000000000 -0500 +++ snack2.2.10/unix/pkgIndex.tcl.dll 2019-07-30 16:14:55.454593890 -0400 @@ -11,3 +11,5 @@ package ifneeded sound 2.2 [list load [f package ifneeded snacksphere 1.2 [list load [file join $dir libsnacksphere.dll]] package ifneeded snackogg 1.3 [list load [file join $dir libsnackogg.dll]] + +package ifneeded snackmpg 1.3 [list load [file join $dir libsnackmpg.dll]]