Removed unused API functions in AudioProcessing and AudioProcessingModule
BUG= Review URL: https://codereview.webrtc.org/1379123002 Cr-Commit-Position: refs/heads/master@{#10138}
This commit is contained in:
parent
5629a1dba2
commit
5aaa9b4fe4
@ -118,16 +118,12 @@ class FakeAudioProcessing : public webrtc::AudioProcessing {
|
||||
experimental_ns_enabled_ = config.Get<webrtc::ExperimentalNs>().enabled;
|
||||
}
|
||||
|
||||
WEBRTC_STUB(set_sample_rate_hz, (int rate));
|
||||
WEBRTC_STUB_CONST(input_sample_rate_hz, ());
|
||||
WEBRTC_STUB_CONST(sample_rate_hz, ());
|
||||
WEBRTC_STUB_CONST(proc_sample_rate_hz, ());
|
||||
WEBRTC_STUB_CONST(proc_split_sample_rate_hz, ());
|
||||
WEBRTC_STUB_CONST(num_input_channels, ());
|
||||
WEBRTC_STUB_CONST(num_output_channels, ());
|
||||
WEBRTC_STUB_CONST(num_reverse_channels, ());
|
||||
WEBRTC_VOID_STUB(set_output_will_be_muted, (bool muted));
|
||||
WEBRTC_BOOL_STUB_CONST(output_will_be_muted, ());
|
||||
WEBRTC_STUB(ProcessStream, (webrtc::AudioFrame* frame));
|
||||
WEBRTC_STUB(ProcessStream, (
|
||||
const float* const* src,
|
||||
@ -158,7 +154,6 @@ class FakeAudioProcessing : public webrtc::AudioProcessing {
|
||||
WEBRTC_STUB_CONST(stream_delay_ms, ());
|
||||
WEBRTC_BOOL_STUB_CONST(was_stream_delay_set, ());
|
||||
WEBRTC_VOID_STUB(set_stream_key_pressed, (bool key_pressed));
|
||||
WEBRTC_BOOL_STUB_CONST(stream_key_pressed, ());
|
||||
WEBRTC_VOID_STUB(set_delay_offset_ms, (int offset));
|
||||
WEBRTC_STUB_CONST(delay_offset_ms, ());
|
||||
WEBRTC_STUB(StartDebugRecording, (const char filename[kMaxFilenameSize]));
|
||||
|
||||
@ -281,15 +281,6 @@ int AudioProcessingImpl::Initialize() {
|
||||
return InitializeLocked();
|
||||
}
|
||||
|
||||
int AudioProcessingImpl::set_sample_rate_hz(int rate) {
|
||||
CriticalSectionScoped crit_scoped(crit_);
|
||||
|
||||
ProcessingConfig processing_config = api_format_;
|
||||
processing_config.input_stream().set_sample_rate_hz(rate);
|
||||
processing_config.output_stream().set_sample_rate_hz(rate);
|
||||
return InitializeLocked(processing_config);
|
||||
}
|
||||
|
||||
int AudioProcessingImpl::Initialize(int input_sample_rate_hz,
|
||||
int output_sample_rate_hz,
|
||||
int reverse_sample_rate_hz,
|
||||
@ -475,15 +466,6 @@ void AudioProcessingImpl::SetExtraOptions(const Config& config) {
|
||||
}
|
||||
}
|
||||
|
||||
int AudioProcessingImpl::input_sample_rate_hz() const {
|
||||
CriticalSectionScoped crit_scoped(crit_);
|
||||
return api_format_.input_stream().sample_rate_hz();
|
||||
}
|
||||
|
||||
int AudioProcessingImpl::sample_rate_hz() const {
|
||||
CriticalSectionScoped crit_scoped(crit_);
|
||||
return api_format_.input_stream().sample_rate_hz();
|
||||
}
|
||||
|
||||
int AudioProcessingImpl::proc_sample_rate_hz() const {
|
||||
return fwd_proc_format_.sample_rate_hz();
|
||||
@ -513,10 +495,6 @@ void AudioProcessingImpl::set_output_will_be_muted(bool muted) {
|
||||
}
|
||||
}
|
||||
|
||||
bool AudioProcessingImpl::output_will_be_muted() const {
|
||||
CriticalSectionScoped lock(crit_);
|
||||
return output_will_be_muted_;
|
||||
}
|
||||
|
||||
int AudioProcessingImpl::ProcessStream(const float* const* src,
|
||||
size_t samples_per_channel,
|
||||
@ -911,10 +889,6 @@ void AudioProcessingImpl::set_stream_key_pressed(bool key_pressed) {
|
||||
key_pressed_ = key_pressed;
|
||||
}
|
||||
|
||||
bool AudioProcessingImpl::stream_key_pressed() const {
|
||||
return key_pressed_;
|
||||
}
|
||||
|
||||
void AudioProcessingImpl::set_delay_offset_ms(int offset) {
|
||||
CriticalSectionScoped crit_scoped(crit_);
|
||||
delay_offset_ms_ = offset;
|
||||
|
||||
@ -68,16 +68,12 @@ class AudioProcessingImpl : public AudioProcessing {
|
||||
ChannelLayout reverse_layout) override;
|
||||
int Initialize(const ProcessingConfig& processing_config) override;
|
||||
void SetExtraOptions(const Config& config) override;
|
||||
int set_sample_rate_hz(int rate) override;
|
||||
int input_sample_rate_hz() const override;
|
||||
int sample_rate_hz() const override;
|
||||
int proc_sample_rate_hz() const override;
|
||||
int proc_split_sample_rate_hz() const override;
|
||||
int num_input_channels() const override;
|
||||
int num_output_channels() const override;
|
||||
int num_reverse_channels() const override;
|
||||
void set_output_will_be_muted(bool muted) override;
|
||||
bool output_will_be_muted() const override;
|
||||
int ProcessStream(AudioFrame* frame) override;
|
||||
int ProcessStream(const float* const* src,
|
||||
size_t samples_per_channel,
|
||||
@ -106,7 +102,6 @@ class AudioProcessingImpl : public AudioProcessing {
|
||||
void set_delay_offset_ms(int offset) override;
|
||||
int delay_offset_ms() const override;
|
||||
void set_stream_key_pressed(bool key_pressed) override;
|
||||
bool stream_key_pressed() const override;
|
||||
int StartDebugRecording(const char filename[kMaxFilenameSize]) override;
|
||||
int StartDebugRecording(FILE* handle) override;
|
||||
int StartDebugRecordingForPlatformFile(rtc::PlatformFile handle) override;
|
||||
|
||||
@ -264,15 +264,6 @@ class AudioProcessing {
|
||||
// ensures the options are applied immediately.
|
||||
virtual void SetExtraOptions(const Config& config) = 0;
|
||||
|
||||
// DEPRECATED.
|
||||
// TODO(ajm): Remove after Chromium has upgraded to using Initialize().
|
||||
virtual int set_sample_rate_hz(int rate) = 0;
|
||||
// TODO(ajm): Remove after voice engine no longer requires it to resample
|
||||
// the reverse stream to the forward rate.
|
||||
virtual int input_sample_rate_hz() const = 0;
|
||||
// TODO(ajm): Remove after Chromium no longer depends on it.
|
||||
virtual int sample_rate_hz() const = 0;
|
||||
|
||||
// TODO(ajm): Only intended for internal use. Make private and friend the
|
||||
// necessary classes?
|
||||
virtual int proc_sample_rate_hz() const = 0;
|
||||
@ -286,7 +277,6 @@ class AudioProcessing {
|
||||
// but some components may change behavior based on this information.
|
||||
// Default false.
|
||||
virtual void set_output_will_be_muted(bool muted) = 0;
|
||||
virtual bool output_will_be_muted() const = 0;
|
||||
|
||||
// Processes a 10 ms |frame| of the primary audio stream. On the client-side,
|
||||
// this is the near-end (or captured) audio.
|
||||
@ -387,7 +377,6 @@ class AudioProcessing {
|
||||
// Call to signal that a key press occurred (true) or did not occur (false)
|
||||
// with this chunk of audio.
|
||||
virtual void set_stream_key_pressed(bool key_pressed) = 0;
|
||||
virtual bool stream_key_pressed() const = 0;
|
||||
|
||||
// Sets a delay |offset| in ms to add to the values passed in through
|
||||
// set_stream_delay_ms(). May be positive or negative.
|
||||
|
||||
@ -902,7 +902,6 @@ TEST_F(ApmTest, SampleRatesInt) {
|
||||
for (size_t i = 0; i < sizeof(fs) / sizeof(*fs); i++) {
|
||||
SetContainerFormat(fs[i], 2, frame_, &float_cb_);
|
||||
EXPECT_NOERR(ProcessStreamChooser(kIntFormat));
|
||||
EXPECT_EQ(fs[i], apm_->input_sample_rate_hz());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user