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

Side by Side Diff: chrome/browser/renderer_host/audio_renderer_host_unittest.cc

Issue 661386: Add a parameter to CreateAudioStream to choose between standard and low-latency mode. (Closed)
Patch Set: . Created 10 years, 9 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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/process_util.h" 6 #include "base/process_util.h"
7 #include "base/scoped_ptr.h" 7 #include "base/scoped_ptr.h"
8 #include "chrome/browser/chrome_thread.h" 8 #include "chrome/browser/chrome_thread.h"
9 #include "chrome/browser/renderer_host/audio_renderer_host.h" 9 #include "chrome/browser/renderer_host/audio_renderer_host.h"
10 #include "chrome/common/render_messages.h" 10 #include "chrome/common/render_messages.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 host_, 154 host_,
155 kProcessId, 155 kProcessId,
156 kRouteId, 156 kRouteId,
157 current_stream_id_, 157 current_stream_id_,
158 base::GetCurrentProcessHandle(), 158 base::GetCurrentProcessHandle(),
159 format, 159 format,
160 2, 160 2,
161 AudioManager::kAudioCDSampleRate, 161 AudioManager::kAudioCDSampleRate,
162 16, 162 16,
163 kPacketSize, 163 kPacketSize,
164 kBufferCapacity); 164 kBufferCapacity,
165 false);
165 EXPECT_TRUE(source); 166 EXPECT_TRUE(source);
166 EXPECT_EQ(kProcessId, source->process_id()); 167 EXPECT_EQ(kProcessId, source->process_id());
167 EXPECT_EQ(kRouteId, source->route_id()); 168 EXPECT_EQ(kRouteId, source->route_id());
168 EXPECT_EQ(current_stream_id_, source->stream_id()); 169 EXPECT_EQ(current_stream_id_, source->stream_id());
169 return source; 170 return source;
170 } 171 }
171 172
172 AudioRendererHost::IPCAudioSource* CreateRealStream() { 173 AudioRendererHost::IPCAudioSource* CreateRealStream() {
173 return CreateAudioStream(AudioManager::AUDIO_PCM_LINEAR); 174 return CreateAudioStream(AudioManager::AUDIO_PCM_LINEAR);
174 } 175 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 source->NotifyPacketReady(kPacketSize); 218 source->NotifyPacketReady(kPacketSize);
218 source->NotifyPacketReady(kPacketSize); 219 source->NotifyPacketReady(kPacketSize);
219 source->NotifyPacketReady(kStep); 220 source->NotifyPacketReady(kStep);
220 source->NotifyPacketReady(kStep); 221 source->NotifyPacketReady(kStep);
221 source->NotifyPacketReady(kStep); 222 source->NotifyPacketReady(kStep);
222 source->NotifyPacketReady(kStep); 223 source->NotifyPacketReady(kStep);
223 source->Play(); 224 source->Play();
224 EXPECT_EQ(ViewMsg_AudioStreamState_Params::kPlaying, state.state); 225 EXPECT_EQ(ViewMsg_AudioStreamState_Params::kPlaying, state.state);
225 source->Close(); 226 source->Close();
226 } 227 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/audio_renderer_host.cc ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698