#include <stdint.h>
#include "audio.h"
Go to the source code of this file.
Functions | |
int32_t | audio_loopback_start (te_audio_device_types device_type, const char *device_name, uint32_t segment_size, int32_t sample_frequency) |
int32_t | audio_loopback_stop (void) |
void | audio_loopback_feed (const double *src) |
void audio_loopback_feed | ( | const double * | src | ) |
Used to copy audio data (sound) to the loopback device
src | Pointer to the source audio data (usually filtered). |
Definition at line 121 of file audio_loopback.c.
References AUDIO_BUFFER_SEGMENTS, audio_loopback_ts::audio_data, BUFFER_SEGMENT_1, audio_loopback_ts::dst_samples, and write_segment_cond.
int32_t audio_loopback_start | ( | te_audio_device_types | device_type, | |
const char * | device_name, | |||
uint32_t | segment_size, | |||
int32_t | sample_frequency | |||
) |
Starts the audio loopback device.
device_type | Audio device type | |
device_name | Audio device name | |
segment_size | Number of samples per segment | |
sample_frequency | Sample frequency in Hertz |
Definition at line 82 of file audio_loopback.c.
References AUDIO_BUFFER_SEGMENTS, audio_create(), audio_loopback_ts::audio_data, audio_loopback_ts::audio_device, AUDIO_DEVICE_PLAY, audio_device_samples_get(), audio_init(), audio_loopback_convert_thr(), AUDIO_LOOPBACK_RUN, audio_loopback_thr(), audio_open(), audio_loopback_ts::convert_id, audio_loopback_ts::dst_samples, loopback_trigger, audio_loopback_ts::play_id, audio_loopback_ts::run, and audio_loopback_ts::src_samples.
int32_t audio_loopback_stop | ( | void | ) |
Stop and frees the audio loopback device
Definition at line 110 of file audio_loopback.c.
References audio_loopback_ts::audio_data, audio_destroy(), audio_loopback_ts::audio_device, AUDIO_LOOPBACK_STOP, audio_loopback_ts::convert_id, audio_loopback_ts::play_id, and audio_loopback_ts::run.