arduino-audio-driver
Public Member Functions | Protected Attributes | List of all members
AudioBoard Class Reference

Defitintion for audio board pins and an audio driver. More...

#include <AudioBoard.h>

Public Member Functions

 AudioBoard (AudioDriver &driver, DriverPins &pins)
 
 AudioBoard (AudioDriver *driver, DriverPins *pins)
 
bool begin ()
 
bool begin (CodecConfig cfg)
 Starts the processing. More...
 
AudioDriverdriver ()
 
bool end (void)
 
AudioDrivergetDriver ()
 
DriverPinsgetPins ()
 
int getVolume ()
 
bool isKeyPressed (uint8_t key)
 
 operator bool ()
 
DriverPinspins ()
 
bool setConfig (CodecConfig cfg)
 Updates the CodecConfig values -> reconfigures the codec only. More...
 
bool setInputVolume (int volume)
 set volume for adc: this is only supported on some defined codecs More...
 
bool setMute (bool enable)
 
bool setMute (bool enable, int line)
 
bool setPAPower (bool enable)
 
bool setVolume (int volume)
 

Protected Attributes

CodecConfig codec_cfg
 
bool is_active = false
 
AudioDriverp_driver = nullptr
 
DriverPinsp_pins = nullptr
 
int power_amp_line = 1
 
int volume = -1
 

Detailed Description

Defitintion for audio board pins and an audio driver.

Author
Phil Schatzmann

Constructor & Destructor Documentation

◆ AudioBoard() [1/2]

AudioBoard ( AudioDriver driver,
DriverPins pins 
)
inline

◆ AudioBoard() [2/2]

AudioBoard ( AudioDriver driver,
DriverPins pins 
)
inline

Member Function Documentation

◆ begin() [1/2]

bool begin ( )
inline

◆ begin() [2/2]

bool begin ( CodecConfig  cfg)
inline

Starts the processing.

◆ driver()

AudioDriver& driver ( )
inline

◆ end()

bool end ( void  )
inline

◆ getDriver()

AudioDriver* getDriver ( )
inline

◆ getPins()

DriverPins& getPins ( )
inline

◆ getVolume()

int getVolume ( )
inline

◆ isKeyPressed()

bool isKeyPressed ( uint8_t  key)
inline

◆ operator bool()

operator bool ( )
inline

◆ pins()

DriverPins& pins ( )
inline

◆ setConfig()

bool setConfig ( CodecConfig  cfg)
inline

Updates the CodecConfig values -> reconfigures the codec only.

◆ setInputVolume()

bool setInputVolume ( int  volume)
inline

set volume for adc: this is only supported on some defined codecs

◆ setMute() [1/2]

bool setMute ( bool  enable)
inline

◆ setMute() [2/2]

bool setMute ( bool  enable,
int  line 
)
inline

◆ setPAPower()

bool setPAPower ( bool  enable)
inline

◆ setVolume()

bool setVolume ( int  volume)
inline

Member Data Documentation

◆ codec_cfg

CodecConfig codec_cfg
protected

◆ is_active

bool is_active = false
protected

◆ p_driver

AudioDriver* p_driver = nullptr
protected

◆ p_pins

DriverPins* p_pins = nullptr
protected

◆ power_amp_line

int power_amp_line = 1
protected

◆ volume

int volume = -1
protected

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