Skip to content

Commit cdb8ca4

Browse files
committed
add mp3 encoding
1 parent fea05d8 commit cdb8ca4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/mic.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ I2SStream i2sStream;
1010

1111
File input_audio_file;
1212

13-
// EncodedAudioStream encoder(&file, new MP3EncoderLAME());
13+
EncodedAudioStream encoder(&input_audio_file, new MP3EncoderLAME());
1414
StreamCopy copier;
1515

1616
MicManager::MicManager(int bckPin, int wsPin, int dataPin)
@@ -41,7 +41,7 @@ MicManager::startRecording(String fileName)
4141
copier.setCheckAvailableForWrite(false);
4242

4343
i2sStream.begin(cfg);
44-
copier.begin(input_audio_file, i2sStream);
44+
copier.begin(encoder, i2sStream);
4545
}
4646

4747
void

src/mic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <SD.h>
99

1010
#include "AudioCodecs/AudioEncoded.h"
11-
// #include "AudioCodecs/CodecMP3LAME.h"
11+
#include "AudioCodecs/CodecMP3LAME.h"
1212

1313
using AudioBufferCallback = void (*)(void);
1414

0 commit comments

Comments
 (0)