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

Side by Side Diff: webrtc/voice_engine/channel.h

Issue 1224163002: Update audio code to use size_t more correctly, webrtc/voice_engine/ portion. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Checkpoint Created 5 years, 5 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
« no previous file with comments | « no previous file | webrtc/voice_engine/channel.cc » ('j') | webrtc/voice_engine/channel.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 int8_t OutputEnergyLevel() const 425 int8_t OutputEnergyLevel() const
426 { 426 {
427 return _outputAudioLevel.Level(); 427 return _outputAudioLevel.Level();
428 } 428 }
429 uint32_t Demultiplex(const AudioFrame& audioFrame); 429 uint32_t Demultiplex(const AudioFrame& audioFrame);
430 // Demultiplex the data to the channel's |_audioFrame|. The difference 430 // Demultiplex the data to the channel's |_audioFrame|. The difference
431 // between this method and the overloaded method above is that |audio_data| 431 // between this method and the overloaded method above is that |audio_data|
432 // does not go through transmit_mixer and APM. 432 // does not go through transmit_mixer and APM.
433 void Demultiplex(const int16_t* audio_data, 433 void Demultiplex(const int16_t* audio_data,
434 int sample_rate, 434 int sample_rate,
435 int number_of_frames, 435 size_t number_of_frames,
henrika_webrtc 2015/07/13 07:38:08 It is not clear to me why size_t is required here.
Peter Kasting 2015/07/13 22:12:28 Sure. A fairly complete argument/set of tradeoffs
henrika_webrtc 2015/07/14 07:54:09 Thanks!
436 int number_of_channels); 436 int number_of_channels);
437 uint32_t PrepareEncodeAndSend(int mixingFrequency); 437 uint32_t PrepareEncodeAndSend(int mixingFrequency);
438 uint32_t EncodeAndSend(); 438 uint32_t EncodeAndSend();
439 439
440 // Associate to a send channel. 440 // Associate to a send channel.
441 // Used for obtaining RTT for a receive-only channel. 441 // Used for obtaining RTT for a receive-only channel.
442 void set_associate_send_channel(const ChannelOwner& channel) { 442 void set_associate_send_channel(const ChannelOwner& channel) {
443 assert(_channelId != channel.channel()->ChannelId()); 443 assert(_channelId != channel.channel()->ChannelId());
444 CriticalSectionScoped lock(assoc_send_channel_lock_.get()); 444 CriticalSectionScoped lock(assoc_send_channel_lock_.get());
445 associate_send_channel_ = channel; 445 associate_send_channel_ = channel;
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 rtc::scoped_ptr<NetworkPredictor> network_predictor_; 578 rtc::scoped_ptr<NetworkPredictor> network_predictor_;
579 // An associated send channel. 579 // An associated send channel.
580 rtc::scoped_ptr<CriticalSectionWrapper> assoc_send_channel_lock_; 580 rtc::scoped_ptr<CriticalSectionWrapper> assoc_send_channel_lock_;
581 ChannelOwner associate_send_channel_ GUARDED_BY(assoc_send_channel_lock_); 581 ChannelOwner associate_send_channel_ GUARDED_BY(assoc_send_channel_lock_);
582 }; 582 };
583 583
584 } // namespace voe 584 } // namespace voe
585 } // namespace webrtc 585 } // namespace webrtc
586 586
587 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_ 587 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/voice_engine/channel.cc » ('j') | webrtc/voice_engine/channel.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698