1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- #ifndef MODULES_AUDIO_CODING_NETEQ_ACCELERATE_H_
- #define MODULES_AUDIO_CODING_NETEQ_ACCELERATE_H_
- #include <stddef.h>
- #include <stdint.h>
- #include "modules/audio_coding/neteq/time_stretch.h"
- #include "rtc_base/constructor_magic.h"
- namespace webrtc {
- class AudioMultiVector;
- class BackgroundNoise;
- class Accelerate : public TimeStretch {
- public:
- Accelerate(int sample_rate_hz,
- size_t num_channels,
- const BackgroundNoise& background_noise)
- : TimeStretch(sample_rate_hz, num_channels, background_noise) {}
-
-
-
-
-
-
-
- ReturnCodes Process(const int16_t* input,
- size_t input_length,
- bool fast_accelerate,
- AudioMultiVector* output,
- size_t* length_change_samples);
- protected:
-
-
- void SetParametersForPassiveSpeech(size_t len,
- int16_t* best_correlation,
- size_t* peak_index) const override;
-
-
- ReturnCodes CheckCriteriaAndStretch(const int16_t* input,
- size_t input_length,
- size_t peak_index,
- int16_t best_correlation,
- bool active_speech,
- bool fast_mode,
- AudioMultiVector* output) const override;
- private:
- RTC_DISALLOW_COPY_AND_ASSIGN(Accelerate);
- };
- struct AccelerateFactory {
- AccelerateFactory() {}
- virtual ~AccelerateFactory() {}
- virtual Accelerate* Create(int sample_rate_hz,
- size_t num_channels,
- const BackgroundNoise& background_noise) const;
- };
- }
- #endif
|