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

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

Issue 9570014: Move some generic functions to AudioManagerBase to be inherited by platform-specific AudioManager*** (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
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/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 // The file can later be analyzed off line using e.g. MATLAB. 390 // The file can later be analyzed off line using e.g. MATLAB.
391 // MATLAB example: 391 // MATLAB example:
392 // D=load('audio_delay_values_ms.txt'); 392 // D=load('audio_delay_values_ms.txt');
393 // x=cumsum(D(:,1)); 393 // x=cumsum(D(:,1));
394 // plot(x, D(:,2), x, D(:,3), x, D(:,4), x, D(:,2)+D(:,3)+D(:,4)); 394 // plot(x, D(:,2), x, D(:,3), x, D(:,4), x, D(:,2)+D(:,3)+D(:,4));
395 // axis([0, max(x), 0, max(D(:,2)+D(:,3)+D(:,4))+10]); 395 // axis([0, max(x), 0, max(D(:,2)+D(:,3)+D(:,4))+10]);
396 // legend('buffer delay','input delay','output delay','total delay'); 396 // legend('buffer delay','input delay','output delay','total delay');
397 // xlabel('time [msec]') 397 // xlabel('time [msec]')
398 // ylabel('delay [msec]') 398 // ylabel('delay [msec]')
399 // title('Full-duplex audio delay measurement'); 399 // title('Full-duplex audio delay measurement');
400 TEST_F(AudioLowLatencyInputOutputTest, DISABLED_FullDuplexDelayMeasurement) { 400 TEST_F(AudioLowLatencyInputOutputTest, FullDuplexDelayMeasurement) {
401 if (!CanRunAudioTests()) 401 if (!CanRunAudioTests())
402 return; 402 return;
403 403
404 AudioInputStreamWrapper aisw(audio_manager()); 404 AudioInputStreamWrapper aisw(audio_manager());
405 AudioInputStream* ais = aisw.Create(); 405 AudioInputStream* ais = aisw.Create();
406 EXPECT_TRUE(ais); 406 EXPECT_TRUE(ais);
407 407
408 AudioOutputStreamWrapper aosw(audio_manager()); 408 AudioOutputStreamWrapper aosw(audio_manager());
409 AudioOutputStream* aos = aosw.Create(); 409 AudioOutputStream* aos = aosw.Create();
410 EXPECT_TRUE(aos); 410 EXPECT_TRUE(aos);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 aos->Stop(); 448 aos->Stop();
449 ais->Stop(); 449 ais->Stop();
450 450
451 // All Close() operations that run on the mocked audio thread, 451 // All Close() operations that run on the mocked audio thread,
452 // should be synchronous and not post additional close tasks to 452 // should be synchronous and not post additional close tasks to
453 // mocked the audio thread. Hence, there is no need to call 453 // mocked the audio thread. Hence, there is no need to call
454 // message_loop()->RunAllPending() after the Close() methods. 454 // message_loop()->RunAllPending() after the Close() methods.
455 aos->Close(); 455 aos->Close();
456 ais->Close(); 456 ais->Close();
457 } 457 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698