Skip to content

Commit b9623c5

Browse files
committed
DecoderALAC
1 parent a826a8d commit b9623c5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/AudioTools/AudioCodecs/CodecALAC.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace audio_tools {
1515
*/
1616
class DecoderALAC : public AudioDecoder {
1717
public:
18-
/// write Magic Cookie
18+
/// write Magic Cookie (ALACSpecificConfig)
1919
size_t writeCodecInfo(const uint8_t* data, size_t len) override {
2020
int32_t rc = dec.Init((void*)data, len);
2121
if (rc != 0) {
@@ -31,6 +31,11 @@ class DecoderALAC : public AudioDecoder {
3131
return len;
3232
}
3333

34+
// define ALACSpecificConfig
35+
size_t writeCodecInfo(ALACSpecificConfig& config) {
36+
return writeCodecInfo((uint8_t*)&config, sizeof(config));
37+
}
38+
3439
/// we expect the write is called for a complete frame!
3540
size_t write(const uint8_t* encodedFrame, size_t frameLength) override {
3641
LOGI("write: %d", (int)frameLength);

0 commit comments

Comments
 (0)