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.
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.
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.
"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: