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

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

Issue 2836293002: Introduce AudioRendererSink::IsOptimizedForHardwareParameters (Closed)
Patch Set: revert preferred_params and add OptimizedForHardwareParameters 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 return output_device_info_; 69 return output_device_info_;
70 } 70 }
71 71
72 bool FakeAudioRendererSink::OptimizedForHardwareParameters() {
73 return true;
DaleCurtis 2017/05/01 22:55:08 false.
flim-chromium 2017/05/15 15:15:57 This needs to be true for several tests in AudioRe
74 }
75
72 bool FakeAudioRendererSink::CurrentThreadIsRenderingThread() { 76 bool FakeAudioRendererSink::CurrentThreadIsRenderingThread() {
73 NOTIMPLEMENTED(); 77 NOTIMPLEMENTED();
74 return false; 78 return false;
75 } 79 }
76 80
77 bool FakeAudioRendererSink::Render(AudioBus* dest, 81 bool FakeAudioRendererSink::Render(AudioBus* dest,
78 base::TimeDelta delay, 82 base::TimeDelta delay,
79 int* frames_written) { 83 int* frames_written) {
80 if (state_ != kPlaying) 84 if (state_ != kPlaying)
81 return false; 85 return false;
(...skipping 18 matching lines...) Expand all
100 "kPlaying", 104 "kPlaying",
101 "kStopped" 105 "kStopped"
102 }; 106 };
103 107
104 DVLOG(1) << __func__ << " : " << kStateNames[state_] << " -> " 108 DVLOG(1) << __func__ << " : " << kStateNames[state_] << " -> "
105 << kStateNames[new_state]; 109 << kStateNames[new_state];
106 state_ = new_state; 110 state_ = new_state;
107 } 111 }
108 112
109 } // namespace media 113 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698