04-05-2020 09:03 AM
Hi There,
I am trying to write to a wav file from output of Build Waveform. I can play the audio from the output of build waveform but when I try to write to wav file using the simple write I get
Error 42 occurred at Sound File Write Open.vi->Sound File Write Simple.vi->write and play wav.vi
How do I address this?
Solved! Go to Solution.
04-05-2020 11:03 AM
Error 42 is a "generic error". So it doesn't tell us anything. Any chance it was error 43 which is "cancelled by user"? That is more likely when dealing with file operations.
It would be better if you attached your VI so we can see what you are doing and suggest where you might be doing it wrong.
04-05-2020 11:31 AM
How do I create a new wav file in labview so that I can refer to it in path and write to it in Write simple ?
04-05-2020 11:35 AM
I can get around the problem by referring to an existing file to over write in path of wav file in Sound Write Simple. I would like the VI to create a NEW file rather than overwrite an existing one. Is this possible?
04-05-2020 11:45 AM - edited 04-05-2020 11:48 AM
Hi Whitenova,
@Whitenova wrote:
I can get around the problem by referring to an existing file to over write in path of wav file in Sound Write Simple. I would like the VI to create a NEW file rather than overwrite an existing one. Is this possible?
Yes, it's possible.
Just provide a "new" filepath:
This snippets creates the wav file on first call…
(Thie filepath control in your VI was empty, so the WriteWAV function will return an error 42 because of wrong filepath…)
Btw. no need to create one more thread for the very same problem! So I merged both threads…
(One thread per problem, one problem per thread.)