File tree Expand file tree Collapse file tree 4 files changed +11
-9
lines changed
examples/tests/codecs/test-codec-opus Expand file tree Collapse file tree 4 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 12
12
#include " AudioLibs/AudioKit.h"
13
13
#include " AudioCodecs/CodecOpus.h"
14
14
15
- int sample_rate = 24000 ;
15
+ int sample_rate = 32000 ;
16
16
int channels = 1 ;
17
17
18
18
SineWaveGenerator<int16_t > sineWave ( 32000 ); // subclass of SoundGenerator with max amplitude of 32000
@@ -47,9 +47,10 @@ void setup() {
47
47
encoder.begin (cfgs);
48
48
49
49
// configure additinal parameters
50
- // enc.config().application = OPUS_APPLICATION_RESTRICTED_LOWDELAY;
51
- // enc.config().frame_sizes_ms_x2 = OPUS_FRAMESIZE_20_MS;
52
- // enc.config().complexity = 5;
50
+ // auto &enc_cfg = enc.config()
51
+ // enc_cfg.application = OPUS_APPLICATION_RESTRICTED_LOWDELAY;
52
+ // enc_cfg.frame_sizes_ms_x2 = OPUS_FRAMESIZE_20_MS;
53
+ // enc_cfg.complexity = 5;
53
54
54
55
Serial.println (" Test started..." );
55
56
}
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ namespace audio_tools {
17
17
* @author Phil Schatzmann
18
18
* @copyright GPLv3
19
19
*/
20
- struct AudioInfoLAME : AudioInfo {
20
+ struct AudioInfoLAME : public liblame :: AudioInfo {
21
21
AudioInfoLAME () {
22
22
sample_rate = 44100 ;
23
23
channels = 2 ;
@@ -158,7 +158,7 @@ class MP3EncoderLAME : public AudioEncoder {
158
158
if (p_print!=nullptr ){
159
159
setOutputStream (*p_print);
160
160
}
161
- liblame::AudioInfo tmp;
161
+ AudioInfoLAME tmp;
162
162
tmp.channels = info.channels ;
163
163
tmp.sample_rate = info.sample_rate ;
164
164
tmp.bits_per_sample = info.bits_per_sample ;
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ struct OpusEncoderSettings : public OpusSettings {
110
110
};
111
111
112
112
/* *
113
- * @brief OpusDecoder. Depends on https://github.com/pschatzmann/arduino-libopus.git
113
+ * @brief OpusAudioDecoder: Depends on https://github.com/pschatzmann/arduino-libopus.git
114
114
* @author Phil Schatzmann
115
115
* @copyright GPLv3
116
116
*/
@@ -213,8 +213,7 @@ class OpusAudioDecoder : public AudioDecoder {
213
213
};
214
214
215
215
/* *
216
- * @brief OpusDecoder - Actually this class does no encoding or decoding at
217
- * all. It just passes on the data. Dependent on https://github.com/pschatzmann/arduino-libopus.git
216
+ * @brief OpusAudioEncoder: Dependens on https://github.com/pschatzmann/arduino-libopus.git
218
217
* @ingroup codec-opus
219
218
* @author Phil Schatzmann
220
219
* @copyright GPLv3
Original file line number Diff line number Diff line change @@ -320,6 +320,7 @@ class MemoryStream : public AudioStream {
320
320
}
321
321
}
322
322
323
+ // / Automatically rewinds to the beginning when reaching the end
323
324
virtual void setLoop (bool loop){
324
325
is_loop = loop;
325
326
}
@@ -432,6 +433,7 @@ class DynamicMemoryStream : public AudioStream {
432
433
clear ();
433
434
}
434
435
436
+ // / Automatically rewinds to the beginning when reaching the end
435
437
virtual void setLoop (bool loop){
436
438
is_loop = loop;
437
439
}
You can’t perform that action at this time.
0 commit comments