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=NoPins)
 
 AudioBoard (AudioDriver *driver, DriverPins *pins=&NoPins)
 
bool begin ()
 
bool begin (CodecConfig cfg)
 Starts the processing. More...
 
bool end (void)
 
AudioDrivergetDriver ()
 
DriverPinsgetPins ()
 
int getVolume ()
 
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
 
AudioDriverdriver = nullptr
 
DriverPinspins
 
int power_amp_line = 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 = &NoPins 
)
inline

◆ AudioBoard() [2/2]

AudioBoard ( AudioDriver driver,
DriverPins pins = NoPins 
)
inline

Member Function Documentation

◆ begin() [1/2]

bool begin ( )
inline

◆ begin() [2/2]

bool begin ( CodecConfig  cfg)
inline

Starts the processing.

◆ end()

bool end ( void  )
inline

◆ getDriver()

AudioDriver* getDriver ( )
inline

◆ getPins()

DriverPins& getPins ( )
inline

◆ getVolume()

int getVolume ( )
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

◆ driver

AudioDriver* driver = nullptr
protected

◆ pins

DriverPins* pins
protected

◆ power_amp_line

int power_amp_line = 1
protected

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