Add PlayoutVolumeChange RuntimeSetting.
Add a PlayoutVolumeChange RuntimeSetting. Trigger an echo path change when the playout volume is changed. Bug: webrtc:10608 Change-Id: I1e736b93c1865d08c7d2582f6fe00216c1e1f72e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135746 Reviewed-by: Per Åhgren <peah@webrtc.org> Reviewed-by: Fredrik Hernqvist <fhernqvist@webrtc.org> Commit-Queue: Fredrik Hernqvist <fhernqvist@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27913}
This commit is contained in:

committed by
Commit Bot

parent
eb9bf411f3
commit
ca362855e1
@ -392,6 +392,7 @@ class AudioProcessing : public rtc::RefCountInterface {
|
||||
kCapturePreGain,
|
||||
kCaptureCompressionGain,
|
||||
kCaptureFixedPostGain,
|
||||
kPlayoutVolumeChange,
|
||||
kCustomRenderProcessingRuntimeSetting
|
||||
};
|
||||
|
||||
@ -419,6 +420,10 @@ class AudioProcessing : public rtc::RefCountInterface {
|
||||
return {Type::kCaptureFixedPostGain, gain_db};
|
||||
}
|
||||
|
||||
static RuntimeSetting CreatePlayoutVolumeChange(int volume) {
|
||||
return {Type::kPlayoutVolumeChange, volume};
|
||||
}
|
||||
|
||||
static RuntimeSetting CreateCustomRenderSetting(float payload) {
|
||||
return {Type::kCustomRenderProcessingRuntimeSetting, payload};
|
||||
}
|
||||
@ -426,13 +431,24 @@ class AudioProcessing : public rtc::RefCountInterface {
|
||||
Type type() const { return type_; }
|
||||
void GetFloat(float* value) const {
|
||||
RTC_DCHECK(value);
|
||||
*value = value_;
|
||||
*value = value_.float_value;
|
||||
}
|
||||
void GetInt(int* value) const {
|
||||
RTC_DCHECK(value);
|
||||
*value = value_.int_value;
|
||||
}
|
||||
|
||||
private:
|
||||
RuntimeSetting(Type id, float value) : type_(id), value_(value) {}
|
||||
RuntimeSetting(Type id, int value) : type_(id), value_(value) {}
|
||||
Type type_;
|
||||
float value_;
|
||||
union U {
|
||||
U() {}
|
||||
U(int value) : int_value(value) {}
|
||||
U(float value) : float_value(value) {}
|
||||
float float_value;
|
||||
int int_value;
|
||||
} value_;
|
||||
};
|
||||
|
||||
~AudioProcessing() override {}
|
||||
|
Reference in New Issue
Block a user