LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Sound File Write change waveform data (bug?)

Solved!
Go to solution

When loading a sound file (.wav) using the and Sound File Read.vi and the writes the same waveform data and format to a new file using Sound File Write.vi the waveform data is changed.

For .wav file in 16-bit resolution the difference is +/-30E-6.

When repeating the read and write process more error is added to the new file.

It may be just a small error, but I would expect file functions to handle data without changing the data.

Please refer  to attached VI (LV 2017) and wav file.

The problem also exist in LV 2019.

Has anyone seen this problem before or know a work-around?

Download All
0 Kudos
Message 1 of 3
(2,222 Views)
Solution
Accepted by topic author 2ben

I think you're seeing floating point conversion errors when going from the wav file's native I16 to the DBL waveform. To ensure the wav is loaded as I16, right-click the Sound File Read.vi and go to Select Type -> I16.

Message 2 of 3
(2,185 Views)

Thanks for your reply. 🙂

Yes, it looks like the implicit conversion is the issue.

I had not noticed the polymorphic selector (hidden by default) and kind of expected the read and write functions to select representation based on the format cluster.

 

0 Kudos
Message 3 of 3
(2,139 Views)