having troubles playing sound files with RobotC I using the following simple code:
task main()
{
playSoundFile(“gump.wav”);
}
I have loaded the file in the File Management Utility and selected the “download to default slot” button. However I get a Robot C message saying it was unable to locate the following files for download?
Just use the normal download button rather than the download to default slot. If you download to default and then download your code your first file is wiped. Remember the robot code goes into default and is run first.
Don’t use the file management utility, just make sure the audio file is in the same folder as the program then download the program to the robot. If this doesn’t work you may need to delete the sound file using the file management utility, then download the program.
Have you ever actually gotten RobotC audio to work like this? I have only ever used the file utility. It gives far more control and lets you figure out how much more space you have to fill with sounds. Last year I had a sound board on my robot that I dedicated the left joystick to.
I ran alliance selection by having the robot say the team name because I knew who I wanted to pick and had that as part of the sound board on the joystick.
We get this same error when we try to do sound. I asked about it many months ago and no one seemed to know why. I know my file met all the requirements of the cortex.
Those of you that are able to play sound…is it correct to assume you are NOT getting this error? Or are you getting this error but it works anyways?
Yes, this is how I normally do it, I just put the sound file in the same folder as the program and let robotc download the sound to the cortex automatically.
I get this error, but the program compiles and downloads anyways, and the sound works.
jpearman and tabor, I tried the 60. wav file and that worked. So the problem I’ m having is getting the wav files converted to the right format. I have tried a freemake audio converter but no luck yet.
Just to make sure the fomat that the cortex likes is:???
8kHz, 8 bit, Mono, 7kb/sec.