mirror of
https://github.com/esphome/esphome.git
synced 2026-10-07 19:44:08 +00:00
[microphone] Move bits_per_sample_ to the end of MicrophoneSource (#20146)
This commit is contained in:
@@ -34,7 +34,7 @@ class MicrophoneSource final {
|
||||
*/
|
||||
public:
|
||||
MicrophoneSource(Microphone *mic, uint8_t bits_per_sample, int32_t gain_factor, bool passive)
|
||||
: mic_(mic), bits_per_sample_(bits_per_sample), gain_factor_(gain_factor), passive_(passive) {}
|
||||
: mic_(mic), gain_factor_(gain_factor), passive_(passive), bits_per_sample_(bits_per_sample) {}
|
||||
|
||||
/// @brief Enables a channel to be processed through the callback.
|
||||
///
|
||||
@@ -81,11 +81,11 @@ class MicrophoneSource final {
|
||||
std::shared_ptr<std::vector<uint8_t>> processed_samples_;
|
||||
|
||||
Microphone *mic_;
|
||||
uint8_t bits_per_sample_;
|
||||
std::bitset<8> channels_;
|
||||
int32_t gain_factor_;
|
||||
bool enabled_{false};
|
||||
bool passive_; // Only pass audio if ``mic_`` is already running
|
||||
uint8_t bits_per_sample_;
|
||||
};
|
||||
|
||||
} // namespace esphome::microphone
|
||||
|
||||
Reference in New Issue
Block a user