android - MediaCodec and 24 bit PCM -


i using mediacodec decode audio, when load file 24-bit samples, have no way of knowing has occurred. since application assuming 16-bit samples, fails.

when print mediaformat, see

{mime=audio/raw, durationus=239000000, bits-format=6, channel-count=2, channel-mask=0, sample-rate=96000} 

i assume "bits-format" hint, key not declared in api, , not emitted when output format changes. get

{mime=audio/raw, what=1869968451, channel-count=2, channel-mask=0, sample-rate=96000} 

(by way "what" key? notice if interpret 4charcode, "outc"... flag output format?)

so best recourse here? if feed bytebuffer straight audiotrack plays static of course (assuming pcm 16).

if know value, can convert myself! understand other questions cannot dictate output format either.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -