Remove more traces of keyboard mic support from APM
The 6-parameter Initialize method is removed. The has_keyboard parameter in the StreamConfig constructor is removed together with the underlying member and helper functions. Bug: chromium:1271981, b/217349489 Change-Id: I7259a114a395f74f735a9c06510c0fc0f0f008e3 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250221 Reviewed-by: Sam Zackrisson <saza@google.com> Reviewed-by: Sam Zackrisson <saza@webrtc.org> Auto-Submit: Henrik Lundin <henrik.lundin@webrtc.org> Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org> Cr-Commit-Position: refs/heads/main@{#35908}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
bb57e2d7aa
commit
64253a93dc
@ -530,16 +530,6 @@ class RTC_EXPORT AudioProcessing : public rtc::RefCountInterface {
|
||||
// number of channels as the input.
|
||||
virtual int Initialize(const ProcessingConfig& processing_config) = 0;
|
||||
|
||||
// Initialize with unpacked parameters. See Initialize() above for details.
|
||||
//
|
||||
// TODO(mgraczyk): Remove once clients are updated to use the new interface.
|
||||
virtual int Initialize(int capture_input_sample_rate_hz,
|
||||
int capture_output_sample_rate_hz,
|
||||
int render_sample_rate_hz,
|
||||
ChannelLayout capture_input_layout,
|
||||
ChannelLayout capture_output_layout,
|
||||
ChannelLayout render_input_layout) = 0;
|
||||
|
||||
// TODO(peah): This method is a temporary solution used to take control
|
||||
// over the parameters in the audio processing module and is likely to change.
|
||||
virtual void ApplyConfig(const Config& config) = 0;
|
||||
@ -797,23 +787,11 @@ class RTC_EXPORT AudioProcessingBuilder {
|
||||
class StreamConfig {
|
||||
public:
|
||||
// sample_rate_hz: The sampling rate of the stream.
|
||||
//
|
||||
// num_channels: The number of audio channels in the stream, excluding the
|
||||
// keyboard channel if it is present. When passing a
|
||||
// StreamConfig with an array of arrays T*[N],
|
||||
//
|
||||
// N == {num_channels + 1 if has_keyboard
|
||||
// {num_channels if !has_keyboard
|
||||
//
|
||||
// has_keyboard: True if the stream has a keyboard channel. When has_keyboard
|
||||
// is true, the last channel in any corresponding list of
|
||||
// channels is the keyboard channel.
|
||||
// num_channels: The number of audio channels in the stream.
|
||||
StreamConfig(int sample_rate_hz = 0,
|
||||
size_t num_channels = 0,
|
||||
bool has_keyboard = false)
|
||||
size_t num_channels = 0)
|
||||
: sample_rate_hz_(sample_rate_hz),
|
||||
num_channels_(num_channels),
|
||||
has_keyboard_(has_keyboard),
|
||||
num_frames_(calculate_frames(sample_rate_hz)) {}
|
||||
|
||||
void set_sample_rate_hz(int value) {
|
||||
@ -821,22 +799,18 @@ class StreamConfig {
|
||||
num_frames_ = calculate_frames(value);
|
||||
}
|
||||
void set_num_channels(size_t value) { num_channels_ = value; }
|
||||
void set_has_keyboard(bool value) { has_keyboard_ = value; }
|
||||
|
||||
int sample_rate_hz() const { return sample_rate_hz_; }
|
||||
|
||||
// The number of channels in the stream, not including the keyboard channel if
|
||||
// present.
|
||||
// The number of channels in the stream.
|
||||
size_t num_channels() const { return num_channels_; }
|
||||
|
||||
bool has_keyboard() const { return has_keyboard_; }
|
||||
size_t num_frames() const { return num_frames_; }
|
||||
size_t num_samples() const { return num_channels_ * num_frames_; }
|
||||
|
||||
bool operator==(const StreamConfig& other) const {
|
||||
return sample_rate_hz_ == other.sample_rate_hz_ &&
|
||||
num_channels_ == other.num_channels_ &&
|
||||
has_keyboard_ == other.has_keyboard_;
|
||||
num_channels_ == other.num_channels_;
|
||||
}
|
||||
|
||||
bool operator!=(const StreamConfig& other) const { return !(*this == other); }
|
||||
@ -849,7 +823,6 @@ class StreamConfig {
|
||||
|
||||
int sample_rate_hz_;
|
||||
size_t num_channels_;
|
||||
bool has_keyboard_;
|
||||
size_t num_frames_;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user