arduino-audio-driver
Loading...
Searching...
No Matches
AudioBoard Class Reference

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

#include <AudioBoard.h>

Public Member Functions

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

Protected Attributes

CodecConfig codec_cfg
bool is_active = false
AudioDriver * p_driver = nullptr
DriverDeviceInfo * p_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,
DriverDeviceInfo * pins )
inline

◆ AudioBoard() [2/2]

AudioBoard ( AudioDriver & driver,
DriverDeviceInfo & 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()

DriverDeviceInfo & getPins ( )
inline

◆ getVolume()

int getVolume ( )
inline

◆ isKeyPressed()

bool isKeyPressed ( uint8_t key)
inline

◆ operator bool()

operator bool ( )
inline

◆ pins()

DriverDeviceInfo & pins ( )
inline

◆ setConfig()

bool setConfig ( CodecConfig cfg)
inline

Updates the CodecConfig values -> reconfigures the codec only.

◆ setDriver()

void setDriver ( AudioDriver & driver)
inline

◆ 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

◆ setPins()

void setPins ( DriverDeviceInfo & pins)
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

DriverDeviceInfo* 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: