Back in this thread: viewtopic.php?f=34&t=79302#p470927
It was mentioned that some Rokus can handle two simultaneous sounds playing via roAudioResource
Here is RokuJoel’s sample code:
sound1=createobject("roAudioResource","pkg:/sounds/boom.wav")
sound2=createobject("roAudioResource","pkg:/sounds/laser.wav")
numchannels=sound1.maxSimulStreams()
volume=100
if numchannels < 2 then
print "Two channels not supported"
stop
else
print numchannels;" are supported"
end if
channel=0
sound1.trigger(volume,channel)
channel=1
sound2.trigger(volume,channel)
For those of you with many Roku models (looking at you Endless, NewManLiving, BradC), can you help me fill in the info below? I think it would useful for everyone.
“RokuMarkn” wrote:
Yes that sounds correct, but you wouldn’t actually want to write code like that would you? Why not just use maxSimulStreams?Because… i am stupid? :mrgreen:
I just copy&pasted that from a code i wrote to discriminate the non-ARM/GLES players.
maxSimulStreams() is better (it was undocumented until an hour ago). Not available on fw3, so (for those who care) will need a guard check the version before trying to call it. Caffè corretto:
It’s been a while since I visited this issue, but today I fired up my Roku 1 2710 and found that it thinks it now has two simultaneous audio channels (maxSimulStreams reports 2). Is this actually true somehow?
“Komag” wrote:
It’s been a while since I visited this issue, but today I fired up my Roku 1 2710 and found that it thinks it now has two simultaneous audio channels (maxSimulStreams reports 2). Is this actually true somehow?
Yes. All devices running firmware 7.2 should support 2 audio channels for roAudioResource.