[linux-audio-dev] strange issue with libsndfile

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

Subject: [linux-audio-dev] strange issue with libsndfile
From: martin rumori (lists_AT_rumori.de)
Date: Sat May 15 2004 - 15:08:59 EEST


hi *,

i've got a strange issue with libsndfile.

in foo (http://foo.sf.net) the SFM_RDWR mode is used, because target
soundfiles are created independently of the write process before, then
the file gets opened with SFM_RDWR to determine the target soundfile's
parameters (samplerate, channels...).

with SF_FORMAT_AIFF | SF_FORMAT_FLOAT (and SF_FORMAT_DOUBLE, btw., 2
channels) i notice a strange behavior: directly after creating the
file (without sf_writing anything) the number of frames of the file is
4 (SF_FORMAT_DOUBLE: 2 frames). this doesn't happen neither with the
SF_FORMAT_PCM_* things, nor with SF_FORMAT_WAV. with just 1 channel
the values are 6 resp. 3.

when reopening the file for writing (SFM_RDWR mode), there is no
difference between seeking to (0, SEEK_SET) and (0, SEEK_END), both
seek to 0. surprisingly, seeking to (4, SEEK_SET) doesn't return an
error.

after writing 512 frames after seeking (in all three cases) and having
closed the file, the number of frames is now 511 (1022 with 1
channel).

am i missing something, or is this a bug in libsndfile? attached my
test prog.

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 : Sat May 15 2004 - 15:07:41 EEST