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

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

Issue 1534273002: Switch to standard integer types in media/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 5 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
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 "base/time/time.h" 5 #include "base/time/time.h"
6 #include "media/base/audio_bus.h" 6 #include "media/base/audio_bus.h"
7 #include "media/base/fake_audio_render_callback.h" 7 #include "media/base/fake_audio_render_callback.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "testing/perf/perf_test.h" 9 #include "testing/perf/perf_test.h"
10 10
(...skipping 27 matching lines...) Expand all
38 "audio_bus_from_interleaved", "", trace_name, 38 "audio_bus_from_interleaved", "", trace_name,
39 total_time_milliseconds / kBenchmarkIterations, "ms", true); 39 total_time_milliseconds / kBenchmarkIterations, "ms", true);
40 } 40 }
41 41
42 // Benchmark the FromInterleaved() and ToInterleaved() methods. 42 // Benchmark the FromInterleaved() and ToInterleaved() methods.
43 TEST(AudioBusPerfTest, Interleave) { 43 TEST(AudioBusPerfTest, Interleave) {
44 scoped_ptr<AudioBus> bus = AudioBus::Create(2, 48000 * 120); 44 scoped_ptr<AudioBus> bus = AudioBus::Create(2, 48000 * 120);
45 FakeAudioRenderCallback callback(0.2); 45 FakeAudioRenderCallback callback(0.2);
46 callback.Render(bus.get(), 0, 0); 46 callback.Render(bus.get(), 0, 0);
47 47
48 RunInterleaveBench<int8>(bus.get(), "int8"); 48 RunInterleaveBench<int8_t>(bus.get(), "int8_t");
49 RunInterleaveBench<int16>(bus.get(), "int16"); 49 RunInterleaveBench<int16_t>(bus.get(), "int16_t");
50 RunInterleaveBench<int32>(bus.get(), "int32"); 50 RunInterleaveBench<int32_t>(bus.get(), "int32_t");
51 } 51 }
52 52
53 } // namespace media 53 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698