02-20-2025 01:52 AM
Hi,
I have created this simple VI for analysing a .wav file from which I need to check the level in dBm. The problem is that when I compute the level using the wire connected like the red circle I made:
I obtain this error:
Even if I delate the connection between the two modules, I still have that error for the file wav I have read and I do not get why. Like the connection between the modules breaks something on the wav.
As a last question I’m curious also to understand the differences of -0.7 dBm between the hypothetical value at which the wav was generated (-5dBm) and the one computed by the VI.
Thank you for the help!
Zuc
Solved! Go to Solution.
02-20-2025 05:23 AM - edited 02-20-2025 05:25 AM
02-20-2025 07:18 AM - edited 02-20-2025 07:20 AM
HI,
why do you ask about writing?
By following an example on Internet I:
1. retrieve the information about the wav
2. open the file in read mode
3. read the data inside it for obtaining the waveform
Is there something wrong? it is possible to jump the open part but i suppose that it will be made directly by the read modules (3) since the file must be opened in LV for being used, isn't it?
For the wav you can test with the two inside the zip folder the m5dBm.wav is created with SoX, the oether wav is obtained by exporting the audio from WireShark.
Thank you for the help!
Zuc
02-20-2025 08:00 AM
Hi Zuc,
@Zuc_Lab wrote:
why do you ask about writing?
Because the image in your first messages clearly shows the WAVOpen function in "Write" mode…
@Zuc_Lab wrote:
By following an example on Internet I:
1. retrieve the information about the wav
2. open the file in read mode
3. read the data inside it for obtaining the waveform
Is there something wrong? it is possible to jump the open part but i suppose that it will be made directly by the read modules (3) since the file must be opened in LV for being used, isn't it?
No, there is nothing wrong with your VI.
The error comes from your WAV files! One files can be read and the other gives the 4810 error.
I guess the error indicates in your case that there is no sample data in your WAV file… (There are just 4 bytes in the DATA chunk, and they all have the value 0x00.)
02-20-2025 08:06 AM
Have you looked at the examples that ship with LabVIEW? Try "Sound File to Sound Output", which will use a known "good" WAV file.
You can also find a Web articlt "Playing .WAV Sound File from LabVIEW". At the end, it says "If your .WAV is not in the standard .WAV file format you may get the error 4810".
Bob Schor
02-20-2025 08:23 AM
Hi,
that's it! i have not thought about it, probably during my test i have corrupted the wav, even if i don't know how! and i obtained an empty file.
Thank you for having highlighted the point!
Best Regards,
Zuc