Do not deafen people
This commit is contained in:
@@ -50,7 +50,7 @@ I2SAudioOutput::I2SAudioOutput(StreamBufferHandle_t s,
|
|||||||
current_mode_(Modes::kOff),
|
current_mode_(Modes::kOff),
|
||||||
current_config_(),
|
current_config_(),
|
||||||
left_difference_(0),
|
left_difference_(0),
|
||||||
current_volume_(0),
|
current_volume_(kDefaultVolume),
|
||||||
max_volume_(0) {}
|
max_volume_(0) {}
|
||||||
|
|
||||||
I2SAudioOutput::~I2SAudioOutput() {
|
I2SAudioOutput::~I2SAudioOutput() {
|
||||||
@@ -71,6 +71,7 @@ auto I2SAudioOutput::SetMode(Modes mode) -> void {
|
|||||||
if (!instance) {
|
if (!instance) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
SetVolume(GetVolume());
|
||||||
dac_.reset(*instance);
|
dac_.reset(*instance);
|
||||||
dac_->SetSource(stream());
|
dac_->SetSource(stream());
|
||||||
dac_->Start();
|
dac_->Start();
|
||||||
|
|||||||
Reference in New Issue
Block a user