Unverified Commit 3aef9cfb authored by Wolle's avatar Wolle Committed by GitHub

detect opus band

only full band supported
parent 9140af21
......@@ -3,7 +3,7 @@
* based on Xiph.Org Foundation celt decoder
*
* Created on: 26.01.2023
* Updated on: 23.12.2023
* Updated on: 19.01.2024
*/
//----------------------------------------------------------------------------------------------------------------------
// O G G / O P U S I M P L.
......@@ -255,6 +255,9 @@ int parseOpusTOC(uint8_t TOC_Byte){ // https://www.rfc-editor.org/rfc/rfc6716
if(configNr < 12) return ERR_OPUS_SILK_MODE_UNSUPPORTED;
if(configNr < 16) return ERR_OPUS_HYBRID_MODE_UNSUPPORTED;
if(configNr < 20) return ERR_OPUS_NARROW_BAND_UNSUPPORTED;
if(configNr < 24) return ERR_OPUS_WIDE_BAND_UNSUPPORTED;
if(configNr < 28) return ERR_OPUS_SUPER_WIDE_BAND_UNSUPPORTED;
return configNr;
}
......
......@@ -13,7 +13,10 @@ enum : int8_t {OPUS_PARSE_OGG_DONE = 100,
ERR_OPUS_DECODER_ASYNC = -4,
ERR_OPUS_SILK_MODE_UNSUPPORTED = -5,
ERR_OPUS_HYBRID_MODE_UNSUPPORTED = -6,
ERR_OPUS_OGG_SYNC_NOT_FOUND = - 7,
ERR_OPUS_NARROW_BAND_UNSUPPORTED = -7,
ERR_OPUS_WIDE_BAND_UNSUPPORTED = -8,
ERR_OPUS_SUPER_WIDE_BAND_UNSUPPORTED = -9,
ERR_OPUS_OGG_SYNC_NOT_FOUND = - 10,
ERR_OPUS_CELT_BAD_ARG = -18,
ERR_OPUS_CELT_INTERNAL_ERROR = -19,
ERR_OPUS_CELT_UNIMPLEMENTED = -20,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment