Functions | |
void | audio_mixer_close_direct (void) |
Close the audio_mixer. More... | |
bool | audio_mixer_create_buffers_direct (uint8_t nb_buffers, size_t buffer_size) |
Creates DAC buffers. More... | |
void | audio_mixer_dacs_decrease_volume_direct (void) |
Decreases the output volume of the DACs. More... | |
void | audio_mixer_dacs_flush_direct (bool force) |
Flushes the sample buffer being output to the DACs. More... | |
uint8_t | audio_mixer_dacs_get_volume_direct (void) |
Get the average volume of the DACs. The value returned is in the range 0; 255 where 255 corresponds to the highest volume. More... | |
void | audio_mixer_dacs_increase_volume_direct (void) |
Increases the output volume of the DACs. More... | |
bool | audio_mixer_dacs_input_direct (void *sample_buffer, size_t sample_length) |
Inputs a sample buffer from the ADCs. More... | |
bool | audio_mixer_dacs_is_volume_muted_direct (void) |
Checks if the volume is muted or un-muted. . More... | |
bool | audio_mixer_dacs_output_direct (void *sample_buffer, size_t sample_length) |
Outputs a sample buffer to the DACs. More... | |
void | audio_mixer_dacs_set_volume_direct (uint8_t volume) |
set the average volume of the DACs. More... | |
void | audio_mixer_dacs_setup_direct (uint32_t sample_rate_hz, uint8_t num_channels, uint8_t bits_per_sample, bool swap_channels) |
Sets the DACs up with new settings. More... | |
void | audio_mixer_dacs_start_direct (uint32_t sample_rate_hz, uint8_t num_channels, uint8_t bits_per_sample, bool swap_channels) |
Starts the DACs. More... | |
void | audio_mixer_dacs_stop_direct (void) |
Stops the DACs. More... | |
void | audio_mixer_disable_dacs_direct (uint32_t dacs_mask) |
Disables the handling of the specified DACs by the audio mixer. More... | |
void | audio_mixer_enable_dacs_direct (uint32_t dacs_mask) |
Enables the handling of the specified DACs by the audio mixer. More... | |
void * | audio_mixer_get_buffer_direct (size_t size) |
This functions returns a NULL pointer when no buffer are free, else returns a free temporary buffer. More... | |
void | audio_mixer_mute_audio_direct (bool mute) |
Mute Audio if True. More... | |
#define audio_mixer_close | ( | ... | ) | audio_mixer_close_direct(__VA_ARGS__) |
#define audio_mixer_create_buffers | ( | ... | ) | audio_mixer_create_buffers_direct(__VA_ARGS__) |
#define audio_mixer_dacs_decrease_volume | ( | ... | ) | audio_mixer_dacs_decrease_volume_direct(__VA_ARGS__) |
#define audio_mixer_dacs_flush | ( | ... | ) | audio_mixer_dacs_flush_direct(__VA_ARGS__) |
#define audio_mixer_dacs_get_volume | ( | ... | ) | audio_mixer_dacs_get_volume_direct(__VA_ARGS__) |
#define audio_mixer_dacs_increase_volume | ( | ... | ) | audio_mixer_dacs_increase_volume_direct(__VA_ARGS__) |
#define audio_mixer_dacs_input | ( | ... | ) | audio_mixer_dacs_input_direct(__VA_ARGS__) |
Referenced by adc_sample_sent_cb(), and device_audio_task().
#define audio_mixer_dacs_is_volume_muted | ( | ... | ) | audio_mixer_dacs_is_volume_muted_direct(__VA_ARGS__) |
#define audio_mixer_dacs_output | ( | ... | ) | audio_mixer_dacs_output_direct(__VA_ARGS__) |
Referenced by audio_mixer_get_buffer_direct().
#define audio_mixer_dacs_set_volume | ( | ... | ) | audio_mixer_dacs_set_volume_direct(__VA_ARGS__) |
#define audio_mixer_dacs_setup | ( | ... | ) | audio_mixer_dacs_setup_direct(__VA_ARGS__) |
#define audio_mixer_dacs_start | ( | ... | ) | audio_mixer_dacs_start_direct(__VA_ARGS__) |
Referenced by main().
#define audio_mixer_dacs_stop | ( | ... | ) | audio_mixer_dacs_stop_direct(__VA_ARGS__) |
#define audio_mixer_disable_dacs | ( | ... | ) | audio_mixer_disable_dacs_direct(__VA_ARGS__) |
#define audio_mixer_enable_dacs | ( | ... | ) | audio_mixer_enable_dacs_direct(__VA_ARGS__) |
Referenced by main().
#define audio_mixer_get_buffer | ( | ... | ) | audio_mixer_get_buffer_direct(__VA_ARGS__) |
#define audio_mixer_mute_audio | ( | ... | ) | audio_mixer_mute_audio_direct(__VA_ARGS__) |
Referenced by audio_speaker_set_mute().
void audio_mixer_close_direct | ( | void | ) |
Close the audio_mixer.
References audio_mixer_dacs_settings.
bool audio_mixer_create_buffers_direct | ( | uint8_t | nb_buffers, |
size_t | buffer_size | ||
) |
Creates DAC buffers.
References audio_mixer_dacs_settings, buffers, and nb_buffers.
void audio_mixer_dacs_decrease_volume_direct | ( | void | ) |
Decreases the output volume of the DACs.
References AUDIO_MIXER_CODEC_COUNT, AUDIO_MIXER_DACS, and audio_mixer_enabled_dacs_mask.
void audio_mixer_dacs_flush_direct | ( | bool | force | ) |
Flushes the sample buffer being output to the DACs.
force | Force flushing means do not wait until all samples have been played before flushing the DAC. |
References AUDIO_MIXER_CODEC_COUNT, AUDIO_MIXER_DACS, and audio_mixer_enabled_dacs_mask.
Referenced by audio_speaker_set_sample_freq(), player_shutdown(), and usb_stream_new_sample_rate().
uint8_t audio_mixer_dacs_get_volume_direct | ( | void | ) |
Get the average volume of the DACs.
The value returned is in the range 0; 255 where 255 corresponds to the highest volume.
References AUDIO_MIXER_CODEC_COUNT, AUDIO_MIXER_DACS, audio_mixer_enabled_dacs_mask, and volume.
void audio_mixer_dacs_increase_volume_direct | ( | void | ) |
Increases the output volume of the DACs.
References AUDIO_MIXER_CODEC_COUNT, AUDIO_MIXER_DACS, and audio_mixer_enabled_dacs_mask.
bool audio_mixer_dacs_input_direct | ( | void * | sample_buffer, |
size_t | sample_length | ||
) |
Inputs a sample buffer from the ADCs.
References AUDIO_MIXER_CODEC_COUNT, AUDIO_MIXER_DACS, audio_mixer_enabled_dacs_mask, and input.
bool audio_mixer_dacs_is_volume_muted_direct | ( | void | ) |
Checks if the volume is muted or un-muted.
.
References AUDIO_MIXER_CODEC_COUNT, AUDIO_MIXER_DACS, and audio_mixer_enabled_dacs_mask.
bool audio_mixer_dacs_output_direct | ( | void * | sample_buffer, |
size_t | sample_length | ||
) |
Outputs a sample buffer to the DACs.
References AUDIO_MIXER_CODEC_COUNT, AUDIO_MIXER_DACS, audio_mixer_enabled_dacs_mask, and output.
Referenced by dac_sample_sent_cb(), usb_stream_fifo_get_used_room(), and usb_stream_input().
void audio_mixer_dacs_set_volume_direct | ( | uint8_t | volume | ) |
set the average volume of the DACs.
References AUDIO_MIXER_CODEC_COUNT, AUDIO_MIXER_DACS, and audio_mixer_enabled_dacs_mask.
Referenced by audio_speaker_set_mute(), and audio_speaker_set_volume().
void audio_mixer_dacs_setup_direct | ( | uint32_t | sample_rate_hz, |
uint8_t | num_channels, | ||
uint8_t | bits_per_sample, | ||
bool | swap_channels | ||
) |
Sets the DACs up with new settings.
References AUDIO_ADC_OUT_OF_SAMPLE_CB, AUDIO_ADC_RELOAD_CB, AUDIO_DAC_OUT_OF_SAMPLE_CB, AUDIO_DAC_RELOAD_CB, AUDIO_MIXER_ADC_OUT_OF_SAMPLE, AUDIO_MIXER_ADC_RELOAD_CALLBACK, audio_mixer_callback(), AUDIO_MIXER_CODEC_COUNT, AUDIO_MIXER_DACS, audio_mixer_dacs_settings, audio_mixer_enabled_dacs_mask, AUDIO_MIXER_OUT_OF_SAMPLES_CALLBACK, AUDIO_MIXER_RELOAD_CALLBACK, bits_per_sample, FPBA_HZ, num_channels, sample_rate_hz, and swap_channels.
Referenced by usb_stream_init().
void audio_mixer_dacs_start_direct | ( | uint32_t | sample_rate_hz, |
uint8_t | num_channels, | ||
uint8_t | bits_per_sample, | ||
bool | swap_channels | ||
) |
Starts the DACs.
References AUDIO_ADC_OUT_OF_SAMPLE_CB, AUDIO_ADC_RELOAD_CB, AUDIO_DAC_OUT_OF_SAMPLE_CB, AUDIO_DAC_RELOAD_CB, AUDIO_MIXER_ADC_OUT_OF_SAMPLE, AUDIO_MIXER_ADC_RELOAD_CALLBACK, audio_mixer_callback(), AUDIO_MIXER_CODEC_COUNT, AUDIO_MIXER_DACS, audio_mixer_dacs_settings, audio_mixer_enabled_dacs_mask, AUDIO_MIXER_OUT_OF_SAMPLES_CALLBACK, AUDIO_MIXER_RELOAD_CALLBACK, bits_per_sample, FPBA_HZ, num_channels, sample_rate_hz, and swap_channels.
Referenced by audio_mixer_enable_dacs_direct().
void audio_mixer_dacs_stop_direct | ( | void | ) |
Stops the DACs.
References AUDIO_MIXER_CODEC_COUNT, AUDIO_MIXER_DACS, audio_mixer_dacs_settings, and audio_mixer_enabled_dacs_mask.
void audio_mixer_disable_dacs_direct | ( | uint32_t | dacs_mask | ) |
Disables the handling of the specified DACs by the audio mixer.
References AUDIO_MIXER_CODEC_COUNT, AUDIO_MIXER_DACS, audio_mixer_dacs_settings, and audio_mixer_enabled_dacs_mask.
void audio_mixer_enable_dacs_direct | ( | uint32_t | dacs_mask | ) |
Enables the handling of the specified DACs by the audio mixer.
References audio_mixer_dacs_settings, audio_mixer_dacs_start_direct(), and audio_mixer_enabled_dacs_mask.
void* audio_mixer_get_buffer_direct | ( | size_t | size | ) |
This functions returns a NULL pointer when no buffer are free, else returns a free temporary buffer.
References audio_mixer_dacs_output, and audio_mixer_dacs_settings.
void audio_mixer_mute_audio_direct | ( | bool | mute | ) |
Mute Audio if True.
mute | Set to true to mute the audio stream. Set to false otherwise. |
References AUDIO_MIXER_CODEC_COUNT, AUDIO_MIXER_DACS, and audio_mixer_enabled_dacs_mask.