Re: [linux-audio-dev] libsndfile breakage

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] libsndfile breakage
From: james_AT_dis-dot-dat.net
Date: Wed Feb 11 2004 - 23:32:03 EET


On Thu, 12 Feb, 2004 at 07:47AM +1100, Erik de Castro Lopo spake thus:
> On Wed, 11 Feb 2004 11:00:34 +0000
> james_AT_dis-dot-dat.net 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
> > > james_AT_dis-dot-dat.net 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


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed Feb 11 2004 - 23:35:26 EET