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

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

Issue 2517503003: Reland: Make more media APIs aware of |delay| and |delay_timestamp| (Closed)
Patch Set: Comments from chcunningham@ and Dale Created 4 years 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/win/audio_output_win_unittest.cc ('k') | media/base/audio_converter_unittest.cc » ('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 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 <stdint.h> 5 #include <stdint.h>
6 #include <memory> 6 #include <memory>
7 7
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "media/base/audio_bus.h" 9 #include "media/base/audio_bus.h"
10 #include "media/base/fake_audio_render_callback.h" 10 #include "media/base/fake_audio_render_callback.h"
(...skipping 28 matching lines...) Expand all
39 (base::TimeTicks::Now() - start).InMillisecondsF(); 39 (base::TimeTicks::Now() - start).InMillisecondsF();
40 perf_test::PrintResult( 40 perf_test::PrintResult(
41 "audio_bus_from_interleaved", "", trace_name, 41 "audio_bus_from_interleaved", "", trace_name,
42 total_time_milliseconds / kBenchmarkIterations, "ms", true); 42 total_time_milliseconds / kBenchmarkIterations, "ms", true);
43 } 43 }
44 44
45 // Benchmark the FromInterleaved() and ToInterleaved() methods. 45 // Benchmark the FromInterleaved() and ToInterleaved() methods.
46 TEST(AudioBusPerfTest, Interleave) { 46 TEST(AudioBusPerfTest, Interleave) {
47 std::unique_ptr<AudioBus> bus = AudioBus::Create(2, 48000 * 120); 47 std::unique_ptr<AudioBus> bus = AudioBus::Create(2, 48000 * 120);
48 FakeAudioRenderCallback callback(0.2); 48 FakeAudioRenderCallback callback(0.2);
49 callback.Render(bus.get(), 0, 0); 49 callback.Render(base::TimeDelta(), base::TimeTicks::Now(), 0, bus.get());
50 50
51 RunInterleaveBench<int8_t>(bus.get(), "int8_t"); 51 RunInterleaveBench<int8_t>(bus.get(), "int8_t");
52 RunInterleaveBench<int16_t>(bus.get(), "int16_t"); 52 RunInterleaveBench<int16_t>(bus.get(), "int16_t");
53 RunInterleaveBench<int32_t>(bus.get(), "int32_t"); 53 RunInterleaveBench<int32_t>(bus.get(), "int32_t");
54 } 54 }
55 55
56 } // namespace media 56 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/win/audio_output_win_unittest.cc ('k') | media/base/audio_converter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698