Playing Sound in RobotC

Hi everyone,

My team and I are having problems with playing sound from our speaker. We are using robotc, and the code that we wrote up can be found below:

task usercontrol()



This piece of coding has worked for us before, but after updating to 4.26 it no longer does. Also, in the error box, this line is displayed:

Error:Illegal NXT / EV3 filename ‘mario.wav’

NXT and EV3 has something to do with the lego programming, correct? After the update, we did change our platform back to Vex Cortex, so not sure what’s going on there.

We also re-uploaded the sound file into our cortex’s storage after the update, so the file not being present shouldn’t be the problem. The file is also in the correct folder, and 8-bit format. Due to the error that is displayed, we have tried re-naming the file many different times (but perhaps we just haven’t followed the ‘correct’ naming procedure). Has anyone else had this problem, or any idea as to how to fix it? I feel as though I am missing something simple, but can’t figure it out.

Thanks in advance,

Team 4149G

I see the same problem in V4.26, however, the file did seem to upload and play.

I tried V3.63, it has no issues.

I tried V4.10, could’t get files to play at all.

I didn’t even think about just uploading the code and file to see if it would work anyways. I kind of assumed it wouldn’t work due to the compiler error (it is red, which usually indicates something that will not work). Perhaps I should just give it a go.

We miss our Mario theme.

Unfortunately i’m having the same problem when I compile my project to check for errors. Robot C gives me “Error:Illegal NXT / EV3 filename ‘theme2.rso’”
I was told i needed an rso file as apposed to a wpm file. I converted it and no change. I ended up running to radioshack and picking up a sound chip kit and made a contraption out of it and it worked! Now its not vex legal but it is not a competition robot, just a fun tank I can drive using my laptop.

I belive robotc requieres an 8 bit wav file to play music. There is also a max file size that it will not play if it is larger.