Encoder for SBC - Depends on https://github.com/pschatzmann/arduino-libsbc. Inspired by sbcenc.c.
More...
#include <CodecSBC.h>
|
| SBCEncoder (int subbands=8, int blocks=16, int bitpool=32, int allocation_method=SBC_AM_LOUDNESS) |
|
AudioInfo | audioInfo () |
| provides the actual input AudioInfo
|
|
virtual AudioInfo | audioInfoOut () |
|
bool | begin () |
| Restarts the processing.
|
|
virtual bool | begin (AudioInfo info) |
|
int | bytesCompressed () |
|
int | bytesUncompressed () |
|
virtual void | end () |
| Ends the processing.
|
|
virtual const char * | mime () |
| Provides the mime type of the encoded result.
|
|
| operator bool () |
|
void | setAllocationMethod (int allocation_method) |
| Defines the allocation method: Use SBC_AM_LOUDNESS, SBC_AM_SNR.
|
|
void | setAudioInfo (AudioInfo from) override |
| Defines the sample rate, number of channels and bits per sample.
|
|
void | setBitpool (int bitpool) |
| Defines the bitpool (2-86?)
|
|
void | setBlocks (int blocks) |
| Defines the number of blocks: valid values (4,8,12,16)
|
|
virtual void | setOutput (Print &out_stream) |
|
void | setSubbands (int subbands) |
| Defines the subbands: Use 4 or 8.
|
|
virtual size_t | write (const uint8_t *data, size_t len) |
|
|
int | codeSize () |
| Provides the uncompressed length (of the PCM data) in bytes.
|
|
int | frameLength () |
| Provides the compressed length in bytes (after encoding)
|
|
void | processByte (uint8_t byte) |
|
bool | setup () |
| Determines audio information and calls sbc_init;.
|
|
void | writeBlocking (Print *out, uint8_t *data, size_t len) |
|
|
int | allocation_method |
|
int | bitpool = 32 |
|
int | blocks = 4 |
|
Vector< uint8_t > | buffer {0} |
|
int | buffer_pos = 0 |
|
int | current_codesize = 0 |
|
AudioInfo | info |
|
bool | is_active = false |
|
bool | is_first = true |
|
Print * | p_print = nullptr |
|
Vector< uint8_t > | result_buffer {0} |
|
sbc_t | sbc |
|
int | subbands = 4 |
|
Encoder for SBC - Depends on https://github.com/pschatzmann/arduino-libsbc. Inspired by sbcenc.c.
- Author
- Phil Schatzmann
- Copyright
- GPLv3
◆ audioInfo()
◆ audioInfoOut()
◆ begin() [1/2]
◆ begin() [2/2]
◆ end()
◆ mime()
virtual const char * mime |
( |
| ) |
|
|
inlinevirtual |
Provides the mime type of the encoded result.
Implements AudioEncoder.
◆ operator bool()
◆ setAudioInfo()
|
inlineoverridevirtualinherited |
◆ setOutput()
virtual void setOutput |
( |
Print & |
out_stream | ) |
|
|
inlinevirtual |
◆ write()
virtual size_t write |
( |
const uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
|
inlinevirtual |
The documentation for this class was generated from the following file: