arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
audio_tools::APTXDecoder Class Reference

Decoder for OpenAptx. Depends on https://github.com/pschatzmann/libopenaptx. More...

#include <CodecAPTX.h>

Inheritance diagram for audio_tools::APTXDecoder:
audio_tools::AudioDecoder audio_tools::AudioWriter audio_tools::AudioBaseInfoSource

Public Member Functions

 APTXDecoder (bool isHd=false)
 
virtual AudioBaseInfo audioInfo ()
 
virtual void begin ()
 
virtual void end ()
 
 operator bool ()
 
virtual void setNotifyAudioChange (AudioBaseInfoDependent &bi)
 
virtual void setOutputStream (Print &out_stream)
 
virtual size_t write (const void *input_buffer, size_t length)
 
- Public Member Functions inherited from audio_tools::AudioDecoder
 AudioDecoder (AudioDecoder const &)=delete
 
virtual AudioBaseInfo audioInfo ()=0
 
virtual bool isResultPCM ()
 
AudioDecoderoperator= (AudioDecoder const &)=delete
 
virtual void setAudioInfo (AudioBaseInfo from) override
 
virtual void setOutputStream (AudioPrint &out_stream)
 
virtual void setOutputStream (AudioStream &out_stream)
 
virtual void setOutputStream (Print &out_stream) override=0
 
virtual void begin ()=0
 
virtual void end ()=0
 
virtual operator bool ()=0
 
virtual void setAudioInfo (AudioBaseInfo from)=0
 
virtual void setOutputStream (Print &out_stream)=0
 
virtual size_t write (const void *in_ptr, size_t in_size)=0
 
virtual void setNotifyAudioChange (AudioBaseInfoDependent &bi)=0
 

Protected Member Functions

bool checkPrefix (const void *input_buffer, size_t length)
 Checks the prefix of the received data.
 
void checkSync (bool synced, bool dropped, bool &is_ok)
 Checks the syncronization.
 
void writeData (size_t written, bool &is_ok)
 Converts the data to 16 bit and writes it to final output.
 

Protected Attributes

struct aptx_context * ctx = nullptr
 
AudioBaseInfo info
 
bool is_first_write = true
 
bool is_hd
 
AudioBaseInfoDependentnotify = nullptr
 
Vector< uint8_t > output_buffer
 
Printp_print = nullptr
 
size_t processed
 
bool syncing
 
size_t written
 

Detailed Description

Decoder for OpenAptx. Depends on https://github.com/pschatzmann/libopenaptx.

Author
Phil Schatzmann

Member Function Documentation

◆ audioInfo()

virtual AudioBaseInfo audio_tools::APTXDecoder::audioInfo ( )
inlinevirtual

◆ begin()

virtual void audio_tools::APTXDecoder::begin ( )
inlinevirtual

◆ end()

virtual void audio_tools::APTXDecoder::end ( )
inlinevirtual

◆ operator bool()

audio_tools::APTXDecoder::operator bool ( )
inlinevirtual

◆ setNotifyAudioChange()

virtual void audio_tools::APTXDecoder::setNotifyAudioChange ( AudioBaseInfoDependent bi)
inlinevirtual

◆ setOutputStream()

virtual void audio_tools::APTXDecoder::setOutputStream ( Print out_stream)
inlinevirtual

◆ write()

virtual size_t audio_tools::APTXDecoder::write ( const void *  input_buffer,
size_t  length 
)
inlinevirtual

The documentation for this class was generated from the following file: