| Top |
| bool | alsa_has_exclusive_access () |
| struct alsa * | alsa_init () |
| int | alsa_open_output () |
| void | alsa_close_output () |
| bool | alsa_test_output_configuration () |
| void | alsa_configure_output () |
| void | alsa_register_output_callback () |
| int | alsa_run () |
int alsa_open_output (struct alsa *alsa,const char *device_name);
Open ALSA output devices whose name prefixes match the provided name prefix.
bool alsa_test_output_configuration (struct alsa *alsa,snd_pcm_format_t dmt,int channels,int sampling_rate);
Test the output configuration specified by channels
and sampling_rate
for the output devices.
void alsa_configure_output (struct alsa *alsa,snd_pcm_format_t fmt,int channels,int sampling_rate);
Configure the output devices with the configuration specified by channels
and sampling_rate
.
void alsa_register_output_callback (struct alsa *alsa,int (*callback) (void *data, void *buffer, int samples),void *callback_data,int samples_trigger);
Register a callback function to be called to fill output data during a run.
The callback is called when samples_trigger
samples are required.
The callback should return an integer equal to zero for success and negative for failure.
int alsa_run (struct alsa *alsa,int duration_ms);
Run ALSA playback and capture on the input and output devices for at
most duration_ms
milliseconds, calling the registered callbacks when needed.