12-10-2013
05:18 AM
- last edited on
04-09-2024
10:24 AM
by
Content Cleaner
I am trying to play a .wav file through an output analog channel of an NI RIO Evaluation Kit that is connected to a loud-speaker.
The ideal case would be to use PlayWaveformExpressVI, but it needs a "device ID" which only includes audio devices directly connected to the PC (listed in ControlPanel/AudioAndDevices/Audio). Is there any way to assign the analog channel of the RIO EvKit a device ID to make it visible for the PlayWaveformExpressVI or the SoundOutputConfigure.vi? That would really solve all my problems.
I thought of an alternative pathway avoiding the device ID need in case it was impossible, but I could not make it work as I hoped it would.
Using SoundFileRead.vi I have managed to extract the data stored in the .wav file as a 1-D waveform array and indexed it into just a waveform using IndezArray.vi, but this data is still not accepted by the FPGA node, which only reads fixed-point data type. I then extract the data using GetWaveformComponents and feeding the individual values through a FOR loop into the FPGA Read/Write Control. However, this does not allow me to control the speed of the process and delivers the audio extremely slow. Is there any way to make the loop run fast enough? I have tried implementing a TIMED loop, but I was not able to make it work.
Perhaps I am looking at the problem the wrong way around and there is a better way to do this. If you have any suggestions please let me know, I am open to anything.
Thank you in advance for all the help you may give, it will all be extremely appreciated.
--
Hardware: NI LabVIEW RIO Evaluation Kit
OS: Windows 7 Enterprise, Service Pack 1
LabVIEW version 2012 SP1