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

3 Band Equilizer inspired from https://www.musicdsp.org/en/latest/Filters/236-3-band-equaliser.html More...

#include <Equilizer.h>

Inheritance diagram for audio_tools::Equilizer3Bands:
audio_tools::AudioStreamX audio_tools::AudioStream audio_tools::Stream audio_tools::AudioBaseInfoDependent audio_tools::AudioBaseInfoSource audio_tools::Print

Classes

struct  EQSTATE
 

Public Member Functions

 Equilizer3Bands (AudioPrint &out)
 
 Equilizer3Bands (AudioStream &stream)
 
 Equilizer3Bands (Print &out)
 
 Equilizer3Bands (Stream &in)
 
int available () override
 
int availableForWrite () override
 
bool begin (ConfigEquilizer3Bands &config)
 
ConfigEquilizer3Bandsconfig ()
 
ConfigEquilizer3BandsdefaultConfig ()
 
size_t readBytes (uint8_t *data, size_t len) override
 Provides the data from all streams mixed together. More...
 
virtual void setAudioInfo (AudioBaseInfo info) override
 
size_t write (const uint8_t *data, size_t len) override
 
- Public Member Functions inherited from audio_tools::AudioStreamX
 AudioStreamX (AudioStreamX const &)=delete
 
virtual int available () override
 
AudioStreamXoperator= (AudioStreamX const &)=delete
 
virtual int peek () override
 
virtual int read () override
 
virtual size_t readBytes (uint8_t *buffer, size_t length) override
 
virtual size_t write (const uint8_t *buffer, size_t size) override
 
virtual size_t write (uint8_t) override
 
- Public Member Functions inherited from audio_tools::AudioStream
 AudioStream (AudioStream const &)=delete
 
virtual AudioBaseInfo audioInfo () override
 
virtual int availableForWrite () override
 
virtual bool begin ()
 
virtual void end ()
 
virtual void flush () override
 
 operator bool ()
 
AudioStreamoperator= (AudioStream const &)=delete
 
virtual size_t readBytes (char *buffer, size_t length)
 
virtual size_t readBytes (uint8_t *buffer, size_t length) STREAM_WRITE_OVERRIDE=0
 
virtual void setAudioInfo (AudioBaseInfo info) override
 
virtual void setNotifyAudioChange (AudioBaseInfoDependent &bi) override
 
virtual StreamtoStreamPointer ()
 
virtual size_t write (const uint8_t *buffer, size_t size) override=0
 
- Public Member Functions inherited from audio_tools::Stream
virtual int available ()
 
virtual int peek ()
 
virtual int read ()
 
virtual size_t readBytes (uint8_t *buffer, size_t len)
 
virtual void setTimeout (size_t t)
 
- Public Member Functions inherited from audio_tools::Print
virtual int availableForWrite ()
 
virtual void flush ()
 
virtual int print (char c, PrintCharFmt spec)
 
virtual int print (const char *msg)
 
virtual int print (int number)
 
virtual int println (const char *msg="")
 
virtual size_t write (const char *buffer, size_t size)
 
virtual size_t write (const char *str)
 
virtual size_t write (const uint8_t *buffer, size_t size)
 
virtual size_t write (uint8_t ch)
 
- Public Member Functions inherited from audio_tools::AudioBaseInfoDependent
virtual AudioBaseInfo audioInfo ()=0
 
virtual void setAudioInfo (AudioBaseInfo info)=0
 
virtual bool validate (AudioBaseInfo &info)
 
virtual void setNotifyAudioChange (AudioBaseInfoDependent &bi)=0
 

Protected Member Functions

void filterSamples (const uint8_t *data, size_t len)
 
float sample (EQSTATE &es, float sample)
 
float toFloat (int16_t v)
 convert float in the range -1 to 1 to a int16 and clip the values that are out of range
 
int16_t toInt16 (float v)
 convert float in the range -1 to 1 to a int16 and clip the values that are out of range
 
- Protected Member Functions inherited from audio_tools::AudioStream
virtual int not_supported (int out)
 

Protected Attributes

ConfigEquilizer3Bands cfg
 
int max_state_count =0
 
ConfigEquilizer3Bandsp_cfg =&cfg
 
AudioStreamp_in =nullptr
 
AudioPrintp_out =nullptr
 
Printp_print = nullptr
 
Streamp_stream = nullptr
 
struct audio_tools::Equilizer3Bands::EQSTATEstate =nullptr
 
const float vsa = (1.0 / 4294967295.0)
 
- Protected Attributes inherited from audio_tools::AudioStream
AudioBaseInfo info
 
AudioBaseInfoDependentp_notify =nullptr
 

Detailed Description

3 Band Equilizer inspired from https://www.musicdsp.org/en/latest/Filters/236-3-band-equaliser.html

Author
pschatzmann

Member Function Documentation

◆ available()

int audio_tools::Equilizer3Bands::available ( )
inlineoverridevirtual

Reimplemented from audio_tools::AudioStreamX.

◆ availableForWrite()

int audio_tools::Equilizer3Bands::availableForWrite ( )
inlineoverridevirtual

Reimplemented from audio_tools::AudioStream.

◆ readBytes()

size_t audio_tools::Equilizer3Bands::readBytes ( uint8_t *  data,
size_t  len 
)
inlineoverridevirtual

Provides the data from all streams mixed together.

Reimplemented from audio_tools::AudioStreamX.

◆ setAudioInfo()

virtual void audio_tools::Equilizer3Bands::setAudioInfo ( AudioBaseInfo  info)
inlineoverridevirtual

Reimplemented from audio_tools::AudioStream.

◆ write()

size_t audio_tools::Equilizer3Bands::write ( const uint8_t *  data,
size_t  len 
)
inlineoverridevirtual

Reimplemented from audio_tools::AudioStreamX.


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