| Index: media/base/audio_renderer_mixer.cc
|
| diff --git a/media/base/audio_renderer_mixer.cc b/media/base/audio_renderer_mixer.cc
|
| index 3df825084a16ccd570dde3607ecf8c6166a7831b..b32124c69ce69d6d61b79954603fb9e5a2b13a77 100644
|
| --- a/media/base/audio_renderer_mixer.cc
|
| +++ b/media/base/audio_renderer_mixer.cc
|
| @@ -191,6 +191,7 @@ AudioRendererMixer::AudioRendererMixer(
|
| last_play_time_(base::TimeTicks::Now()),
|
| // Initialize |playing_| to true since Start() results in an auto-play.
|
| playing_(true) {
|
| + printf("################ Creating new mixer.\n");
|
| DVLOG(1) << "AudioRendererMixer::AudioRendererMixer(),\n"
|
| << output_params_.AsHumanReadableString() << "mixer: " << this;
|
| // TODO(olka) we probably want to (a) start with a null sink and create a new
|
| @@ -238,6 +239,29 @@ void AudioRendererMixer::ReconfigureSinkIfNeeded() {
|
| return;
|
| }
|
|
|
| +#if 1
|
| + {
|
| +// base::AutoLock auto_lock(lock_);
|
| + if (audio_sink_) {
|
| + printf("################ Restarting sink for mixer.\n");
|
| + // Initialize |playing_| to true since Start() results in an auto-play.
|
| + last_play_time_ = base::TimeTicks::Now();
|
| + output_params_ = new_output_params;
|
| + audio_sink_->Stop();
|
| + audio_sink_->Initialize(output_params_, this);
|
| + audio_sink_->Start();
|
| + if (playing_)
|
| + audio_sink_->Play();
|
| + DVLOG(1) << "Sink reinitialized";
|
| + return;
|
| + }
|
| + }
|
| +#endif
|
| +
|
| + NOTREACHED();
|
| +
|
| + printf("################ Creating new sink for mixer.\n");
|
| +
|
| // To minimize possible glitches during the sink switch, first we initialize
|
| // the new sink, and after that we stop the current one. This may be a problem
|
| // on Mac since audio output won't switch to a larger buffer when there is IO
|
|
|