Forum Discussion

renojim's avatar
renojim
Community Streaming Expert
10 years ago

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

7 Replies

  • Are you certain the formats were identical in every way?
  • renojim's avatar
    renojim
    Community Streaming Expert
    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
  • 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
  • What's the file size - compressed and/or uncomressed - any clue from there, something like 64kb?
  • renojim's avatar
    renojim
    Community Streaming Expert
    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
  • 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.
  • "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: