Encode for Opus audio.
More...
#include <CodecOpus.h>
Encode for Opus audio.
Depends on https://github.com/pschatzmann/arduino-libopus.git Please note that each fully encoded frame is written to the output stream.
- Author
- Phil Schatzmann
- Copyright
- GPLv3
◆ OpusAudioEncoder() [1/2]
◆ OpusAudioEncoder() [2/2]
◆ audioInfo()
|
|
inlineoverridevirtualinherited |
◆ audioInfoOut()
provides the actual output AudioInfo: this is usually the same as audioInfo() unless we use a transforming stream
Reimplemented in MP3EncoderShine, PureDataStream, PWMAudioOutput< PWMDriverT >, ChannelFormatConverterStreamT< T >, ChannelFormatConverterStream, NumberFormatConverterStreamT< TFrom, TTo >, NumberFormatConverterStream, FormatConverterStream, Pipeline, ResampleStream, and ResampleStreamT< TInterpolator >.
◆ begin() [1/3]
starts the processing using the actual OpusAudioInfo
Implements AudioWriter.
◆ begin() [2/3]
◆ begin() [3/3]
◆ config()
Provides access to the configuration.
◆ defaultConfig()
◆ encodeByte()
| void encodeByte |
( |
uint8_t |
data | ) |
|
|
inlineprotected |
◆ encodeFrame()
◆ end()
◆ frameDurationUs()
| virtual uint32_t frameDurationUs |
( |
| ) |
|
|
inlinevirtualinherited |
◆ frameSizeSamples()
◆ getFrameSizeSamples()
| int getFrameSizeSamples |
( |
int |
sampling_rate | ) |
|
|
inlineprotected |
Returns the frame size in samples.
◆ isOpen()
◆ lookaheadSamples()
◆ mime()
◆ operator bool()
◆ pendingSamples()
◆ samplesPerFrame()
| uint16_t samplesPerFrame |
( |
| ) |
|
|
inlinevirtual |
Optional rtsp function: provide samples per the frame.
Reimplemented from AudioEncoder.
◆ setAudioInfo()
We actually do nothing with this.
Reimplemented from AudioEncoder.
◆ setOutput()
| void setOutput |
( |
Print & |
out_stream | ) |
|
|
inlineoverridevirtual |
◆ settings()
◆ write()
| size_t write |
( |
const uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
|
inlineoverridevirtual |
Writes PCM data to be encoded as Opus.
Implements AudioWriter.
◆ writeBlocking()
| void writeBlocking |
( |
Print * |
out, |
|
|
uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
|
inlineprotectedinherited |
◆ cfg
◆ enc
| OpusEncoder* enc = nullptr |
|
protected |
◆ frame
◆ frame_pos
◆ info
◆ is_open
◆ p_print
The documentation for this class was generated from the following file: