Skip to content

Commit

Permalink
Fix the number of frames used when interleaving in AudioBuffer::Inter…
Browse files Browse the repository at this point in the history
…leaveTo()

R=henrik.lundin@webrtc.org, peah@webrtc.org
TBR=tina.legrand@webrtc.org

Review URL: https://codereview.webrtc.org/1862553002 .

Cr-Commit-Position: refs/heads/master@{#12249}
  • Loading branch information
Alejandro Luebs committed Apr 6, 2016
1 parent faed4ab commit 40cbec5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
Binary file modified data/audio_processing/output_data_fixed.pb
Binary file not shown.
4 changes: 2 additions & 2 deletions webrtc/modules/audio_processing/audio_buffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -430,10 +430,10 @@ void AudioBuffer::InterleaveTo(AudioFrame* frame, bool data_changed) {
}

if (frame->num_channels_ == num_channels_) {
Interleave(data_ptr->ibuf()->channels(), proc_num_frames_, num_channels_,
Interleave(data_ptr->ibuf()->channels(), output_num_frames_, num_channels_,
frame->data_);
} else {
UpmixMonoToInterleaved(data_ptr->ibuf()->channels()[0], proc_num_frames_,
UpmixMonoToInterleaved(data_ptr->ibuf()->channels()[0], output_num_frames_,
frame->num_channels_, frame->data_);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,7 @@ bool write_ref_data = false;
const google::protobuf::int32 kChannels[] = {1, 2};
const int kSampleRates[] = {8000, 16000, 32000, 48000};

#if defined(WEBRTC_AUDIOPROC_FIXED_PROFILE)
// Android doesn't support 48kHz.
const int kProcessSampleRates[] = {8000, 16000, 32000};
#elif defined(WEBRTC_AUDIOPROC_FLOAT_PROFILE)
const int kProcessSampleRates[] = {8000, 16000, 32000, 48000};
#endif

enum StreamDirection { kForward = 0, kReverse };

Expand Down

0 comments on commit 40cbec5

Please sign in to comment.