Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Komag
Roku Guru

Help me fill in Roku model info for sound channels

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. 🙂

Ignoring classic models, and listing models listed on wikipedia:
MODEL.....maxSimulStreams()
2400......(2)
2450......(1)
2500.......1
3000......(2)
3050......(2)
3100.......2
3400......(2)
3420......(2)
3500.......2
2700......(1)
2710.......1
2720......(1)
4200.......2
4210......(2)
4230......(2)
TV........(1)

EDIT - With RokuMarkn's info, it looks like this - is this what others see as well?
0 Kudos
7 REPLIES 7
RokuMarkn
Visitor

Re: Help me fill in Roku model info for sound channels

I believe 24**, 27** and the TVs are 1; all the rest are 2.

--Mark
0 Kudos
EnTerr
Roku Guru

Re: Help me fill in Roku model info for sound channels

"RokuMarkn" wrote:
I believe 24**, 27** and the TVs are 1; all the rest are 2.
Perhaps 2400 alone should be 2, since it has the guts of a 3xxx?

My (uneducated) guess on it:
model = createObject("roDeviceInfo").getModel()
isDualChannelAudio = (model > "3" and model < "5") or left(model, 4) = "2400"
0 Kudos
RokuMarkn
Visitor

Re: Help me fill in Roku model info for sound channels

Yes that sounds correct, but you wouldn't actually want to write code like that would you? Why not just use maxSimulStreams?

--Mark
0 Kudos
EnTerr
Roku Guru

Re: Help me fill in Roku model info for sound channels

"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:
isDualChannelAudio = mid(createObject("roDeviceInfo").getVersion(), 3) > "3" and createObject("roAudioResource", "deadend").maxSimulStreams() > 1
0 Kudos
Komag
Roku Guru

Re: Help me fill in Roku model info for sound channels

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?
0 Kudos
RokuKC
Roku Employee
Roku Employee

Re: Help me fill in Roku model info for sound channels

"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.
0 Kudos
Komag
Roku Guru

Re: Help me fill in Roku model info for sound channels

Well that's a nice improvement!
0 Kudos