Commit 0e644ebb authored by Thomas Guillem's avatar Thomas Guillem

aout: add current_sink_info struct

This new struct can be filled from the start() function of aout modules.
It contains (for now) only one member: the headphones state.
parent d6ea2721
......@@ -168,6 +168,13 @@ struct audio_output
* \return 0 on success, non-zero on failure.
* \warning A stream may or may not have been started when called.
*/
struct {
bool headphones; /**< Default to false, set it to true if the current
sink is using headphones */
} current_sink_info;
/**< Current sink informations set by the module from the start() function */
struct {
void (*volume_report)(audio_output_t *, float);
void (*mute_report)(audio_output_t *, bool);
......
......@@ -537,6 +537,8 @@ int aout_OutputNew (audio_output_t *aout, audio_sample_format_t *restrict fmt,
aout_FormatPrepare (fmt);
}
aout->current_sink_info.headphones = false;
if (aout->start (aout, fmt))
{
msg_Err (aout, "module not functional");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment