]>
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 (*preflight
)(void *buf
,
26 int samples
); // say you are about to send these samples (before interpolation)
27 int (*play
)(void *buf
, int samples
);
30 // may be null if no implemented
32 void); // if implemented, will return 0 if everything is okay, non-zero otherwise
34 // may be null if not implemented
37 // returns the delay before the next frame to be sent to the device would actually be audible.
38 // almost certainly wrong if the buffer is empty, so put silent buffers into it to make it busy.
39 // will change dynamically, so keep watching it. Implemented in ALSA only.
40 // returns a negative error code if there's a problem
41 int (*delay
)(long *the_delay
); // snd_pcm_sframes_t is a signed long
42 int (*rate_info
)(uint64_t *elapsed_time
,
43 uint64_t *frames_played
); // use this to get the true rate of the DAC
45 // may be NULL, in which case soft volume is applied
46 void (*volume
)(double vol
);
48 // may be NULL, in which case soft volume parameters are used
49 void (*parameters
)(audio_parameters
*info
);
51 // may be NULL, in which case software muting is used.
52 void (*mute
)(int do_mute
);
56 audio_output
*audio_get_output(char *name
);
57 void audio_ls_outputs(void);
58 void parse_general_audio_options(void);