-void WebRtcLocalAudioTrack::AddChannel(int channel_id) {
- DVLOG(1) << "WebRtcLocalAudioTrack::AddChannel(channel_id="
- << channel_id << ")";
- base::AutoLock auto_lock(lock_);
- if (std::find(voe_channels_.begin(), voe_channels_.end(), channel_id) !=
- voe_channels_.end()) {
- // We need to handle the case when the same channel is connected to the
- // track more than once.
- return;
- }
-
- voe_channels_.push_back(channel_id);
-}
-
-void WebRtcLocalAudioTrack::RemoveChannel(int channel_id) {
- DVLOG(1) << "WebRtcLocalAudioTrack::RemoveChannel(channel_id="
- << channel_id << ")";
- base::AutoLock auto_lock(lock_);
- std::vector<int>::iterator iter =
- std::find(voe_channels_.begin(), voe_channels_.end(), channel_id);
- DCHECK(iter != voe_channels_.end());
- voe_channels_.erase(iter);
-}
-
-// webrtc::AudioTrackInterface implementation.
-webrtc::AudioSourceInterface* WebRtcLocalAudioTrack::GetSource() const {
- return track_source_;
-}
-
-cricket::AudioRenderer* WebRtcLocalAudioTrack::GetRenderer() {
- return this;
-}
-
-std::string WebRtcLocalAudioTrack::kind() const {
- return kAudioTrackKind;
-}
-