diff options
author | Mikkel Krautz <mikkel@krautz.dk> | 2012-03-11 01:49:43 +0400 |
---|---|---|
committer | Mikkel Krautz <mikkel@krautz.dk> | 2012-03-11 01:49:43 +0400 |
commit | b6a4307b6e52bb4539e5f8ad4f17a889a549c161 (patch) | |
tree | 8ac26aa585eccddcba06dda5fa9f8dd284f706b9 /src/MKAudioInput.m | |
parent | 94ceb59d76d3625871de1bbe32b884d9982303f4 (diff) |
Remove MKAudio benchmark mode.
Diffstat (limited to 'src/MKAudioInput.m')
-rw-r--r-- | src/MKAudioInput.m | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/src/MKAudioInput.m b/src/MKAudioInput.m index babd050..9230089 100644 --- a/src/MKAudioInput.m +++ b/src/MKAudioInput.m @@ -45,8 +45,6 @@ #include <celt.h> #include <opus.h> -#include "timedelta.h" - @interface MKAudioInput () { @public AudioUnit audioUnit; @@ -606,23 +604,7 @@ static OSStatus inputCallback(void *udata, AudioUnitRenderActionFlags *flags, co int isSpeech = 0; if (_settings.enablePreprocessor) { -#if 1 - if (_settings.enableBenchmark) { - TimeDelta td; - TimeDelta_start(&td); - isSpeech = speex_preprocess_run(_preprocessorState, psMic); - TimeDelta_stop(&td); - unsigned long udt = TimeDelta_usec_delta(&td); - if (_preprocAvgItems == 0) - _preprocRunningAvg = (long)udt; - else - _preprocRunningAvg += (((long)udt - _preprocRunningAvg) / _preprocAvgItems); - ++_preprocAvgItems; - } else -#endif - { - isSpeech = speex_preprocess_run(_preprocessorState, psMic); - } + isSpeech = speex_preprocess_run(_preprocessorState, psMic); } else { BOOL resampled = micFrequency != sampleRate; short *buf = resampled ? psOut : psMic; |