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

Side by Side Diff: media/base/fake_audio_renderer_sink.cc

Issue 2836293002: Introduce AudioRendererSink::IsOptimizedForHardwareParameters (Closed)
Patch Set: Created 3 years, 7 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 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/base/fake_audio_renderer_sink.h" 5 #include "media/base/fake_audio_renderer_sink.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 void FakeAudioRendererSink::Play() { 58 void FakeAudioRendererSink::Play() {
59 DCHECK(state_ == kStarted || state_ == kPaused) << "state_ " << state_; 59 DCHECK(state_ == kStarted || state_ == kPaused) << "state_ " << state_;
60 DCHECK_EQ(state_, kPaused); 60 DCHECK_EQ(state_, kPaused);
61 ChangeState(kPlaying); 61 ChangeState(kPlaying);
62 } 62 }
63 63
64 bool FakeAudioRendererSink::SetVolume(double volume) { 64 bool FakeAudioRendererSink::SetVolume(double volume) {
65 return true; 65 return true;
66 } 66 }
67 67
68 OutputDeviceInfo FakeAudioRendererSink::GetOutputDeviceInfo() { 68 OutputDeviceInfo FakeAudioRendererSink::GetOutputDeviceInfo(
69 const AudioParameters& preferred_params) {
69 return output_device_info_; 70 return output_device_info_;
70 } 71 }
71 72
72 bool FakeAudioRendererSink::CurrentThreadIsRenderingThread() { 73 bool FakeAudioRendererSink::CurrentThreadIsRenderingThread() {
73 NOTIMPLEMENTED(); 74 NOTIMPLEMENTED();
74 return false; 75 return false;
75 } 76 }
76 77
77 bool FakeAudioRendererSink::Render(AudioBus* dest, 78 bool FakeAudioRendererSink::Render(AudioBus* dest,
78 base::TimeDelta delay, 79 base::TimeDelta delay,
(...skipping 21 matching lines...) Expand all
100 "kPlaying", 101 "kPlaying",
101 "kStopped" 102 "kStopped"
102 }; 103 };
103 104
104 DVLOG(1) << __func__ << " : " << kStateNames[state_] << " -> " 105 DVLOG(1) << __func__ << " : " << kStateNames[state_] << " -> "
105 << kStateNames[new_state]; 106 << kStateNames[new_state];
106 state_ = new_state; 107 state_ = new_state;
107 } 108 }
108 109
109 } // namespace media 110 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698