|
From: Martin R. <ru...@us...> - 2007-04-04 14:36:08
|
Update of /cvsroot/foo/foo/elkfoo/src In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv18815/elkfoo/src Modified Files: Makefile.am snd.m soundfile.m Log Message: added rudimentary flac support Index: soundfile.m =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/src/soundfile.m,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** soundfile.m 22 May 2006 22:18:35 -0000 1.9 --- soundfile.m 4 Apr 2007 14:36:04 -0000 1.10 *************** *** 114,117 **** --- 114,122 ---- s.format |= SF_FORMAT_XI; break; + #ifdef HAVE_SNDFILE_FLAC_SUPPORT + case SND_FILETYPE_FLAC: + s.format |= SF_FORMAT_FLAC; + break; + #endif // #ifdefHAVE_SNDFILE_FLAC_SUPPORT default: Primitive_Error("soundfile.m: internal inconsistency (filetype)"); *************** *** 195,198 **** --- 200,211 ---- } + // { // write one frame silence: HACK + // sample_t *tmpbuf; + + // tmpbuf = calloc(1, s.channels * sizeof(sample_t)); + // sf_writef_float(sfd, tmpbuf, 1); + // free(tmpbuf); + // } + if (sf_close(sfd)) { *************** *** 323,326 **** --- 336,344 ---- ret = Intern("xi"); break; + #ifdef HAVE_SNDFILE_FLAC_SUPPORT + case SF_FORMAT_FLAC: + ret = Intern("flac"); + break; + #endif // #ifdef HAVE_SNDFILE_FLAC_SUPPORT default: { Index: Makefile.am =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/src/Makefile.am,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Makefile.am 26 Aug 2004 09:52:02 -0000 1.9 --- Makefile.am 4 Apr 2007 14:36:04 -0000 1.10 *************** *** 35,38 **** --- 35,39 ---- if USE_GNUSTEP_BASE + include @GNUSTEP_MAKEFILES@/config.make include @GNUSTEP_MAKEFILES@/library-combo.make include @GNUSTEP_MAKEFILES@/common.make Index: snd.m =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/src/snd.m,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** snd.m 22 May 2006 22:18:35 -0000 1.8 --- snd.m 4 Apr 2007 14:36:04 -0000 1.9 *************** *** 75,78 **** --- 75,81 ---- {"pvf", SND_FILETYPE_PVF}, {"xi", SND_FILETYPE_XI}, + #ifdef HAVE_SNDFILE_FLAC_SUPPORT + {"flac", SND_FILETYPE_FLAC}, + #endif // #ifdef HAVE_SNDFILE_FLAC_SUPPORT {0, 0} }; *************** *** 275,278 **** --- 278,286 ---- t = sndFileTypes[13].name; break; + #ifdef HAVE_SNDFILE_FLAC_SUPPORT + case SF_FORMAT_FLAC: + t = sndFileTypes[14].name; + break; + #endif // #ifdef HAVE_SNDFILE_FLAC_SUPPORT default: Primitive_Error("unknown sound file filetype: ~a", |