04-06-2015 08:35 AM
i want to play .wav audio file on myrio...my current program plays the .wav file on a pc..but i want to use the audio out port on myrio to play it.....i need ideas on how to proceed further...
i tried changing the play waveform vi...but i was getting an error stating that sound file read simple vi doesnt work on myrio....
need help ASAP..
04-20-2015 01:11 PM
I have the same doubt... I always get an error when opening the .wav file
I am using (/home/lvuser/....wav) this path.
The code is apparently correct because the arrow is not broken.. so I think i may have the wrong path.. But i have tried it in so many ways but with no succed.
Thank you so much for the help
06-03-2017 12:21 PM
Hi,
It looks like to me, MyRio doesn't directly play .wav file, you need to process it first on your PC to convert .wav into 2 arrays: left audio and right audio.
In the first figure, I simply read a wav file and save it into "data".
In the second figure, under "data" you will be able to find 2 arrays (the "Y" array), which correspond to left audio and right audio. Simply copy them and paste to a new vi under myrio.
In the third figure, use express VI "analogue output" and pick "audio out/left", "audio out/right", string two arrays into them, then myrio will be able to play!
Note since wav is not compressed, the arrays of a complete song will be very long, myrio has limited memory, so probably won't be able to play a complete song (about 1min maybe good).