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

Dummy Encoder which just copies the provided data to the output. More...

#include <CodecCopy.h>

Inheritance diagram for CopyEncoder:
AudioEncoder AudioWriter AudioInfoSupport

Public Member Functions

 CopyEncoder (Print &out_stream)
 
 CopyEncoder (Print &out_stream, AudioInfoSupport &bi)
 
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)
 
void end ()
 
const charmime ()
 Provides the mime type of the encoded result.
 
 operator bool ()
 
void setAudioInfo (AudioInfo from) override
 Defines the sample rate, number of channels and bits per sample.
 
virtual void setOutput (Print &out_stream)
 
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

AudioInfo info
 
Printpt_print =nullptr
 

Detailed Description

Dummy Encoder which just copies the provided data to the output.

Author
Phil Schatzmann

Member Function Documentation

◆ audioInfo()

AudioInfo audioInfo ( )
inlinevirtualinherited

provides the actual input AudioInfo

Implements AudioInfoSupport.

Reimplemented in CodecNOP, and BinaryContainerEncoder.

◆ audioInfoOut()

virtual AudioInfo audioInfoOut ( )
inlinevirtualinherited

◆ begin() [1/2]

bool begin ( )
inlinevirtual

Implements AudioWriter.

◆ begin() [2/2]

virtual bool begin ( AudioInfo  info)
inlinevirtualinherited

Reimplemented in AACEncoderFDK.

◆ end()

void end ( )
inlinevirtual

Implements AudioWriter.

◆ mime()

const char * mime ( )
inlinevirtual

Provides the mime type of the encoded result.

Implements AudioEncoder.

◆ operator bool()

operator bool ( )
inlinevirtual

Implements AudioWriter.

◆ setAudioInfo()

void setAudioInfo ( AudioInfo  from)
inlineoverridevirtualinherited

Defines the sample rate, number of channels and bits per sample.

Implements AudioWriter.

Reimplemented in MP3EncoderLAME, EncoderBasic, FLACEncoder, OpusAudioEncoder, WAVEncoder, CodecNOP, G7xxEncoder, BinaryContainerEncoder, and OggContainerEncoder.

◆ setOutput()

virtual void setOutput ( Print out_stream)
inlinevirtual

Implements AudioWriter.

◆ write()

size_t write ( const uint8_t data,
size_t  len 
)
inlinevirtual

Implements AudioWriter.


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