Remove the requirement to call set_sample_rate_hz and friends.
Instead have ProcessStream transparently handle changes to the stream audio parameters (sample rate and channels). This removes two locks per 10 ms ProcessStream call taken by VoiceEngine (four total with the audio level indicator.) Also, prepare future improvements by having the splitting filter take a length parameter. This will allow it to work at different sample rates. Remove the useless splitting_filter wrapper. TESTED=voe_cmd_test with audio processing enabled and switching between codecs; unit tests. R=aluebs@webrtc.org, bjornv@webrtc.org, turaj@webrtc.org, xians@webrtc.org Review URL: https://webrtc-codereview.appspot.com/3949004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5346 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -552,8 +552,8 @@ int16_t WebRtcIsac_Encode(ISACStruct* ISAC_main_inst,
|
||||
}
|
||||
|
||||
if (instISAC->encoderSamplingRateKHz == kIsacSuperWideband) {
|
||||
WebRtcSpl_AnalysisQMF(speech_in_ptr, speechInLB, speechInUB,
|
||||
instISAC->analysisFBState1,
|
||||
WebRtcSpl_AnalysisQMF(speech_in_ptr, SWBFRAMESAMPLES_10ms, speechInLB,
|
||||
speechInUB, instISAC->analysisFBState1,
|
||||
instISAC->analysisFBState2);
|
||||
|
||||
/* Convert from fixed to floating point. */
|
||||
@@ -1314,7 +1314,7 @@ static int16_t Decode(ISACStruct* ISAC_main_inst,
|
||||
speechIdx = 0;
|
||||
while (speechIdx < numSamplesLB) {
|
||||
WebRtcSpl_SynthesisQMF(&outFrameLB[speechIdx], &outFrameUB[speechIdx],
|
||||
&decoded[(speechIdx << 1)],
|
||||
FRAMESAMPLES_10ms, &decoded[(speechIdx << 1)],
|
||||
instISAC->synthesisFBState1,
|
||||
instISAC->synthesisFBState2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user