mirror of
https://github.com/esphome/esphome.git
synced 2026-06-02 03:02:19 +08:00
[i2s_audio] Fix stereo playback when slot bit width exceeds data bit width (#16248)
This commit is contained in:
@@ -280,6 +280,9 @@ esp_err_t I2SAudioSpeaker::start_i2s_driver(audio::AudioStreamInfo &audio_stream
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
slot_cfg.slot_bit_width = this->slot_bit_width_;
|
slot_cfg.slot_bit_width = this->slot_bit_width_;
|
||||||
|
if (this->slot_bit_width_ != I2S_SLOT_BIT_WIDTH_AUTO) {
|
||||||
|
slot_cfg.ws_width = static_cast<uint32_t>(this->slot_bit_width_);
|
||||||
|
}
|
||||||
#endif // USE_ESP32_VARIANT_ESP32
|
#endif // USE_ESP32_VARIANT_ESP32
|
||||||
slot_cfg.slot_mask = slot_mask;
|
slot_cfg.slot_mask = slot_mask;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user