Merge "CSD: Adjust code to new MelCallback interface" into main

This commit is contained in:
Vlad Popa 2024-01-09 17:17:32 +00:00 committed by Android (Google) Code Review
commit e32ffaec3b
2 changed files with 3 additions and 2 deletions

View file

@ -119,7 +119,8 @@ void SoundDose::onNewMelValues(const std::vector<float>& mels, size_t offset, si
void SoundDose::MelCallback::onNewMelValues(const std::vector<float>& mels, size_t offset, void SoundDose::MelCallback::onNewMelValues(const std::vector<float>& mels, size_t offset,
size_t length, size_t length,
audio_port_handle_t deviceId audio_port_handle_t deviceId
__attribute__((__unused__))) const { __attribute__((__unused__)),
bool attenuated __attribute__((__unused__))) const {
mSoundDose.onNewMelValues(mels, offset, length, deviceId); mSoundDose.onNewMelValues(mels, offset, length, deviceId);
} }

View file

@ -64,7 +64,7 @@ class SoundDose final : public BnSoundDose, public StreamDataProcessorInterface
// ------------------------------------ MelCallback ---------------------------------------- // ------------------------------------ MelCallback ----------------------------------------
void onNewMelValues(const std::vector<float>& mels, size_t offset, size_t length, void onNewMelValues(const std::vector<float>& mels, size_t offset, size_t length,
audio_port_handle_t deviceId) const override; audio_port_handle_t deviceId, bool attenuated) const override;
void onMomentaryExposure(float currentMel, audio_port_handle_t deviceId) const override; void onMomentaryExposure(float currentMel, audio_port_handle_t deviceId) const override;
SoundDose& mSoundDose; // must outlive MelCallback, not owning SoundDose& mSoundDose; // must outlive MelCallback, not owning