| Index: content/renderer/media/webrtc_local_audio_track.cc
|
| diff --git a/content/renderer/media/webrtc_local_audio_track.cc b/content/renderer/media/webrtc_local_audio_track.cc
|
| index 99ada98099fa3163d58fbf46ed0185fe838b8f39..626259066e5044d0eb2931841f96bf67fe44d77a 100644
|
| --- a/content/renderer/media/webrtc_local_audio_track.cc
|
| +++ b/content/renderer/media/webrtc_local_audio_track.cc
|
| @@ -9,7 +9,6 @@
|
| #include "content/renderer/media/media_stream_audio_processor.h"
|
| #include "content/renderer/media/media_stream_audio_sink_owner.h"
|
| #include "content/renderer/media/media_stream_audio_track_sink.h"
|
| -#include "content/renderer/media/peer_connection_audio_sink_owner.h"
|
| #include "content/renderer/media/webaudio_capturer_source.h"
|
| #include "content/renderer/media/webrtc/webrtc_local_audio_track_adapter.h"
|
| #include "content/renderer/media/webrtc_audio_capturer.h"
|
| @@ -39,10 +38,6 @@ WebRtcLocalAudioTrack::~WebRtcLocalAudioTrack() {
|
| }
|
|
|
| void WebRtcLocalAudioTrack::Capture(const int16* audio_data,
|
| - base::TimeDelta delay,
|
| - int volume,
|
| - bool key_pressed,
|
| - bool need_audio_processing,
|
| bool force_report_nonzero_energy) {
|
| DCHECK(capture_thread_checker_.CalledOnValidThread());
|
|
|
| @@ -78,20 +73,9 @@ void WebRtcLocalAudioTrack::Capture(const int16* audio_data,
|
| for (SinkList::ItemList::const_iterator it = sinks.begin();
|
| it != sinks.end();
|
| ++it) {
|
| - int new_volume = (*it)->OnData(audio_data,
|
| - audio_parameters_.sample_rate(),
|
| - audio_parameters_.channels(),
|
| - audio_parameters_.frames_per_buffer(),
|
| - voe_channels,
|
| - delay.InMilliseconds(),
|
| - volume,
|
| - need_audio_processing,
|
| - key_pressed);
|
| - if (new_volume != 0 && capturer.get() && !webaudio_source_.get()) {
|
| - // Feed the new volume to WebRtc while changing the volume on the
|
| - // browser.
|
| - capturer->SetVolume(new_volume);
|
| - }
|
| + (*it)->OnData(audio_data, audio_parameters_.sample_rate(),
|
| + audio_parameters_.channels(),
|
| + audio_parameters_.frames_per_buffer());
|
| }
|
| }
|
|
|
| @@ -155,39 +139,6 @@ void WebRtcLocalAudioTrack::RemoveSink(MediaStreamAudioSink* sink) {
|
| removed_item->Reset();
|
| }
|
|
|
| -void WebRtcLocalAudioTrack::AddSink(PeerConnectionAudioSink* sink) {
|
| - DCHECK(main_render_thread_checker_.CalledOnValidThread());
|
| - DVLOG(1) << "WebRtcLocalAudioTrack::AddSink()";
|
| - base::AutoLock auto_lock(lock_);
|
| -
|
| - // Verify that |sink| is not already added to the list.
|
| - DCHECK(!sinks_.Contains(
|
| - MediaStreamAudioTrackSink::WrapsPeerConnectionSink(sink)));
|
| -
|
| - // Create (and add to the list) a new MediaStreamAudioTrackSink
|
| - // which owns the |sink| and delagates all calls to the
|
| - // MediaStreamAudioSink interface. It will be tagged in the list, so
|
| - // we remember to call OnSetFormat() on the new sink.
|
| - scoped_refptr<MediaStreamAudioTrackSink> sink_owner(
|
| - new PeerConnectionAudioSinkOwner(sink));
|
| - sinks_.AddAndTag(sink_owner.get());
|
| -}
|
| -
|
| -void WebRtcLocalAudioTrack::RemoveSink(PeerConnectionAudioSink* sink) {
|
| - DCHECK(main_render_thread_checker_.CalledOnValidThread());
|
| - DVLOG(1) << "WebRtcLocalAudioTrack::RemoveSink()";
|
| -
|
| - base::AutoLock auto_lock(lock_);
|
| -
|
| - scoped_refptr<MediaStreamAudioTrackSink> removed_item = sinks_.Remove(
|
| - MediaStreamAudioTrackSink::WrapsPeerConnectionSink(sink));
|
| - // Clear the delegate to ensure that no more capture callbacks will
|
| - // be sent to this sink. Also avoids a possible crash which can happen
|
| - // if this method is called while capturing is active.
|
| - if (removed_item.get())
|
| - removed_item->Reset();
|
| -}
|
| -
|
| void WebRtcLocalAudioTrack::Start() {
|
| DCHECK(main_render_thread_checker_.CalledOnValidThread());
|
| DVLOG(1) << "WebRtcLocalAudioTrack::Start()";
|
| @@ -195,7 +146,7 @@ void WebRtcLocalAudioTrack::Start() {
|
| // If the track is hooking up with WebAudio, do NOT add the track to the
|
| // capturer as its sink otherwise two streams in different clock will be
|
| // pushed through the same track.
|
| - webaudio_source_->Start(this, capturer_.get());
|
| + webaudio_source_->Start(this);
|
| } else if (capturer_.get()) {
|
| capturer_->AddTrack(this);
|
| }
|
|
|