Skip to content

Commit f5ecb88

Browse files
committed
M4A support: DRAFT
1 parent 12dd4f7 commit f5ecb88

File tree

7 files changed

+345
-123
lines changed

7 files changed

+345
-123
lines changed

src/AudioBasic/Net.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#pragma once
2+
3+
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
4+
# define htonl(x) (((x) << 24 & 0xFF000000UL) | ((x) << 8 & 0x00FF0000UL) | ((x) >> 8 & 0x0000FF00UL) | ((x) >> 24 & 0x000000FFUL))
5+
# define htons(x) (((uint16_t)(x)&0xff00) >> 8) | (((uint16_t)(x)&0X00FF) << 8)
6+
# define ntohl(x) htonl(x)
7+
# define ntohs(x) htons(x)
8+
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
9+
# define htonl(x) x
10+
# define htons(x) x
11+
# define ntohl(x) x
12+
# define ntohs(x) x
13+
#else
14+
#error Could not determine byte order
15+
#endif

src/AudioCodecs/CodecAACHelix.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ class AACDecoderHelix : public AudioDecoder {
101101
return result;
102102
}
103103

104+
void setAudioInfo(AudioInfo info){
105+
AudioDecoder::setAudioInfo(info);
106+
aac->setAudioInfo(info.channels, info.sample_rate);
107+
}
108+
104109
/// Write AAC data to decoder
105110
size_t write(const void* aac_data, size_t len) {
106111
return aac==nullptr ? 0 : aac->write(aac_data, len);

0 commit comments

Comments
 (0)