Lines Matching refs:self

144   DelayEstimator* self = (DelayEstimator*) handle;
146 if (self == NULL) {
150 if (self->mean_far_spectrum != NULL) {
151 free(self->mean_far_spectrum);
152 self->mean_far_spectrum = NULL;
154 if (self->mean_near_spectrum != NULL) {
155 free(self->mean_near_spectrum);
156 self->mean_near_spectrum = NULL;
159 WebRtc_FreeBinaryDelayEstimator(self->binary_handle);
161 free(self);
170 DelayEstimator* self = NULL;
183 self = malloc(sizeof(DelayEstimator));
184 *handle = self;
185 if (self == NULL) {
189 self->mean_far_spectrum = NULL;
190 self->mean_near_spectrum = NULL;
193 if (WebRtc_CreateBinaryDelayEstimator(&self->binary_handle,
196 WebRtc_FreeDelayEstimator(self);
197 self = NULL;
201 self->mean_far_spectrum = malloc(spectrum_size * sizeof(SpectrumType));
202 if (self->mean_far_spectrum == NULL) {
203 WebRtc_FreeDelayEstimator(self);
204 self = NULL;
207 self->mean_near_spectrum = malloc(spectrum_size * sizeof(SpectrumType));
208 if (self->mean_near_spectrum == NULL) {
209 WebRtc_FreeDelayEstimator(self);
210 self = NULL;
214 self->spectrum_size = spectrum_size;
220 DelayEstimator* self = (DelayEstimator*) handle;
222 if (self == NULL) {
227 if (WebRtc_InitBinaryDelayEstimator(self->binary_handle) != 0) {
231 memset(self->mean_far_spectrum, 0,
232 sizeof(SpectrumType) * self->spectrum_size);
233 memset(self->mean_near_spectrum, 0,
234 sizeof(SpectrumType) * self->spectrum_size);
236 self->far_spectrum_initialized = 0;
237 self->near_spectrum_initialized = 0;
248 DelayEstimator* self = (DelayEstimator*) handle;
252 if (self == NULL) {
263 if (spectrum_size != self->spectrum_size) {
278 self->mean_far_spectrum,
280 &(self->far_spectrum_initialized));
282 self->mean_near_spectrum,
284 &(self->near_spectrum_initialized));
286 return WebRtc_ProcessBinarySpectrum(self->binary_handle,
295 DelayEstimator* self = (DelayEstimator*) handle;
299 if (self == NULL) {
310 if (spectrum_size != self->spectrum_size) {
317 self->mean_far_spectrum,
318 &(self->far_spectrum_initialized));
320 self->mean_near_spectrum,
321 &(self->near_spectrum_initialized));
323 return WebRtc_ProcessBinarySpectrum(self->binary_handle,
329 DelayEstimator* self = (DelayEstimator*) handle;
331 if (self == NULL) {
335 return WebRtc_binary_last_delay(self->binary_handle);