]>
git.ipfire.org Git - thirdparty/shairport-sync.git/blob - audio.h
8 double current_volume_dB
;
9 int32_t minimum_volume_dB
;
10 int32_t maximum_volume_dB
;
18 int (*init
)(int argc
, char **argv
);
22 void (*start
)(int sample_rate
, int sample_format
);
25 int (*play
)(void *buf
, int samples
);
28 // may be null if no implemented
29 int (*is_running
)(void); // if implemented, will return 0 if everything is okay, non-zero otherwise
31 // may be null if not implemented
34 // returns the delay before the next frame to be sent to the device would actually be audible.
35 // almost certainly wrong if the buffer is empty, so put silent buffers into it to make it busy.
36 // will change dynamically, so keep watching it. Implemented in ALSA only.
37 // returns a negative error code if there's a problem
38 int (*delay
)(long *the_delay
); // snd_pcm_sframes_t is a signed long
39 int (*rate_info
)(uint64_t *elapsed_time
,
40 uint64_t *frames_played
); // use this to get the true rate of the DAC
42 // may be NULL, in which case soft volume is applied
43 void (*volume
)(double vol
);
45 // may be NULL, in which case soft volume parameters are used
46 void (*parameters
)(audio_parameters
*info
);
48 // may be NULL, in which case software muting is used.
49 void (*mute
)(int do_mute
);
53 audio_output
*audio_get_output(char *name
);
54 void audio_ls_outputs(void);
55 void parse_general_audio_options(void);