On Thu, 12 Feb, 2004 at 07:47AM +1100, Erik de Castro Lopo spake thus: > On Wed, 11 Feb 2004 11:00:34 +0000 > [EMAIL PROTECTED] wrote: > > > 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 > > Please try 1.0.6 which has just been released. > > If it still crashes with 1.0.6, please send me the smallest possible code > example that reproduces the problem.
Well, I've stopped the crashing. It was my bad, but still a bit confusing. Here's what I was doing samples=info->frames*info->channels; sound=(sample_t *) malloc (samples * sizeof(sample_t)); sf_readf_float(f,sound,samples); Which (I now realise) isn't quite right because I'm trying to read twice as many frames as there are in the file (assuming a stereo file). Changing to sf_read_float does the trick, but I still don't understand why some stereo files worked, while others didn't. Opening them in something wlse and saving them again in exactly the same format made them work! Also, shouldn't sf_readf_float handle being asked to read too many frames? James > Erik