Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
EnTerr
Level 9

GetAudioDecodeInfo()'s SAD bytes

So i am looking at this interesting function GetAudioDecodeInfo(), it has been around for a while: http://sdkdocs.roku.com/pages/diffpages ... Id=1612031 .

First i note that the edition from Feb 27, 2015 seems to be correctER than the current one, since it says "last two bytes of the SAD" (i.e. SAD2, SAD3) whereas next edition says "<number of channels>:<SAD1>:<SAD2>:<PassThru>" but that's very unlikely since SAD1 is the format and number of channels - which we already have decoded as the AA key "DD+" and <number of channels>=8.

This info seems promicing, has somebody decoded it successfully yet?

Here is what i see. Roku 3, fw7:
AC3: 6:127:640:1:
mp3: 2:
wma: 2:
flac: 2:
lpcm: 2:
aac: 2:

RokuTV, fw7
AC3: 7:31:640:0:
mp3: 2:
wma: 2:
flac: 2:
lpcm: 2:
aac: 2:
DD+: 7:6:0:0:

So trying to decode the SADness: Roku3's reports AC3 (aka DD) as a pass-through with 6 (5+1) channels. 127 seems to be a SAD2 and says "i support 32, 44, 48, 88, 96, 176, 192 kHz (what do i care, i am a passthrough!)". So far so good.

RokuTV reports AC3 and DD+ with 7 channels, where AC3 can play 32, 44, 48, 88, 96 kHz and DD+ can only do 44 and 48 kHz. Seems plausible.

But WTH is 640 (0b1010000000)?! What kind of super-sized byte is that? Not any of the bytes i have met - mine all maxed out at 8bit, i.e. 255 (0b11111111)
0 Kudos
2 Replies
RokuMarkn
Level 7

Re: GetAudioDecodeInfo()'s SAD bytes

I'm not very familiar with this, but from reading the code it appears the four fields are supposed to be

number of channels
sampling frequencies
bit rate
pass-through

--Mark
0 Kudos
EnTerr
Level 9

Re: GetAudioDecodeInfo()'s SAD bytes

Thanks for having a look! Hmm, "640" seems right as the maximum Kbps supported by DD. Then it's 8 * SAD3 (where per wikipedia link, for 640Kbps the SAD3 would be 640/8 = 80, a "bytable" value)

So 2nd number is frequency mask and 3rd one is (normalized? denormalized? ugh) bandwidth. Can you ping doco maintainer to fix?
0 Kudos