[linux-audio-dev] libsndfile: another strange issue

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

Subject: [linux-audio-dev] libsndfile: another strange issue
From: martin rumori (lists_AT_rumori.de)
Date: Wed May 19 2004 - 02:35:22 EEST


hi erik,

i've got another strange issue with libnsdfile (1.0.10beta6 and
earlier).

it seems to be related to SFM_RDWR mode again. if i open an existing
(but empty) file in RDWR mode, then switch to UPDATE_HEADER_AUTO mode,
then write to the file, then try to seek to the end of the file in
order to write again: then the seek command will fail or misbehave.

when seeking to file-end, SEEK SET, it will fail with "Internal
psf_fseek() failed.", if seeking to 0, SEEK_END, it will just seek to
zero regardless of the number of frames in the file.

all this proceeds if not switching to UPDATE_HEADER_AUTO. though not
included in the test case, i got the same behavior when using
WRITE_HEADER_NOW after each write instead of UPDATE_HEADER_AUTO with
my "real-world" code.

this behavior seems to be independent from the sndfile format, but
just tested with WAV/16bit, AIFF/16bit, AIFF/float.

attached the "small test case", hope erik will like it again...

bests,

martin



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

This archive was generated by hypermail 2b28 : Wed May 19 2004 - 10:50:51 EEST