> I have collected acoustic data that I am turning into wav files. After
> the collection, I now know the file size and need to insert the wav
> file header on top of this file. Can anyone tell me how to concatenate
> two files, or insert the wav header (string) data into the other file?
> My current method is very inefficient. The collected data file can
> become extremely large, so I am trying to avoid reading this file. I
> would rather poke data into it without overwriting any existing data.
As others have pointed out, you can overwrite portions of a file, but
the OS file APIs don't allow for inserting. Either leave blank space
when initially making the file, then seek and write, or read the
contents of the file in chunks and write to the other. Doing
this in
chunks means you don't read the entire file into memory at once, and the
chunk size affects the speed. Perhaps someone already as a utility VI
for doing this, but it is a simple loop with read, write, and error
checking.
Greg McKaskle