On Wed, 11 Feb, 2004 at 09:14PM +1100, Erik de Castro Lopo spake thus: > On Wed, 11 Feb 2004 09:08:58 +0000 > [EMAIL PROTECTED] wrote: > > > Hi peeps, > > > > I've only just started playing with libsndfile, so I hope this > > isn't a dumb question. > > What version of libsndfile?
1.0.5 > > I get a segmentation fault when I try to use sf_readf_float on some > > wavs. > > Are you sure the array you are reading into is large enough? Both the > files in tha tar.bz2 file were stereo. When you read a stereo file with > sf_readf_float, and ask for N frames, the destination array must be > 2 * N in size. Yes, the buffer is info->frames*info->channels big. It's exactly the same code in both cases - one file segfaults, the other plays. > > The odd thing is, if I re-save the file in the same format, > > (with something like audacity or sweep) it works. > > Audacity and Sweep both use libsndfile for file I/O. I kinda assumed they would - which just makes it all weirder. > > I thought I must > > have been confused, and that the format was different the next time > > around, but it isn't - at least as far as libsndfile's SF_INFO can > > tell me. > > > > I don't think the file is broken, > > Correct, the files are fine. And yet one kills libsndfile. Strange. > Erik
