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: Erik de Castro Lopo (erikd-lad_AT_mega-nerd.com)
Date: Wed Feb 11 2004 - 12:14:49 EET


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?

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

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

Erik

-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo  nospam_AT_mega-nerd.com (Yes it's valid)
+-----------------------------------------------------------+
"Linux everywhere pretty much eliminates the need for Java everywhere"
  -- Bruce Ide in letter to LWN editors


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 - 12:16:57 EET