Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(262)

Side by Side Diff: webrtc/voice_engine/voe_base_impl.cc

Issue 2750783004: Add mute state field to AudioFrame. (Closed)
Patch Set: Fix num_channels check in UpMix() Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 shared_->output_mixer()->DoOperationsOnCombinedSignal(feed_data_to_apm); 730 shared_->output_mixer()->DoOperationsOnCombinedSignal(feed_data_to_apm);
731 731
732 // Retrieve the final output mix (resampled to match the ADM) 732 // Retrieve the final output mix (resampled to match the ADM)
733 shared_->output_mixer()->GetMixedAudio(sample_rate, number_of_channels, 733 shared_->output_mixer()->GetMixedAudio(sample_rate, number_of_channels,
734 &audioFrame_); 734 &audioFrame_);
735 735
736 assert(number_of_frames == audioFrame_.samples_per_channel_); 736 assert(number_of_frames == audioFrame_.samples_per_channel_);
737 assert(sample_rate == audioFrame_.sample_rate_hz_); 737 assert(sample_rate == audioFrame_.sample_rate_hz_);
738 738
739 // Deliver audio (PCM) samples to the ADM 739 // Deliver audio (PCM) samples to the ADM
740 memcpy(audio_data, audioFrame_.data_, 740 memcpy(audio_data, audioFrame_.data(),
741 sizeof(int16_t) * number_of_frames * number_of_channels); 741 sizeof(int16_t) * number_of_frames * number_of_channels);
742 742
743 *elapsed_time_ms = audioFrame_.elapsed_time_ms_; 743 *elapsed_time_ms = audioFrame_.elapsed_time_ms_;
744 *ntp_time_ms = audioFrame_.ntp_time_ms_; 744 *ntp_time_ms = audioFrame_.ntp_time_ms_;
745 } 745 }
746 746
747 int VoEBaseImpl::AssociateSendChannel(int channel, 747 int VoEBaseImpl::AssociateSendChannel(int channel,
748 int accociate_send_channel) { 748 int accociate_send_channel) {
749 rtc::CritScope cs(shared_->crit_sec()); 749 rtc::CritScope cs(shared_->crit_sec());
750 750
(...skipping 16 matching lines...) Expand all
767 shared_->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, 767 shared_->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError,
768 "AssociateSendChannel() failed to locate accociate_send_channel"); 768 "AssociateSendChannel() failed to locate accociate_send_channel");
769 return -1; 769 return -1;
770 } 770 }
771 771
772 channel_ptr->set_associate_send_channel(ch); 772 channel_ptr->set_associate_send_channel(ch);
773 return 0; 773 return 0;
774 } 774 }
775 775
776 } // namespace webrtc 776 } // namespace webrtc
OLDNEW
« webrtc/modules/module_common_types_unittest.cc ('K') | « webrtc/voice_engine/utility_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698