10-17-2013 10:16 AM
10-17-2013 10:27 AM - edited 10-17-2013 10:28 AM
@RCooper wrote:
Hello, I am using LV2010 to create an application that logs sound data. This works fine. However, the customer has requested the ability to re-open a session and record more data to the .wav file. And when Sound File Open Write VI is passed an existing file, it doesn't append, it overwrites. This is a problem for me. Is there an elegant way to append to a .wav file in LabVIEW? I suppose I could open the file for read, read out the data, close the file, re-open it for write, write in the existing data, then start writing new data. This seems horribly inefficient, but I'm not seeing a better way just yet. I do have LV2012 installed if you don't have 2010 handy to provide an example.
How about stripping the .wav header from the second file and append the second file to the first?
[edited because my first reply sounded a bit harsh]
10-17-2013 10:56 AM
My first post may not have been clear, but I am trying to record additional data to the SAME .wav file. There is only one file (and writing a second file is not acceptable for this app).
The question is whether you can open a .WAV file in append instead of overwrite mode.
10-17-2013 10:58 AM
For some reason, the formatting got messed up in my first post; here is it properly formatted:
Hello,
I am using LV2010 to create an application that logs sound data. This works fine. However, the customer has requested the ability to re-open a session and record more data to the .wav file. And when Sound File Open Write VI is passed an existing file, it doesn't append, it overwrites
This is a problem for me. Is there an elegant way to append to a .wav file in LabVIEW? I suppose I could open the file for read, read out the data, close the file, re-open it for write, write in the existing data, then start writing new data. This seems horribly inefficient, but I'm not seeing a better way just yet
I do have LV2012 installed if you don't have 2010 handy to provide an example.
10-17-2013 11:25 AM
@RCooper wrote:
My first post may not have been clear, but I am trying to record additional data to the SAME .wav file. There is only one file (and writing a second file is not acceptable for this app).
The question is whether you can open a .WAV file in append instead of overwrite mode.
Like you, I have seen that it is not immediately evident if you could do this or not. That being the case, I think your way would work - it's probably the most elegant way after all, too.
10-17-2013 12:16 PM
Yeah, I'm afraid that might be right. I was just wondering if someone had found a slicker way to add to an existing .wav. I'll leave this open in case someone else has input.
Thanks for having a look, Bill!