renojim
10 years agoCommunity Streaming Expert
Crashing 7.0 with invalid roAudioResource
I don't have a Roku 4 (yet) so I don't know if the latest v7 build has the same bug, but on my Roku 3 running v7.0 build 8637 if you try to create an roAudioResource with a bad file it causes a crash and reboot. The following code will do the trick:
I stumbled upon this when I was trying to play a sound effect that I thought was a regular WAV file, but it turns out it was a WAV file that used an MP3 codec. I didn't even know that was possible.
Older versions of the firmware (< 7.0) don't have the same issue.
-JT
ba = CreateObject("roByteArray")
ba[0] = 0
ba.WriteFile("tmp:/sound.wav")
ar = CreateObject("roAudioResource","tmp:/sound.wav") ' <- crash and burn
I stumbled upon this when I was trying to play a sound effect that I thought was a regular WAV file, but it turns out it was a WAV file that used an MP3 codec. I didn't even know that was possible.
Older versions of the firmware (< 7.0) don't have the same issue.
-JT