|
arduino-audio-tools
|
Wraps the encoded data into OSC info and data segments so that the receiver can recover the audio configuration and orignial segments. More...
#include <ContainerOSC.h>
Classes | |
| class | OSCOutput |
| Output Encoded Audio via OSC. More... | |
Public Member Functions | |
| OSCContainerEncoder (AudioEncoder &encoder) | |
| AudioInfo | audioInfo () override |
| provides the actual input AudioInfo | |
| virtual AudioInfo | audioInfoOut () |
| bool | begin () override |
| virtual bool | begin (AudioInfo info) |
| void | end () |
| virtual uint32_t | frameDurationUs () |
| Optional rtsp function: provide the frame duration in microseconds. | |
| uint64_t | getSequenceNumber () |
| Returns the sequence number of the next packet. | |
| virtual const char * | mime () |
| Provides the mime type of the encoded result. | |
| operator bool () | |
| size_t | resendEncodedData (uint8_t *data, size_t len, uint64_t seq) |
| Resend the encoded data. | |
| virtual uint16_t | samplesPerFrame () |
| Optional rtsp function: provide samples per the frame. | |
| void | setAudioInfo (AudioInfo info) override |
| Defines the sample rate, number of channels and bits per sample. | |
| void | setEncodedWriteCallback (void(*write_callback)(uint8_t *data, size_t len, uint64_t seq, void *ref)) |
| Get informed about the encoded packages. | |
| void | setEncoder (AudioEncoder *encoder) |
| void | setInfoActive (bool flag) |
| Activate/deactivate the sending of the audio info. | |
| void | setOutput (Print &outStream) |
| Default output assignment (encoders may override to store Print reference) | |
| void | setReference (void *ref) |
| Define a reference object to be provided by the callback. | |
| void | setRepeatInfoEvery (int packet_count) |
| Automatically resend audio info ever nth write. | |
| size_t | write (const uint8_t *data, size_t len) |
| Add data segment. On first write we also add a AudioInfo header. | |
Protected Member Functions | |
| void | writeAudioInfo (AudioInfo info, const char *mime) |
| OUtput AudioInfo via OSC. | |
| void | writeBlocking (Print *out, uint8_t *data, size_t len) |
Protected Attributes | |
| AudioInfo | info |
| bool | is_active = false |
| bool | is_send_info_active = true |
| audio_tools::OSCContainerEncoder::OSCOutput | osc_out |
| AudioEncoder * | p_codec = nullptr |
| Print * | p_out = nullptr |
| uint64_t | packet_count = 0 |
| int | repeat_info = 0 |
Wraps the encoded data into OSC info and data segments so that the receiver can recover the audio configuration and orignial segments.
|
inlineoverridevirtualinherited |
provides the actual input AudioInfo
Implements AudioInfoSupport.
Reimplemented in CodecNOP, BinaryContainerEncoder, and MP3ParserEncoder.
|
inlinevirtualinherited |
provides the actual output AudioInfo: this is usually the same as audioInfo() unless we use a transforming stream
Reimplemented in PureDataStream, PWMAudioOutput, ChannelFormatConverterStreamT< T >, ChannelFormatConverterStream, NumberFormatConverterStreamT< TFrom, TTo >, NumberFormatConverterStream, FormatConverterStream, Pipeline, ResampleStream, and ResampleStreamT< TInterpolator >.
|
inlineoverridevirtual |
Implements AudioWriter.
|
inlinevirtualinherited |
Reimplemented in AACEncoderFDK.
|
inlinevirtual |
Implements AudioWriter.
|
inlinevirtualinherited |
Optional rtsp function: provide the frame duration in microseconds.
Reimplemented in ADPCMEncoder, OpusOggEncoder, MP3ParserEncoder, and MetaDataFilterEncoder.
|
inlinevirtual |
Provides the mime type of the encoded result.
Implements AudioEncoder.
|
inlinevirtual |
Implements AudioWriter.
|
inlinevirtualinherited |
Optional rtsp function: provide samples per the frame.
Reimplemented in MP3ParserEncoder, and MetaDataFilterEncoder.
|
inlineoverridevirtual |
Defines the sample rate, number of channels and bits per sample.
Reimplemented from AudioEncoder.
|
inlinevirtual |
Default output assignment (encoders may override to store Print reference)
Reimplemented from AudioEncoder.
|
inlinevirtual |
Add data segment. On first write we also add a AudioInfo header.
Implements AudioWriter.