From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Not enough memory to complete this operation"

Hi all
I´m trying to represent a .wav file in a Waveform graph, but, everytime I run my vi, I get an error message saying that there is not enough memory on my system to do it (I have 1Gb of ram).
The .wav file is from a song that I converted from .mp3 to .wav, and is about 50Mb large.
It´s a 16 bit, stereo, 44100 samples per second file.
I understand that this might became much larger once labview starts to handle it, and I tought that the ideial would be to reduce it´s size, by throwing away some uneeded information.
This might be possible, since I only need to see this file in graphical form with a resolution of 1/100´s of seconds.
So, in a 1/100 of a second I should have 441 samples, of which only 1 sample will be enough for my needs.
This way, the load might be reduced 440 times, which is great.
This in theory looks easy, but my problem is how do I do this in practice, without using loops?
Is there a way to create an array by taking a value every 441 samples from the original .wav file, without using a time consuming loop?
I have included my original vi, for you to see my problem.
Try it with a large .wav file.
Thank you all.
0 Kudos
Message 1 of 2
(2,371 Views)
Hi
You will have problems if trying to read the file at once. Try to read it in "chunks", decimate and display.
In this forum, there are some examples to read wav file header and read data in chunks.
Cheers
Alipio
---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
0 Kudos
Message 2 of 2
(2,348 Views)