arduino-audio-tools
|
OpusAudioEncoder: Dependens on https://github.com/pschatzmann/arduino-libopus.git. More...
#include <CodecOpus.h>
Public Member Functions | |
OpusAudioEncoder (Print &out) | |
AudioInfo | audioInfo () |
provides the actual input AudioInfo | |
virtual AudioInfo | audioInfoOut () |
provides the actual output AudioInfo: this is usually the same as audioInfo() unless we use a transforming stream | |
bool | begin () override |
starts the processing using the actual OpusAudioInfo | |
virtual bool | begin (AudioInfo info) |
bool | begin (OpusEncoderSettings settings) |
OpusEncoderSettings & | config () |
Provides access to the configuration. | |
OpusEncoderSettings & | defaultConfig () |
void | end () override |
stops the processing | |
bool | isOpen () |
const char * | mime () override |
Provides "audio/pcm". | |
operator bool () override | |
void | setAudioInfo (AudioInfo from) override |
We actually do nothing with this. | |
void | setOutput (Print &out_stream) override |
Defines the output Stream. | |
size_t | write (const uint8_t *data, size_t len) override |
Writes PCM data to be encoded as Opus. | |
Protected Member Functions | |
void | encodeByte (uint8_t data) |
void | encodeFrame () |
int | getFrameSizeSamples (int sampling_rate) |
Returns the frame size in samples. | |
bool | settings () |
void | writeBlocking (Print *out, uint8_t *data, size_t len) |
Protected Attributes | |
OpusEncoderSettings | cfg |
OpusEncoder * | enc = nullptr |
Vector< uint8_t > | frame {0} |
int | frame_pos = 0 |
AudioInfo | info |
bool | is_open = false |
Print * | p_print = nullptr |
OpusAudioEncoder: Dependens on https://github.com/pschatzmann/arduino-libopus.git.