I'm looking for a way to automatically generate the remote control sound effects while using roImageCanvas. When I press FF or REW the roku plays sound, when I just press the arrow buttons it doesn't play a sound.
Using roAudioPlayer to manually play mp3 files incurs a delay and slows down the graphic update of the script, which would mean the audioplayer isn't running in a separate thread, or if it is, using two threads slows down the app.
The script for initializing the audio player appears to be straightforward and works
'set up audio
AudioPlayer = CreateObject("roAudioPlayer")
AudioPlayer.setcontentlist([{ url: "file://pkg:/images/Click2.mp3" }])
AudioPlayer.setloop(false)
And when I want the sound to play, I have AudioPlayer.Play() and it does play a sound. However, it slows everything down by doing so.
Since it is possible to send remote control input using the methods in "external control guide.pdf", and it's possible to even remote control a roku through telnet, would it also be a possibility to send a command through the running script?
for example
msg.PutMessage( "8" )
to insert the REW button press into the message buffer to get the underlying shell to play the sound for me? I notice of all the methods, there aren't many that you can actually populate yourself.