Commit a62d119a authored by Rafaël Carré's avatar Rafaël Carré

opensles: do not set volume if aout start failed

Close: #8579
parent 01b0eaf8
......@@ -202,6 +202,9 @@ static void Flush(audio_output_t *aout, bool drain)
static int VolumeSet(audio_output_t *aout, float vol)
{
if (!aout->sys->volumeItf)
return -1;
/* Convert UI volume to linear factor (cube) */
vol = vol * vol * vol;
......@@ -218,6 +221,9 @@ static int VolumeSet(audio_output_t *aout, float vol)
static int MuteSet(audio_output_t *aout, bool mute)
{
if (!aout->sys->volumeItf)
return -1;
SLresult r = SetMute(aout->sys->volumeItf, mute);
return (r == SL_RESULT_SUCCESS) ? 0 : -1;
}
......
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