Skip to content

Commit

Permalink
Add missing error codes for AAC and LC3plus codecs
Browse files Browse the repository at this point in the history
  • Loading branch information
arkq committed Jan 8, 2024
1 parent a8b10fe commit c0f0b9e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/spellcheck-wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ libldac
libopenaptx
LLAC
MPF
MPS
mtx
ncurses
nmemb
Expand Down
25 changes: 15 additions & 10 deletions src/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ const char *aacdec_strerror(AAC_DECODER_ERROR err) {
return "Success";
case AAC_DEC_OUT_OF_MEMORY:
return "Out of memory";
case AAC_DEC_UNKNOWN:
return "Unknown error";
case AAC_DEC_TRANSPORT_SYNC_ERROR:
return "Transport sync error";
case AAC_DEC_NOT_ENOUGH_BITS:
Expand All @@ -197,6 +199,8 @@ const char *aacdec_strerror(AAC_DECODER_ERROR err) {
return "Unsupported parameter";
case AAC_DEC_NEED_TO_RESTART:
return "Restart required";
case AAC_DEC_OUTPUT_BUFFER_TOO_SMALL:
return "Output buffer too small";
case AAC_DEC_TRANSPORT_ERROR:
return "Transport error";
case AAC_DEC_PARSE_ERROR:
Expand Down Expand Up @@ -264,14 +268,15 @@ const char *aacenc_strerror(AACENC_ERROR err) {
return "Transport library initialization error";
case AACENC_INIT_META_ERROR:
return "Metadata library initialization error";
case AACENC_INIT_MPS_ERROR:
return "MPS library initialization error";
case AACENC_ENCODE_ERROR:
return "Encoding error";
case AACENC_ENCODE_EOF:
return "End of file";
default:
debug("Unknown error code: %#x", err);
return "Unknown error";
}
debug("Unknown error code: %#x", err);
return "Unknown error";
}
#endif

Expand Down Expand Up @@ -322,12 +327,13 @@ const char *lc3plus_strerror(LC3PLUS_Error err) {
return "Invalid cutoff frequency";
case LC3PLUS_PADDING_ERROR:
return "Padding error";
case LC3PLUS_LFE_MODE_NOT_SUPPORTED:
return "LFE not supported";
case FRAMESIZE_ERROR:
return "Framesize error";
default:
debug("Unknown error code: %#x", err);
return "Unknown error";
}
debug("Unknown error code: %#x", err);
return "Unknown error";
}
#endif

Expand Down Expand Up @@ -400,10 +406,9 @@ const char *ldacBT_strerror(int err) {
return "EQMID limited";
case LDACBT_ERR_DEC_CONFIG_UPDATED:
return "Configuration updated";
default:
debug("Unknown error code: %#x (API: %u, handle: %u, block: %u)",
err, LDACBT_API_ERR(err), LDACBT_HANDLE_ERR(err), LDACBT_BLOCK_ERR(err));
return "Unknown error";
}
debug("Unknown error code: %#x (API: %u, handle: %u, block: %u)",
err, LDACBT_API_ERR(err), LDACBT_HANDLE_ERR(err), LDACBT_BLOCK_ERR(err));
return "Unknown error";
}
#endif

0 comments on commit c0f0b9e

Please sign in to comment.