Skip to content

Commit

Permalink
Fix external audio processor sample rate calculation (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidliu authored Mar 14, 2024
1 parent b951613 commit 5065016
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sdk/android/src/jni/pc/external_audio_processor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ void ExternalAudioProcessor::Process(webrtc::AudioBuffer* audio) {
size_t num_frames = audio->num_frames();
size_t num_bands =audio->num_bands();

int rate = num_frames * 1000;
// 1 buffer = 10ms of frames
int rate = num_frames * 100;

if (rate != sample_rate_hz_) {
external_processor_->Reset(rate);
Expand Down

0 comments on commit 5065016

Please sign in to comment.