Skip to content

Commit

Permalink
fix recursive call with software volume (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
kahrendt authored Sep 23, 2024
1 parent 13fd22d commit b74e4ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion esphome/components/nabu/nabu_media_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ void NabuMediaPlayer::set_mute_state_(bool mute_state) {
{ // Fall back to software mute control if there is no audio_dac or if it isn't configured
if (mute_state) {
this->software_volume_scale_factor_ = 0;
} else {
} else if (this->software_volume_scale_factor_ == 0) {
this->set_volume_(this->volume, false); // restore previous volume
}
}
Expand Down

0 comments on commit b74e4ed

Please sign in to comment.