Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
gbechtinger
Level 7

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
Level 7

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
Level 7

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