7#ifndef OPUS_ENC_MAX_BUFFER_SIZE
8#define OPUS_ENC_MAX_BUFFER_SIZE 2048
11#ifndef OPUS_DEC_MAX_BUFFER_SIZE
12#define OPUS_DEC_MAX_BUFFER_SIZE 4 * 1024
172 LOGE(
"opus_decoder_create: %s for sample_rate: %d, channels:%d",
202 LOGD(
"OpusAudioDecoder::write: %d", (
int)len);
220 processed += written;
244 if (
valid == rate)
return true;
272 const char *
mime()
override {
return "audio/opus"; }
291 LOGE(
"opus_encoder_create: %s for sample_rate: %d, channels:%d",
321 LOGD(
"OpusAudioEncoder::write: %d", (
int)len);
324 for (
int j = 0;
j < len;
j++) {
361 LOGD(
"opus_encode - frame_size: %d", frames);
366 }
else if (len > 0) {
367 LOGD(
"opus-encode: %d", len);
370 LOGE(
"encodeFrame data lost: %d->%d", len,
eff);
380 return sampling_rate / 400;
382 return sampling_rate / 200;
384 return sampling_rate / 100;
386 return sampling_rate / 50;
388 return sampling_rate / 25;
390 return 3 * sampling_rate / 50;
392 return 4 * sampling_rate / 50;
394 return 5 * sampling_rate / 50;
396 return 6 * sampling_rate / 50;
398 return sampling_rate / 100;
#define LOGW(...)
Definition AudioLoggerIDF.h:29
#define TRACED()
Definition AudioLoggerIDF.h:31
#define LOGD(...)
Definition AudioLoggerIDF.h:27
#define LOGE(...)
Definition AudioLoggerIDF.h:30
#define OPUS_DEC_MAX_BUFFER_SIZE
Definition CodecOpus.h:12
#define OPUS_ENC_MAX_BUFFER_SIZE
Definition CodecOpus.h:8
#define assert(T)
Definition avr.h:10