First publishment of Shimabara Audio Codec Controller library. Including code for ADAU1361 and UMB-ADAU1361A. Working pretty fine. Checked with LPCXpresso 4337 and Unzen_lpc4337
Dependents: unzen_sample_LPC4088_quickstart unzen_sample_lpcxpresso_4337_callbacks unzen_sample_nucleo_f746 unzen_delay_sample_nucleo_f746 ... more
BaseAudioCodec Class Reference
abstract audio codec controller. More...
#include <baseaudiocodec.h>
Inherited by Adau1361.
Public Member Functions | |
BaseAudioCodec (Fs_Type Fs) | |
constructor. | |
virtual void | start (void)=0 |
Actual initializer. | |
virtual void | set_line_input_gain (float left_gain, float right_gain, bool mute=false) |
Set the line input gain and enable the relevant mixer. | |
virtual void | set_aux_input_gain (float left_gain, float right_gain, bool mute=false) |
Set the aux input gain and enable the relevant mixer. | |
virtual void | set_mic_input_gain (float left_gain, float right_gain, bool mute=false) |
Set the mic input gain and enable the relevant mixer. | |
virtual void | set_line_output_gain (float left_gain, float right_gain, bool mute=false) |
Set the line output gain and enable the relevant mixer. | |
virtual void | set_hp_output_gain (float left_gain, float right_gain, bool mute=false) |
Set the headphone output gain and enable the relevant mixer. |
Detailed Description
abstract audio codec controller.
This class is template for all codec classes
Definition at line 36 of file baseaudiocodec.h.
Constructor & Destructor Documentation
BaseAudioCodec | ( | Fs_Type | Fs ) |
constructor.
- Parameters:
-
Fs Sampling frequency. Addr I2C device address. value range is from 0 to 127
initialize the internal variables.
Definition at line 7 of file baseaudiocodec.cpp.
Member Function Documentation
void set_aux_input_gain | ( | float | left_gain, |
float | right_gain, | ||
bool | mute = false |
||
) | [virtual] |
Set the aux input gain and enable the relevant mixer.
- Parameters:
-
left_gain Gain by dB. The gain value outside of the acceptable range will be saturated. right_gain Gain by dB. The gain value outside of the acceptable range will be saturated. mute set true to mute
Reimplemented in Adau1361.
Definition at line 16 of file baseaudiocodec.cpp.
void set_hp_output_gain | ( | float | left_gain, |
float | right_gain, | ||
bool | mute = false |
||
) | [virtual] |
Set the headphone output gain and enable the relevant mixer.
- Parameters:
-
left_gain Gain by dB. The gain value outside of the acceptable range will be saturated. right_gain Gain by dB. The gain value outside of the acceptable range will be saturated. mute set true to mute
Reimplemented in Adau1361.
Definition at line 28 of file baseaudiocodec.cpp.
void set_line_input_gain | ( | float | left_gain, |
float | right_gain, | ||
bool | mute = false |
||
) | [virtual] |
Set the line input gain and enable the relevant mixer.
- Parameters:
-
left_gain Gain by dB. The gain value outside of the acceptable range will be saturated. right_gain Gain by dB. The gain value outside of the acceptable range will be saturated. mute set true to mute
Reimplemented in Adau1361.
Definition at line 12 of file baseaudiocodec.cpp.
void set_line_output_gain | ( | float | left_gain, |
float | right_gain, | ||
bool | mute = false |
||
) | [virtual] |
Set the line output gain and enable the relevant mixer.
- Parameters:
-
left_gain Gain by dB. The gain value outside of the acceptable range will be saturated. right_gain Gain by dB. The gain value outside of the acceptable range will be saturated. mute set true to mute
Reimplemented in Adau1361.
Definition at line 24 of file baseaudiocodec.cpp.
void set_mic_input_gain | ( | float | left_gain, |
float | right_gain, | ||
bool | mute = false |
||
) | [virtual] |
Set the mic input gain and enable the relevant mixer.
- Parameters:
-
left_gain Gain by dB. The gain value outside of the acceptable range will be saturated. right_gain Gain by dB. The gain value outside of the acceptable range will be saturated. mute set true to mute
Definition at line 20 of file baseaudiocodec.cpp.
virtual void start | ( | void | ) | [pure virtual] |
Actual initializer.
Initialize the codec itself and start the conversion process. and configure for given parameter.
Finally, set the input gain to 0dB.
Implemented in Adau1361.
Generated on Tue Jul 12 2022 15:39:04 by 1.7.2