Lean MP3 Encoder using the shine library.
More...
#include <CodecMP3Shine.h>
Lean MP3 Encoder using the shine library.
- Note
- please install the shine library first: https://github.com/pschatzmann/codec-shine
- Author
- Phil Schatzmann
- Copyright
- GPLv3
◆ MP3EncoderShine()
◆ ~MP3EncoderShine()
◆ audioInfo()
◆ audioInfoOut()
◆ begin() [1/2]
◆ begin() [2/2]
◆ end()
◆ flush()
◆ frameDurationUs()
| uint32_t frameDurationUs |
( |
| ) |
|
|
inlineoverridevirtual |
Optional rtsp function: provide the frame duration in microseconds.
Reimplemented from AudioEncoder.
◆ frameSize()
| virtual int frameSize |
( |
| ) |
|
|
inlinevirtualinherited |
Optional rtsp function: provide the encoded size (in bytes) of one frame, once known (e.g. after the encoder has seen real data). Lets an RTSPFormat size its RTP fragments to match one frame instead of a fixed guess, so throughput actually tracks frameDurationUs() - a fragment size covering several frames' worth of bytes sent at one-frame timing overruns real-time bandwidth and, over UDP (no flow control), causes packet loss. Returns 0 if not yet known/not applicable (fixed-frame-size codecs have no need to override this).
Reimplemented in ADPCMEncoder, EncoderALAC, AMRNBEncoder, AMRWBEncoder, and MP3ParserEncoder.
◆ mime()
Provides the mime type of the encoded result.
Implements AudioEncoder.
◆ operator bool()
◆ samplesPerFrame()
| uint16_t samplesPerFrame |
( |
| ) |
|
|
inlineoverridevirtual |
Optional rtsp function: provide samples per the frame.
Reimplemented from AudioEncoder.
◆ selectBitrateFast()
| static int selectBitrateFast |
( |
int |
sr, |
|
|
int |
req |
|
) |
| |
|
inlinestaticprotected |
◆ setAudioInfo()
Defines the sample rate, number of channels and bits per sample.
Reimplemented from AudioEncoder.
◆ setBitrate()
| void setBitrate |
( |
int |
br | ) |
|
|
inline |
Request the bitrate for encoding (in kbps).
◆ setCopyright()
| void setCopyright |
( |
bool |
copyright | ) |
|
|
inline |
Sets the copyright flag for encoding.
◆ setDeemphasis()
| void setDeemphasis |
( |
emph |
deemphasis | ) |
|
|
inline |
Sets the deemphasis filter for encoding (e.g. for old recordings)
- Parameters
-
| deemphasis | NONE = 0, MU50_15 = 1, CITT = 3 } |
◆ setMode()
| void setMode |
( |
modes |
mode | ) |
|
|
inline |
Sets the mode for encoding (STEREO = 0, JOINT_STEREO = 1, DUAL_CHANNEL = 2, MONO = 3 )
◆ setOriginal()
| void setOriginal |
( |
bool |
original | ) |
|
|
inline |
Sets the original flag for encoding.
◆ setOutput()
| void setOutput |
( |
Print & |
out_stream | ) |
|
|
inlineoverridevirtual |
Default output assignment (encoders may override to store Print reference)
Reimplemented from AudioEncoder.
◆ write()
| size_t write |
( |
const uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
|
inlineoverridevirtual |
◆ writeBlocking()
| void writeBlocking |
( |
Print * |
out, |
|
|
uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
|
inlineprotectedinherited |
◆ writeMP3()
◆ _bitrate
◆ _config
| shine_config_t _config {} |
|
protected |
◆ _out
◆ _pcm_buffer
◆ _shine
◆ info
The documentation for this class was generated from the following file: