Skip to content

Commit

Permalink
Fix audio glitches on input change / stby exit
Browse files Browse the repository at this point in the history
  • Loading branch information
WiseLord committed Nov 19, 2023
1 parent 1a33e99 commit 26d90e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/amp_main.c
Expand Up @@ -331,8 +331,10 @@ static void ampMute(bool value)
if (value) {
swTimSet(SW_TIM_SOFT_VOLUME, SW_TIM_OFF);
} else {
audioSetTune(AUDIO_TUNE_VOLUME, grid->min);
swTimSet(SW_TIM_SOFT_VOLUME, SW_TIM_ON);
if (aProc->par.ic != AUDIO_IC_RELAY) {
audioSetTune(AUDIO_TUNE_VOLUME, grid->min);
swTimSet(SW_TIM_SOFT_VOLUME, SW_TIM_ON);
}
}

ampPinMute(value);
Expand Down
6 changes: 4 additions & 2 deletions src/audio/audio.c
Expand Up @@ -181,8 +181,10 @@ void audioSetPower(bool value)
audioSetFlag(AUDIO_FLAG_EFFECT3D, (aProc.par.flags & AUDIO_FLAG_EFFECT3D));
audioSetFlag(AUDIO_FLAG_BYPASS, (aProc.par.flags & AUDIO_FLAG_BYPASS));

for (AudioTune tune = AUDIO_TUNE_VOLUME; tune < AUDIO_TUNE_END; tune++) {
audioSetTune(tune, aProc.par.tune[tune]);
if (aProc.par.ic != AUDIO_IC_RELAY) {
for (AudioTune tune = AUDIO_TUNE_VOLUME; tune < AUDIO_TUNE_END; tune++) {
audioSetTune(tune, aProc.par.tune[tune]);
}
}
}

Expand Down

0 comments on commit 26d90e2

Please sign in to comment.