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: 
gbechtinger
Visitor

How to use roAudioResource and mixing of sounds?

Hi!
I know that roAudioResource cannot mix sounds, and while one sound is playing, all the others stop. The question is: How I'll use roAudioResource to play multiple sounds of my game?

Thanks
Guilherme.
0 Kudos
2 REPLIES 2
BradC
Channel Surfer

Re: How to use roAudioResource and mixing of sounds?

if you look at the beep example in the SDK, there is example code for playing multiple audio events at the same time. Some limitations with that, volume control doesn't work (you'll get 100% volume whether you want it or not), it only works on roku 2, and it will hard crash older roku boxes.

I had better luck just playing one sound at a time. Did this by prioritizing sounds to check what is playing, and if something with more priority is already playing, don't play the new sound.


good luck!
♦MiniGolf♦HangMan♦Brain Puck♦Retro Tennis♦BORK♦FLIP♦Pathogen♦Pathogen 2♦Shut the Box♦Birdie♦Logic♦Dots♦Pool♦küglo♦Bubble Wrap♦Trivia Channel♦Mancala♦Air Hockey♦Weather♦CAMERA♦Your Photos Screensaver♦Desert Beauty Screensaver♦Wild Lakes Screensaver♦
0 Kudos
gbechtinger
Visitor

Re: How to use roAudioResource and mixing of sounds?

"BradC" wrote:
if you look at the beep example in the SDK, there is example code for playing multiple audio events at the same time. Some limitations with that, volume control doesn't work (you'll get 100% volume whether you want it or not), it only works on roku 2, and it will hard crash older roku boxes.

I had better luck just playing one sound at a time. Did this by prioritizing sounds to check what is playing, and if something with more priority is already playing, don't play the new sound.


good luck!

Thanks for the reply, I'll try the sound priority method.
0 Kudos