fixes #60 (make sure volume setting is restored after tx)

This commit is contained in:
tarxvf 2021-12-05 07:06:52 -05:00 committed by Niccolò Izzo
parent a5ccda9923
commit e7c98aa71f
1 changed files with 2 additions and 9 deletions

View File

@ -53,15 +53,8 @@ void _setVolume()
else else
{ {
audio_enableAmp(); audio_enableAmp();
// Setting HR_C6000 volume to 0 = max volume
// Update HR_C6000 gain only if volume changed HR_C6000::instance().setDacGain(volume);
static uint8_t old_volume = 0;
if(volume != old_volume)
{
// Setting HR_C6000 volume to 0 = max volume
HR_C6000::instance().setDacGain(volume);
old_volume = volume;
}
} }
} }
#endif #endif