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

Side by Side Diff: media/filters/audio_renderer_algorithm_unittest.cc

Issue 1542013004: Switch to standard integer types in media/, take 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more stddef Created 4 years, 12 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/filters/audio_renderer_algorithm.h ('k') | media/filters/blocking_url_protocol.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 // The format of these tests are to enqueue a known amount of data and then 5 // The format of these tests are to enqueue a known amount of data and then
6 // request the exact amount we expect in order to dequeue the known amount of 6 // request the exact amount we expect in order to dequeue the known amount of
7 // data. This ensures that for any rate we are consuming input data at the 7 // data. This ensures that for any rate we are consuming input data at the
8 // correct rate. We always pass in a very large destination buffer with the 8 // correct rate. We always pass in a very large destination buffer with the
9 // expectation that FillBuffer() will fill as much as it can but no more. 9 // expectation that FillBuffer() will fill as much as it can but no more.
10 10
11 #include <stddef.h>
12 #include <stdint.h>
13
11 #include <algorithm> // For std::min(). 14 #include <algorithm> // For std::min().
12 #include <cmath> 15 #include <cmath>
13 #include <vector> 16 #include <vector>
14 17
15 #include "base/bind.h" 18 #include "base/bind.h"
16 #include "base/callback.h" 19 #include "base/callback.h"
20 #include "base/macros.h"
17 #include "base/memory/scoped_ptr.h" 21 #include "base/memory/scoped_ptr.h"
18 #include "media/base/audio_buffer.h" 22 #include "media/base/audio_buffer.h"
19 #include "media/base/audio_bus.h" 23 #include "media/base/audio_bus.h"
20 #include "media/base/channel_layout.h" 24 #include "media/base/channel_layout.h"
21 #include "media/base/test_helpers.h" 25 #include "media/base/test_helpers.h"
22 #include "media/base/timestamp_constants.h" 26 #include "media/base/timestamp_constants.h"
23 #include "media/filters/audio_renderer_algorithm.h" 27 #include "media/filters/audio_renderer_algorithm.h"
24 #include "media/filters/wsola_internals.h" 28 #include "media/filters/wsola_internals.h"
25 #include "testing/gtest/include/gtest/gtest.h" 29 #include "testing/gtest/include/gtest/gtest.h"
26 30
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 const int frames_filled = 670 const int frames_filled =
667 algorithm_.FillBuffer(bus.get(), kHalfSize, kHalfSize, kMutedRates[i]); 671 algorithm_.FillBuffer(bus.get(), kHalfSize, kHalfSize, kMutedRates[i]);
668 ASSERT_EQ(kHalfSize, frames_filled); 672 ASSERT_EQ(kHalfSize, frames_filled);
669 ASSERT_FALSE(VerifyAudioData(bus.get(), 0, kHalfSize, 0)); 673 ASSERT_FALSE(VerifyAudioData(bus.get(), 0, kHalfSize, 0));
670 ASSERT_TRUE(VerifyAudioData(bus.get(), kHalfSize, kHalfSize, 0)); 674 ASSERT_TRUE(VerifyAudioData(bus.get(), kHalfSize, kHalfSize, 0));
671 FillAlgorithmQueue(); 675 FillAlgorithmQueue();
672 } 676 }
673 } 677 }
674 678
675 } // namespace media 679 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/audio_renderer_algorithm.h ('k') | media/filters/blocking_url_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698