68 printf(
"Available audio playback devices:\n");
77 gettimeofday(&s->
t0, NULL);
80 if (s->
funcs == NULL) {
85 strncpy(s->
name, device,
sizeof s->
name - 1);
125 gettimeofday(&t1, NULL);
141 if (strcasecmp(s->
name,
"embedded") == 0) {
143 }
else if (strcasecmp(s->
name,
"AESEBU") == 0) {
145 }
else if (strcasecmp(s->
name,
"analog") == 0) {
struct video_frame * frame
This file contains definition of some common audio types.
bool audio_playback_ctl(struct state_audio_playback *s, int request, void *data, size_t *len)
void * audio_playback_get_state_pointer(struct state_audio_playback *s)
unsigned int audio_playback_get_display_flags(struct state_audio_playback *s)
bool audio_playback_reconfigure(struct state_audio_playback *s, int quant_samples, int channels, int sample_rate)
int audio_playback_init(const char *device, const char *cfg, struct state_audio_playback **state)
struct state_audio_playback * audio_playback_init_null_device(void)
void audio_playback_put_frame(struct state_audio_playback *s, const struct audio_frame *frame)
void audio_playback_help(bool full)
void audio_playback_done(struct state_audio_playback *s)
#define AUDIO_PLAYBACK_ABI_VERSION
void log_msg(int level, const char *format,...)
#define LOG_LEVEL_INFO
normal reporting
#define LOG_LEVEL_ERROR
general errors
#define DISPLAY_FLAG_AUDIO_ANALOG
#define DISPLAY_FLAG_AUDIO_AESEBU
#define DISPLAY_FLAG_AUDIO_EMBEDDED
void list_modules(enum library_class cls, int abi_version, bool full)
const void * load_library(const char *name, enum library_class cls, int abi_version)
@ LIBRARY_CLASS_AUDIO_PLAYBACK
struct used to comunicate with audio capture/playback device
bool(* reconfigure)(void *state, struct audio_desc)
void *(* init)(const char *cfg)
void(* done)(void *state)
void(* write)(void *state, const struct audio_frame *frame)
bool(* ctl)(void *state, int request, void *data, size_t *len)
const struct audio_playback_info * funcs
long long int samples_played
double tv_diff(struct timeval curr_time, struct timeval prev_time)