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

Side by Side Diff: media/audio/audio_low_latency_input_output_unittest.cc

Issue 163343002: Reland 153623004: Remove the unified IO code on the browser (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fixed the cras bot Created 6 years, 10 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
« no previous file with comments | « media/audio/audio_logging.h ('k') | media/audio/audio_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/environment.h" 6 #include "base/environment.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 public: 305 public:
306 typedef AudioOutputStream StreamType; 306 typedef AudioOutputStream StreamType;
307 307
308 static AudioParameters GetDefaultAudioStreamParameters( 308 static AudioParameters GetDefaultAudioStreamParameters(
309 AudioManager* audio_manager) { 309 AudioManager* audio_manager) {
310 return audio_manager->GetDefaultOutputStreamParameters(); 310 return audio_manager->GetDefaultOutputStreamParameters();
311 } 311 }
312 312
313 static StreamType* CreateStream(AudioManager* audio_manager, 313 static StreamType* CreateStream(AudioManager* audio_manager,
314 const AudioParameters& params) { 314 const AudioParameters& params) {
315 return audio_manager->MakeAudioOutputStream(params, std::string(), 315 return audio_manager->MakeAudioOutputStream(params, std::string());
316 std::string());
317 } 316 }
318 }; 317 };
319 318
320 // Traits template holding a trait of StreamType. It encapsulates 319 // Traits template holding a trait of StreamType. It encapsulates
321 // AudioInputStream and AudioOutputStream stream types. 320 // AudioInputStream and AudioOutputStream stream types.
322 template <typename StreamTraits> 321 template <typename StreamTraits>
323 class StreamWrapper { 322 class StreamWrapper {
324 public: 323 public:
325 typedef typename StreamTraits::StreamType StreamType; 324 typedef typename StreamTraits::StreamType StreamType;
326 325
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 444
446 // All Close() operations that run on the mocked audio thread, 445 // All Close() operations that run on the mocked audio thread,
447 // should be synchronous and not post additional close tasks to 446 // should be synchronous and not post additional close tasks to
448 // mocked the audio thread. Hence, there is no need to call 447 // mocked the audio thread. Hence, there is no need to call
449 // message_loop()->RunUntilIdle() after the Close() methods. 448 // message_loop()->RunUntilIdle() after the Close() methods.
450 aos->Close(); 449 aos->Close();
451 ais->Close(); 450 ais->Close();
452 } 451 }
453 452
454 } // namespace media 453 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/audio_logging.h ('k') | media/audio/audio_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698