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

I2S configuration and definition of input and output with default values. More...

#include <Driver.h>

Inheritance diagram for CodecConfig:
codec_config_t

Public Member Functions

 CodecConfig ()
 setup default values More...
 
bool equalsExRate (CodecConfig alt)
 Compare all attributes but ignore sample rate. More...
 
codec_mode_t get_mode ()
 Determines the codec_mode_t dynamically based on the input and output. More...
 
int getBitsNumeric ()
 Returns bits per sample as number. More...
 
int getChannelsNumeric ()
 Returns the number of channels as number. More...
 
int getRateNumeric ()
 Get the sample rate as number. More...
 
bool setBitsNumeric (int bits)
 Sets the bits per sample with a numeric value. More...
 
bool setChannelsNumeric (int channels)
 Defines the number of channels. More...
 
int setRateNumeric (int requestedRate)
 Sets the sample rate as number: returns the effectively set rate. More...
 

Public Attributes

I2SDefinition i2s
 
input_device_t input_device
 
output_device_t output_device
 
bool sd_active = true
 

Detailed Description

I2S configuration and definition of input and output with default values.

Author
Phil Schatzmann

Constructor & Destructor Documentation

◆ CodecConfig()

CodecConfig ( )
inline

setup default values

Member Function Documentation

◆ equalsExRate()

bool equalsExRate ( CodecConfig  alt)
inline

Compare all attributes but ignore sample rate.

◆ get_mode()

codec_mode_t get_mode ( )
inline

Determines the codec_mode_t dynamically based on the input and output.

◆ getBitsNumeric()

int getBitsNumeric ( )
inline

Returns bits per sample as number.

◆ getChannelsNumeric()

int getChannelsNumeric ( )
inline

Returns the number of channels as number.

◆ getRateNumeric()

int getRateNumeric ( )
inline

Get the sample rate as number.

◆ setBitsNumeric()

bool setBitsNumeric ( int  bits)
inline

Sets the bits per sample with a numeric value.

◆ setChannelsNumeric()

bool setChannelsNumeric ( int  channels)
inline

Defines the number of channels.

◆ setRateNumeric()

int setRateNumeric ( int  requestedRate)
inline

Sets the sample rate as number: returns the effectively set rate.

Member Data Documentation

◆ i2s

I2SDefinition i2s
inherited

set I2S interface configuration

◆ input_device

input_device_t input_device
inherited

set adc channel

◆ output_device

output_device_t output_device
inherited

set dac channel

◆ sd_active

bool sd_active = true

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