Encoder for SBC - Depends on https://github.com/pschatzmann/arduino-libsbc. Inspired by sbcenc.c.
More...
#include <CodecSBC.h>
|
| 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) |
| |
Encoder for SBC - Depends on https://github.com/pschatzmann/arduino-libsbc. Inspired by sbcenc.c.
- Author
- Phil Schatzmann
- Copyright
- GPLv3
◆ SBCEncoder()
| SBCEncoder |
( |
int |
subbands = 8, |
|
|
int |
blocks = 16, |
|
|
int |
bitpool = 32, |
|
|
int |
allocation_method = SBC_AM_LOUDNESS |
|
) |
| |
|
inline |
◆ audioInfo()
|
|
inlineoverridevirtualinherited |
◆ audioInfoOut()
provides the actual output AudioInfo: this is usually the same as audioInfo() unless we use a transforming stream
Reimplemented in MP3EncoderShine, PureDataStream, PWMAudioOutput< PWMDriverT >, ChannelFormatConverterStreamT< T >, ChannelFormatConverterStream, NumberFormatConverterStreamT< TFrom, TTo >, NumberFormatConverterStream, FormatConverterStream, Pipeline, ResampleStream, and ResampleStreamT< TInterpolator >.
◆ begin() [1/2]
◆ begin() [2/2]
◆ bytesCompressed()
◆ bytesUncompressed()
| int bytesUncompressed |
( |
| ) |
|
|
inline |
◆ codeSize()
Provides the uncompressed length (of the PCM data) in bytes.
◆ end()
◆ frameDurationUs()
| virtual uint32_t frameDurationUs |
( |
| ) |
|
|
inlinevirtualinherited |
◆ frameLength()
Provides the compressed length in bytes (after encoding)
◆ mime()
| virtual const char * mime |
( |
| ) |
|
|
inlinevirtual |
Provides the mime type of the encoded result.
Implements AudioEncoder.
◆ operator bool()
◆ processByte()
| void processByte |
( |
uint8_t |
byte | ) |
|
|
inlineprotected |
◆ samplesPerFrame()
| virtual uint16_t samplesPerFrame |
( |
| ) |
|
|
inlinevirtualinherited |
◆ setAllocationMethod()
| void setAllocationMethod |
( |
int |
allocation_method | ) |
|
|
inline |
Defines the allocation method: Use SBC_AM_LOUDNESS, SBC_AM_SNR.
◆ setAudioInfo()
|
|
inlineoverridevirtualinherited |
Defines the sample rate, number of channels and bits per sample.
Implements AudioWriter.
Reimplemented in MP3EncoderLAME, EncoderBasic, CodecChain, DSFEncoder, FLACEncoder, MP3EncoderShine, OpusAudioEncoder, OpusMultiStreamAudioEncoder, WAVEncoder, CodecNOP, G7xxEncoder, G729Encoder, BinaryContainerEncoder, OggContainerEncoder, OSCContainerEncoder, and MetaDataFilterEncoder.
◆ setBitpool()
| void setBitpool |
( |
int |
bitpool | ) |
|
|
inline |
Defines the bitpool (2-86?)
◆ setBlocks()
| void setBlocks |
( |
int |
blocks | ) |
|
|
inline |
Defines the number of blocks: valid values (4,8,12,16)
◆ setOutput()
| virtual void setOutput |
( |
Print & |
out_stream | ) |
|
|
inlinevirtual |
Default output assignment (encoders may override to store Print reference)
Reimplemented from AudioEncoder.
◆ setSubbands()
| void setSubbands |
( |
int |
subbands | ) |
|
|
inline |
Defines the subbands: Use 4 or 8.
◆ setup()
Determines audio information and calls sbc_init;.
◆ write()
| virtual size_t write |
( |
const uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
|
inlinevirtual |
◆ writeBlocking()
| void writeBlocking |
( |
Print * |
out, |
|
|
uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
|
inlineprotectedinherited |
◆ allocation_method
◆ bitpool
◆ blocks
◆ buffer
◆ buffer_pos
◆ current_codesize
◆ info
◆ is_active
◆ is_first
◆ p_print
◆ result_buffer
| Vector<uint8_t> result_buffer {0} |
|
protected |
◆ sbc
◆ subbands
The documentation for this class was generated from the following file: