diff options
author | Jean-Francois Mauguit <jfmauguit@mac.com> | 2024-09-24 09:03:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 09:03:25 -0400 |
commit | bab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/aacdec/ADTSHeader.h | |
parent | 4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff) | |
parent | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff) | |
download | winamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz |
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/aacdec/ADTSHeader.h')
-rw-r--r-- | Src/aacdec/ADTSHeader.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Src/aacdec/ADTSHeader.h b/Src/aacdec/ADTSHeader.h new file mode 100644 index 00000000..f6f7c202 --- /dev/null +++ b/Src/aacdec/ADTSHeader.h @@ -0,0 +1,34 @@ +#pragma once +#include <bfc/platform/types.h> + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct ADTSHeader +{ + unsigned int syncword; + unsigned int layer; + unsigned int id; + unsigned int protection; + unsigned int profile; + unsigned int sample_rate_index; + unsigned int private_bit; + unsigned int channel_configuration; + unsigned int original; + unsigned int home; + size_t frame_length; + unsigned int buffer_fullness; + unsigned int num_data_blocks; +} ADTSHeader, *nsaac_adts_header_t; + +/* must be 7 bytes */ +int nsaac_adts_parse(nsaac_adts_header_t header, const uint8_t *buffer); +unsigned int nsaac_adts_get_samplerate(nsaac_adts_header_t header); +int nsaac_adts_match(nsaac_adts_header_t header1, nsaac_adts_header_t header2); +int nsaac_adts_get_channel_count(nsaac_adts_header_t header); +size_t nsaac_adts_get_header_size(nsaac_adts_header_t header); + +#ifdef __cplusplus +} +#endif
\ No newline at end of file |