arduino-audio-tools
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
APTXEncoder Class Reference

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

#include <CodecAPTX.h>

Inheritance diagram for APTXEncoder:
AudioEncoder AudioWriter AudioInfoSupport

Public Member Functions

 APTXEncoder (bool isHd=false)
 
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 ()
 
virtual bool begin (AudioInfo info)
 
virtual void end ()
 
virtual const char * mime ()
 Provides the mime type of the encoded result.
 
 operator bool ()
 
virtual void setAudioInfo (AudioInfo info)
 Defines the sample rate, number of channels and bits per sample.
 
virtual void setOutput (Print &out_stream)
 
virtual size_t write (const uint8_t *data, size_t len)
 

Protected Member Functions

void writeBlocking (Print *out, uint8_t *data, size_t len)
 

Protected Attributes

struct aptx_context * ctx = nullptr
 
AudioInfo info
 
Vector< int24_tinput_buffer {4 * 2}
 
int input_pos = 0
 
bool is_hd
 
Vector< uint8_t > output_buffer
 
int output_pos = 0
 
Printp_print = nullptr
 

Detailed Description

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

Author
Phil Schatzmann

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