audio_processing: DestroyHandle() now returns void
The return value was not used anyhow and there is no proper action to be taken if we would have received an error. Hence, in line with issue441 we should return void upon free. BUG=441 TESTED=trybots,modules_unittest R=andrew@webrtc.org, aluebs@webrtc.org, kwiberg@webrtc.org Review URL: https://webrtc-codereview.appspot.com/12269004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5949 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
2a796720f8
commit
5964fe0f86
webrtc/modules/audio_processing
echo_cancellation_impl.ccecho_cancellation_impl.hecho_control_mobile_impl.ccecho_control_mobile_impl.hgain_control_impl.ccgain_control_impl.hhigh_pass_filter_impl.cchigh_pass_filter_impl.hlevel_estimator_impl.cclevel_estimator_impl.hnoise_suppression_impl.ccnoise_suppression_impl.hprocessing_component.hvoice_detection_impl.ccvoice_detection_impl.h
@ -351,9 +351,9 @@ void* EchoCancellationImpl::CreateHandle() const {
|
||||
return handle;
|
||||
}
|
||||
|
||||
int EchoCancellationImpl::DestroyHandle(void* handle) const {
|
||||
void EchoCancellationImpl::DestroyHandle(void* handle) const {
|
||||
assert(handle != NULL);
|
||||
return WebRtcAec_Free(static_cast<Handle*>(handle));
|
||||
WebRtcAec_Free(static_cast<Handle*>(handle));
|
||||
}
|
||||
|
||||
int EchoCancellationImpl::InitializeHandle(void* handle) const {
|
||||
|
@ -60,7 +60,7 @@ class EchoCancellationImpl : public EchoCancellation,
|
||||
virtual void* CreateHandle() const OVERRIDE;
|
||||
virtual int InitializeHandle(void* handle) const OVERRIDE;
|
||||
virtual int ConfigureHandle(void* handle) const OVERRIDE;
|
||||
virtual int DestroyHandle(void* handle) const OVERRIDE;
|
||||
virtual void DestroyHandle(void* handle) const OVERRIDE;
|
||||
virtual int num_handles_required() const OVERRIDE;
|
||||
virtual int GetHandleError(void* handle) const OVERRIDE;
|
||||
|
||||
|
@ -260,8 +260,8 @@ void* EchoControlMobileImpl::CreateHandle() const {
|
||||
return handle;
|
||||
}
|
||||
|
||||
int EchoControlMobileImpl::DestroyHandle(void* handle) const {
|
||||
return WebRtcAecm_Free(static_cast<Handle*>(handle));
|
||||
void EchoControlMobileImpl::DestroyHandle(void* handle) const {
|
||||
WebRtcAecm_Free(static_cast<Handle*>(handle));
|
||||
}
|
||||
|
||||
int EchoControlMobileImpl::InitializeHandle(void* handle) const {
|
||||
|
@ -49,7 +49,7 @@ class EchoControlMobileImpl : public EchoControlMobile,
|
||||
virtual void* CreateHandle() const OVERRIDE;
|
||||
virtual int InitializeHandle(void* handle) const OVERRIDE;
|
||||
virtual int ConfigureHandle(void* handle) const OVERRIDE;
|
||||
virtual int DestroyHandle(void* handle) const OVERRIDE;
|
||||
virtual void DestroyHandle(void* handle) const OVERRIDE;
|
||||
virtual int num_handles_required() const OVERRIDE;
|
||||
virtual int GetHandleError(void* handle) const OVERRIDE;
|
||||
|
||||
|
@ -317,8 +317,8 @@ void* GainControlImpl::CreateHandle() const {
|
||||
return handle;
|
||||
}
|
||||
|
||||
int GainControlImpl::DestroyHandle(void* handle) const {
|
||||
return WebRtcAgc_Free(static_cast<Handle*>(handle));
|
||||
void GainControlImpl::DestroyHandle(void* handle) const {
|
||||
WebRtcAgc_Free(static_cast<Handle*>(handle));
|
||||
}
|
||||
|
||||
int GainControlImpl::InitializeHandle(void* handle) const {
|
||||
|
@ -60,7 +60,7 @@ class GainControlImpl : public GainControl,
|
||||
virtual void* CreateHandle() const OVERRIDE;
|
||||
virtual int InitializeHandle(void* handle) const OVERRIDE;
|
||||
virtual int ConfigureHandle(void* handle) const OVERRIDE;
|
||||
virtual int DestroyHandle(void* handle) const OVERRIDE;
|
||||
virtual void DestroyHandle(void* handle) const OVERRIDE;
|
||||
virtual int num_handles_required() const OVERRIDE;
|
||||
virtual int GetHandleError(void* handle) const OVERRIDE;
|
||||
|
||||
|
@ -148,9 +148,8 @@ void* HighPassFilterImpl::CreateHandle() const {
|
||||
return new FilterState;
|
||||
}
|
||||
|
||||
int HighPassFilterImpl::DestroyHandle(void* handle) const {
|
||||
void HighPassFilterImpl::DestroyHandle(void* handle) const {
|
||||
delete static_cast<Handle*>(handle);
|
||||
return apm_->kNoError;
|
||||
}
|
||||
|
||||
int HighPassFilterImpl::InitializeHandle(void* handle) const {
|
||||
|
@ -38,7 +38,7 @@ class HighPassFilterImpl : public HighPassFilter,
|
||||
virtual void* CreateHandle() const OVERRIDE;
|
||||
virtual int InitializeHandle(void* handle) const OVERRIDE;
|
||||
virtual int ConfigureHandle(void* handle) const OVERRIDE;
|
||||
virtual int DestroyHandle(void* handle) const OVERRIDE;
|
||||
virtual void DestroyHandle(void* handle) const OVERRIDE;
|
||||
virtual int num_handles_required() const OVERRIDE;
|
||||
virtual int GetHandleError(void* handle) const OVERRIDE;
|
||||
|
||||
|
@ -135,11 +135,10 @@ void* LevelEstimatorImpl::CreateHandle() const {
|
||||
return new Level;
|
||||
}
|
||||
|
||||
int LevelEstimatorImpl::DestroyHandle(void* handle) const {
|
||||
void LevelEstimatorImpl::DestroyHandle(void* handle) const {
|
||||
assert(handle != NULL);
|
||||
Level* level = static_cast<Level*>(handle);
|
||||
delete level;
|
||||
return apm_->kNoError;
|
||||
}
|
||||
|
||||
int LevelEstimatorImpl::InitializeHandle(void* handle) const {
|
||||
|
@ -40,7 +40,7 @@ class LevelEstimatorImpl : public LevelEstimator,
|
||||
virtual void* CreateHandle() const OVERRIDE;
|
||||
virtual int InitializeHandle(void* handle) const OVERRIDE;
|
||||
virtual int ConfigureHandle(void* handle) const OVERRIDE;
|
||||
virtual int DestroyHandle(void* handle) const OVERRIDE;
|
||||
virtual void DestroyHandle(void* handle) const OVERRIDE;
|
||||
virtual int num_handles_required() const OVERRIDE;
|
||||
virtual int GetHandleError(void* handle) const OVERRIDE;
|
||||
|
||||
|
@ -141,11 +141,11 @@ void* NoiseSuppressionImpl::CreateHandle() const {
|
||||
return handle;
|
||||
}
|
||||
|
||||
int NoiseSuppressionImpl::DestroyHandle(void* handle) const {
|
||||
void NoiseSuppressionImpl::DestroyHandle(void* handle) const {
|
||||
#if defined(WEBRTC_NS_FLOAT)
|
||||
return WebRtcNs_Free(static_cast<Handle*>(handle));
|
||||
WebRtcNs_Free(static_cast<Handle*>(handle));
|
||||
#elif defined(WEBRTC_NS_FIXED)
|
||||
return WebRtcNsx_Free(static_cast<Handle*>(handle));
|
||||
WebRtcNsx_Free(static_cast<Handle*>(handle));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ class NoiseSuppressionImpl : public NoiseSuppression,
|
||||
virtual void* CreateHandle() const OVERRIDE;
|
||||
virtual int InitializeHandle(void* handle) const OVERRIDE;
|
||||
virtual int ConfigureHandle(void* handle) const OVERRIDE;
|
||||
virtual int DestroyHandle(void* handle) const OVERRIDE;
|
||||
virtual void DestroyHandle(void* handle) const OVERRIDE;
|
||||
virtual int num_handles_required() const OVERRIDE;
|
||||
virtual int GetHandleError(void* handle) const OVERRIDE;
|
||||
|
||||
|
@ -38,7 +38,7 @@ class ProcessingComponent {
|
||||
virtual void* CreateHandle() const = 0;
|
||||
virtual int InitializeHandle(void* handle) const = 0;
|
||||
virtual int ConfigureHandle(void* handle) const = 0;
|
||||
virtual int DestroyHandle(void* handle) const = 0;
|
||||
virtual void DestroyHandle(void* handle) const = 0;
|
||||
virtual int num_handles_required() const = 0;
|
||||
virtual int GetHandleError(void* handle) const = 0;
|
||||
|
||||
|
@ -163,9 +163,8 @@ void* VoiceDetectionImpl::CreateHandle() const {
|
||||
return handle;
|
||||
}
|
||||
|
||||
int VoiceDetectionImpl::DestroyHandle(void* handle) const {
|
||||
void VoiceDetectionImpl::DestroyHandle(void* handle) const {
|
||||
WebRtcVad_Free(static_cast<Handle*>(handle));
|
||||
return apm_->kNoError;
|
||||
}
|
||||
|
||||
int VoiceDetectionImpl::InitializeHandle(void* handle) const {
|
||||
|
@ -47,7 +47,7 @@ class VoiceDetectionImpl : public VoiceDetection,
|
||||
virtual void* CreateHandle() const OVERRIDE;
|
||||
virtual int InitializeHandle(void* handle) const OVERRIDE;
|
||||
virtual int ConfigureHandle(void* handle) const OVERRIDE;
|
||||
virtual int DestroyHandle(void* handle) const OVERRIDE;
|
||||
virtual void DestroyHandle(void* handle) const OVERRIDE;
|
||||
virtual int num_handles_required() const OVERRIDE;
|
||||
virtual int GetHandleError(void* handle) const OVERRIDE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user