On Sunday 09 April 2006 09:27, matt ingalls wrote: > On Apr 8, 2006, at 7:40 PM, Istvan Varga wrote: > > > On Saturday 08 April 2006 18:24, matt ingalls wrote: > > > >> well, better than nothing. > >> csound is creating peak chunks still, right? > > > > Yes, as far as I know. I just did not find a way to read the peak > > chunks > > using the libsndfile API. > > does libsndfile automatically create peak chunks or do you need to > create a peak chunk manually through the libsndfile API ? Peak chunks are enabled by the following code: if (csound->peakchunks) sf_command(ST(outfile), SFC_SET_ADD_PEAK_CHUNK, NULL, SF_TRUE); Note that this apparently only works for WAV and AIFF files and floating point samples (quoting from libsndfile sources): case SFC_SET_ADD_PEAK_CHUNK : { int format = psf->sf.format & SF_FORMAT_TYPEMASK ; /* Only WAV and AIFF support the PEAK chunk. */ if (format != SF_FORMAT_WAV && format != SF_FORMAT_WAVEX && format != SF_FORMAT_AIFF) return SF_FALSE ; format = psf->sf.format & SF_FORMAT_SUBMASK ; /* Only files containg the following data types support the PEAK chunk. */ if (format != SF_FORMAT_FLOAT && format != SF_FORMAT_DOUBLE) return SF_FALSE ; } ; > it the latter, there must be a way to read the chunk, right ? I have not found a command to read peak chunks, only to create them. ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net