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 - 13:00:34 EET


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
 
> > 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


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 - 13:05:19 EET