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: 
renojim
Community Streaming Expert

roAudioResource limitations

The documentation states, "roAudioResource is intended to support short audio clips which need to be played with very little latency." However, there's no definition of "short". I've found that a 5.5 second clip will return invalid upon creation, but 4.5 seconds seems to work. I haven't done extensive testing to find the limit, but it would be nice if "short" was defined. I don't believe it has anything to do with the size of the WAV file since my 5.5 second clip is only 60k.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
7 REPLIES 7
Komag
Roku Guru

Re: roAudioResource limitations

Are you certain the formats were identical in every way?
0 Kudos
renojim
Community Streaming Expert

Re: roAudioResource limitations

I tried a few different formats like 8 and 16 bit samples. The only constant I found after limited testing is that somewhere around 5 seconds roAudioResource will return invalid when you try to create the object. Are you saying you've been able to play longer clips?

I did find a hacky workaround. Split the clip into two WAV files and play one right after the other. There was already a natural place to split it, sort of a long sh-boing kind of sound, and I don't think it's noticeable that I split it.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
Komag
Roku Guru

Re: roAudioResource limitations

No I haven't tried longer clips. But I have noticed sound behaving quite differently across different models, especially Roku 3, Roku 2 XS, vs others
0 Kudos
EnTerr
Roku Guru

Re: roAudioResource limitations

What's the file size - compressed and/or uncomressed - any clue from there, something like 64kb?
0 Kudos
renojim
Community Streaming Expert

Re: roAudioResource limitations

I decided to investigate this further and lo and behold the file that would return invalid from CreateObject was suddenly working. I started to think I was losing my mind, so I tried to figure out what changed. Then it hit me; it may have nothing to do with the file and everything to do with the hardware/firmware. Sure enough, my TCL/RokuTV on fw 7.0b9051 and my Roku 3 on fw 7.1.0 have no problem with the WAV file. The same file doesn't work on my Roku SE on fw 7.0b9044. You gotta love the inconsistency. Anyhow, I'm going to go with my hack and split the file into two pieces and leave this here for posterity. I doubt we'll ever get a response from anyone at Roku as to what limitations roAudioResource has. Perhaps no one really knows.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
EnTerr
Roku Guru

Re: roAudioResource limitations

Look into the open source modules they use for cues. The Co. has the decency of giving list of the LGPL et al. libraries they use, as legally required.
0 Kudos
Komag
Roku Guru

Re: roAudioResource limitations

"renojim" wrote:
... my TCL/RokuTV on fw 7.0b9051 and my Roku 3 on fw 7.1.0 have no problem with the WAV file. The same file doesn't work on my Roku SE on fw 7.0b9044. You gotta love the inconsistency...


That's a bit disconcerting! I haven't been consistently testing across all my models enough lately... :shock:
0 Kudos