webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
webrtc::TimeStretch Class Referenceabstract

#include <time_stretch.h>

Inheritance diagram for webrtc::TimeStretch:
webrtc::Accelerate webrtc::Accelerate webrtc::PreemptiveExpand webrtc::PreemptiveExpand

Public Types

enum  ReturnCodes {
  kSuccess = 0, kSuccessLowEnergy = 1, kNoStretch = 2, kError = -1,
  kSuccess = 0, kSuccessLowEnergy = 1, kNoStretch = 2, kError = -1
}
 
enum  ReturnCodes {
  kSuccess = 0, kSuccessLowEnergy = 1, kNoStretch = 2, kError = -1,
  kSuccess = 0, kSuccessLowEnergy = 1, kNoStretch = 2, kError = -1
}
 

Public Member Functions

 TimeStretch (int sample_rate_hz, size_t num_channels, const BackgroundNoise &background_noise)
 
virtual ~TimeStretch ()
 
ReturnCodes Process (const int16_t *input, size_t input_len, bool fast_mode, AudioMultiVector *output, size_t *length_change_samples)
 
 TimeStretch (int sample_rate_hz, size_t num_channels, const BackgroundNoise &background_noise)
 
virtual ~TimeStretch ()
 
ReturnCodes Process (const int16_t *input, size_t input_len, bool fast_mode, AudioMultiVector *output, size_t *length_change_samples)
 

Protected Member Functions

virtual void SetParametersForPassiveSpeech (size_t input_length, int16_t *best_correlation, size_t *peak_index) const =0
 
virtual 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 =0
 
virtual void SetParametersForPassiveSpeech (size_t input_length, int16_t *best_correlation, size_t *peak_index) const =0
 
virtual 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 =0
 

Protected Attributes

const int sample_rate_hz_
 
const int fs_mult_
 
const size_t num_channels_
 
const size_t master_channel_
 
const BackgroundNoisebackground_noise_
 
int16_t max_input_value_
 
int16_t downsampled_input_ [kDownsampledLen]
 
int16_t auto_correlation_ [kCorrelationLen+1]
 

Static Protected Attributes

static const size_t kCorrelationLen = 50
 
static const size_t kLogCorrelationLen = 6
 
static const size_t kMinLag = 10
 
static const size_t kMaxLag = 60
 
static const size_t kDownsampledLen = kCorrelationLen + kMaxLag
 
static const int kCorrelationThreshold = 14746
 

Member Enumeration Documentation

◆ ReturnCodes [1/2]

Enumerator
kSuccess 
kSuccessLowEnergy 
kNoStretch 
kError 
kSuccess 
kSuccessLowEnergy 
kNoStretch 
kError 

◆ ReturnCodes [2/2]

Enumerator
kSuccess 
kSuccessLowEnergy 
kNoStretch 
kError 
kSuccess 
kSuccessLowEnergy 
kNoStretch 
kError 

Constructor & Destructor Documentation

◆ TimeStretch() [1/2]

webrtc::TimeStretch::TimeStretch ( int  sample_rate_hz,
size_t  num_channels,
const BackgroundNoise background_noise 
)
inline

◆ ~TimeStretch() [1/2]

virtual webrtc::TimeStretch::~TimeStretch ( )
inlinevirtual

◆ TimeStretch() [2/2]

webrtc::TimeStretch::TimeStretch ( int  sample_rate_hz,
size_t  num_channels,
const BackgroundNoise background_noise 
)
inline

◆ ~TimeStretch() [2/2]

virtual webrtc::TimeStretch::~TimeStretch ( )
inlinevirtual

Member Function Documentation

◆ CheckCriteriaAndStretch() [1/2]

virtual ReturnCodes webrtc::TimeStretch::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
protectedpure virtual

◆ CheckCriteriaAndStretch() [2/2]

virtual ReturnCodes webrtc::TimeStretch::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
protectedpure virtual

◆ Process() [1/2]

ReturnCodes webrtc::TimeStretch::Process ( const int16_t input,
size_t  input_len,
bool  fast_mode,
AudioMultiVector output,
size_t length_change_samples 
)

◆ Process() [2/2]

TimeStretch::ReturnCodes webrtc::TimeStretch::Process ( const int16_t input,
size_t  input_len,
bool  fast_mode,
AudioMultiVector output,
size_t length_change_samples 
)

◆ SetParametersForPassiveSpeech() [1/2]

virtual void webrtc::TimeStretch::SetParametersForPassiveSpeech ( size_t  input_length,
int16_t best_correlation,
size_t peak_index 
) const
protectedpure virtual

◆ SetParametersForPassiveSpeech() [2/2]

virtual void webrtc::TimeStretch::SetParametersForPassiveSpeech ( size_t  input_length,
int16_t best_correlation,
size_t peak_index 
) const
protectedpure virtual

Member Data Documentation

◆ auto_correlation_

int16_t webrtc::TimeStretch::auto_correlation_
protected

◆ background_noise_

const BackgroundNoise & webrtc::TimeStretch::background_noise_
protected

◆ downsampled_input_

int16_t webrtc::TimeStretch::downsampled_input_
protected

◆ fs_mult_

const int webrtc::TimeStretch::fs_mult_
protected

◆ kCorrelationLen

static const size_t webrtc::TimeStretch::kCorrelationLen = 50
staticprotected

◆ kCorrelationThreshold

static const int webrtc::TimeStretch::kCorrelationThreshold = 14746
staticprotected

◆ kDownsampledLen

static const size_t webrtc::TimeStretch::kDownsampledLen = kCorrelationLen + kMaxLag
staticprotected

◆ kLogCorrelationLen

static const size_t webrtc::TimeStretch::kLogCorrelationLen = 6
staticprotected

◆ kMaxLag

static const size_t webrtc::TimeStretch::kMaxLag = 60
staticprotected

◆ kMinLag

static const size_t webrtc::TimeStretch::kMinLag = 10
staticprotected

◆ master_channel_

const size_t webrtc::TimeStretch::master_channel_
protected

◆ max_input_value_

int16_t webrtc::TimeStretch::max_input_value_
protected

◆ num_channels_

const size_t webrtc::TimeStretch::num_channels_
protected

◆ sample_rate_hz_

const int webrtc::TimeStretch::sample_rate_hz_
protected

The documentation for this class was generated from the following files: