hi,
yes, as it seems open_soundfile() routine treats headersize==0 as an indication that a caller wants to deduce the header from a file. Thus -raw flag does not mean a headerless file, but a file with a header format known only to the user. But since you have prepended one zero at the beginning of the data, then just skip this zero with '-raw 4 1 4 l' (the header size is in bytes, not in samples).
Krzysztof
(checked your sin2.wvt, it's loading ok that way)
Gregorio García wrote: ...
contain 515 32-bit floating point numbers. Im trying to read the data to an array using soundfiler, sending read to it with the following options:
read - raw 0 1 4 l
(0 as matlab says nothing about header data 1 for one channel 4 for 32 bit l for little endian)
this reports an error message: unknown or bad header format
When i change header size from 0 to 1, soundfiler reads the array but the data isn´t correct (the data in the attached file is supposed to contain the dta for sin^2 from 0 to pi).
I get similar behaviour with headersize 2 to 99
When i set headersize to 100 (ie read -raw 100 1 4 l) the data read suddenly becomes correct, but the first 26 floats in the file are missing in the array.
...