LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving a Large .wav file

Hi there,

 

I am attempting to save a very large .wav file.  I have already programmed a way to read in four large .wav files and then have merged them into one (using Sound File Read.vi and reading in chunks).  My problem arises when I try to save them.  I can't figure out a way to save in chunks - it appears that you can not append to a .wav file using the Sound File Write Simple.vi.  It seems to only allow an overwrite of the file.

 

Has anyone figured out a way to do this?  Any suggestions would be awesome!


Thanks!

0 Kudos
Message 1 of 5
(2,604 Views)

How big are the wav files in question? Here is how you might read 4 files and merge them into one.  I don't understand the need to read and write in chunks unless you are talking about 4x 1GB wav files on a machine with 2GB of RAM. 

 

Example_VI_BD.png

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 5
(2,593 Views)

Sorry - I should have stated that the .wav files I am merging are ~ 1 GB each.  I have the merge under control - I downsample - line up the files graphically and then determine the start and duration of the larger files that I want to merge and save.  I am just having difficulty saving these very large files!  I think I need a way to save in chunks thus appending the large file gradually instead of all at once.  Not enough memory to do it otherwise.

0 Kudos
Message 3 of 5
(2,583 Views)

Do you really need to save them as WAV files?

Also, seems like you're pushing the limits of what is possible with a classic wave file?

https://en.wikipedia.org/wiki/WAV#Limitations

0 Kudos
Message 4 of 5
(2,570 Views)

Thanks for that link.  I have figured out how to do it - the save .wav vi has the refnum out that you have to rewire from the call library function node.  This can be used to save in chunks.  If the file is over 2 GB it can't be open so I guess that is a limiting factor of this whole endeavor.   We have other programs that are looking for a .wav file that is why i am trying to save it in the same format.  But, I guess a basic binary file might be better?

 

Thanks again for your help!

0 Kudos
Message 5 of 5
(2,533 Views)