arduino-audio-tools
|
Vorbis Streaming Decoder using https://github.com/pschatzmann/arduino-libvorbis-tremor. More...
#include <CodecVorbis.h>
Public Member Functions | |
~VorbisDecoder () | |
Destroy the VorbisDecoder object. | |
virtual void | addNotifyAudioChange (AudioInfoSupport &bi) |
Adds target to be notified about audio changes. | |
AudioInfo | audioInfo () override |
Provides the last available MP3FrameInfo. | |
virtual AudioInfo | audioInfoOut () |
bool | begin () override |
Starts the processing. | |
virtual void | clearNotifyAudioChange () |
Deletes all change notify subscriptions. | |
virtual bool | copy () override |
Process a single read operation - to be called in the loop. | |
bool | copyAll () |
Process all available data. | |
void | end () override |
Releases the reserved memory. | |
bool | isNotifyActive () |
Checks if the automatic AudioInfo update is active. | |
const char * | mime () override |
Provides "audio/ogg". | |
virtual | operator bool () override |
checks if the class is active | |
virtual bool | removeNotifyAudioChange (AudioInfoSupport &bi) |
Removes a target in order not to be notified about audio changes. | |
void | setDelayOnNoData (size_t delay) |
Defines the delay when there is no data. | |
void | setInput (Stream &inStream) |
Stream Interface: Decode directly by taking data from the stream. | |
void | setNotifyActive (bool flag) |
Deactivate/Reactivate automatic AudioInfo updates: (default is active) | |
virtual void | setOutput (AudioOutput &out_stream) |
Defines the output streams and register to be notified. | |
virtual void | setOutput (AudioStream &out_stream) |
Defines the output streams and register to be notified. | |
virtual void | setOutput (Print &out_stream) |
Defines the output Stream. | |
void | setReadSize (size_t size) |
Defines the default read size. | |
void | setWaitForData (size_t wait) |
Defines the delay to wait if there is not enough data to open the decoder. | |
Protected Member Functions | |
AudioInfo | currentInfo () |
const char * | getOpenError (int error) |
void | notifyAudioChange (AudioInfo info) |
bool | ovOpen () |
virtual size_t | readBytes (uint8_t *data, size_t len) override |
Reads bytes from the input stream. | |
const char * | readError (long error) |
void | setAudioInfo (AudioInfo newInfo) override |
Defines the input AudioInfo. | |
Protected Attributes | |
bool | active = false |
int | bitstream = 0 |
ov_callbacks | callbacks |
AudioInfo | cfg |
size_t | delay_on_no_data_ms = 100 |
size_t | delay_wait_for_data_ms = 500 |
OggVorbis_File | file |
AudioInfo | info |
bool | is_first = true |
bool | is_notify_active = true |
bool | is_ov_open = false |
size_t | max_read_size = 1024 |
Vector< AudioInfoSupport * > | notify_vector |
Stream * | p_input = nullptr |
Input stream for encoded audio data. | |
Print * | p_print = nullptr |
Output stream for decoded PCM data. | |
Vector< uint8_t > | pcm {0} |
Vorbis Streaming Decoder using https://github.com/pschatzmann/arduino-libvorbis-tremor.
|
inlinevirtualinherited |
Adds target to be notified about audio changes.
Reimplemented in CodecNOP, EncodedAudioOutput, EncodedAudioStream, AACDecoderFDK, DecoderBasic, MP3DecoderHelix, MP3DecoderMAD, OggContainerDecoder, Pipeline, and Pipeline::ModifyingStreamAdapter.
|
inlineoverridevirtual |
Provides the last available MP3FrameInfo.
Implements StreamingDecoder.
|
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 |
Starts the processing.
Implements StreamingDecoder.
|
inlineoverridevirtual |
Process a single read operation - to be called in the loop.
Reads a chunk of data from the input stream, decodes it, and writes the decoded PCM data to the output stream.
Implements StreamingDecoder.
|
inlineinherited |
Process all available data.
Convenience method that calls copy() repeatedly until all available data has been processed.
|
inlineoverridevirtual |
Releases the reserved memory.
Implements StreamingDecoder.
|
inlineoverridevirtual |
Provides "audio/ogg".
Implements StreamingDecoder.
|
inlineoverridevirtual |
checks if the class is active
Implements StreamingDecoder.
|
inlineoverrideprotectedvirtual |
Reads bytes from the input stream.
Derived classes must implement this to read data from their input source.
data | Buffer to store the read data |
len | Maximum number of bytes to read |
Implements StreamingDecoder.
|
inlineoverrideprotectedvirtualinherited |
Defines the input AudioInfo.
Implements AudioInfoSupport.
|
inlineinherited |
|
inlinevirtualinherited |
Defines the output streams and register to be notified.
Sets the output stream and registers for audio info change notifications.
out_stream | The AudioOutput to write decoded audio data to |
Reimplemented in MultiStreamingDecoder.
|
inlinevirtualinherited |
Defines the output streams and register to be notified.
Sets the output stream and registers for audio info change notifications.
out_stream | The AudioStream to write decoded audio data to |
Reimplemented in MultiStreamingDecoder.
|
inlinevirtualinherited |
Defines the output Stream.
Sets where the decoded PCM audio data will be written to.
out_stream | The Print stream to write decoded audio data to |
Reimplemented in StreamingDecoderAdapter, and MultiStreamingDecoder.