On Wed, 11 Feb 2004 09:08:58 +0000
james(a)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(a)mega-nerd.com (Yes it's valid)
+-----------------------------------------------------------+
"Linux everywhere pretty much eliminates the need for Java everywhere"
-- Bruce Ide in letter to LWN editors