summaryrefslogtreecommitdiffstats
path: root/media/audio/mac/audio_output_mac_unittest.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-05 06:39:06 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-05 06:39:06 +0000
commitf6eeded10a75632e1bc5ecaad9be46553c4ab908 (patch)
tree8a400e987cd72f1a4b799ce086f3d4169d87b0e9 /media/audio/mac/audio_output_mac_unittest.cc
parent29a984ff619eb0bdd27bc612bed55f6146cce4fe (diff)
downloadchromium_src-f6eeded10a75632e1bc5ecaad9be46553c4ab908.zip
chromium_src-f6eeded10a75632e1bc5ecaad9be46553c4ab908.tar.gz
chromium_src-f6eeded10a75632e1bc5ecaad9be46553c4ab908.tar.bz2
Remove size_t from audio IPC code.
The change got to this size because I had to modify the surrounding code (I didn't want to just cast at the last minute). Review URL: http://codereview.chromium.org/577006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38192 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio/mac/audio_output_mac_unittest.cc')
-rw-r--r--media/audio/mac/audio_output_mac_unittest.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/media/audio/mac/audio_output_mac_unittest.cc b/media/audio/mac/audio_output_mac_unittest.cc
index 06d7f96..ee589f5 100644
--- a/media/audio/mac/audio_output_mac_unittest.cc
+++ b/media/audio/mac/audio_output_mac_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -19,8 +19,8 @@ using ::testing::Return;
class MockAudioSource : public AudioOutputStream::AudioSourceCallback {
public:
- MOCK_METHOD4(OnMoreData, size_t(AudioOutputStream* stream, void* dest,
- size_t max_size, int pending_bytes));
+ MOCK_METHOD4(OnMoreData, uint32(AudioOutputStream* stream, void* dest,
+ uint32 max_size, uint32 pending_bytes));
MOCK_METHOD1(OnClose, void(AudioOutputStream* stream));
MOCK_METHOD2(OnError, void(AudioOutputStream* stream, int code));
};
@@ -28,7 +28,7 @@ class MockAudioSource : public AudioOutputStream::AudioSourceCallback {
// Validate that the SineWaveAudioSource writes the expected values for
// the FORMAT_16BIT_MONO.
TEST(MacAudioTest, SineWaveAudio16MonoTest) {
- const size_t samples = 1024;
+ const uint32 samples = 1024;
const int freq = 200;
SineWaveAudioSource source(SineWaveAudioSource::FORMAT_16BIT_LINEAR_PCM, 1,
@@ -88,7 +88,7 @@ TEST(MacAudioTest, PCMWaveStreamPlay200HzTone44KssMono) {
SineWaveAudioSource source(SineWaveAudioSource::FORMAT_16BIT_LINEAR_PCM, 1,
200.0, AudioManager::kAudioCDSampleRate);
- size_t bytes_100_ms = (AudioManager::kAudioCDSampleRate / 10) * 2;
+ uint32 bytes_100_ms = (AudioManager::kAudioCDSampleRate / 10) * 2;
EXPECT_TRUE(oas->Open(bytes_100_ms));
@@ -121,7 +121,7 @@ TEST(MacAudioTest, PCMWaveStreamPlay200HzTone22KssMono) {
SineWaveAudioSource source(SineWaveAudioSource::FORMAT_16BIT_LINEAR_PCM, 1,
200.0, AudioManager::kAudioCDSampleRate/2);
- size_t bytes_100_ms = (AudioManager::kAudioCDSampleRate / 20) * 2;
+ uint32 bytes_100_ms = (AudioManager::kAudioCDSampleRate / 20) * 2;
EXPECT_TRUE(oas->Open(bytes_100_ms));
oas->Start(&source);
@@ -132,7 +132,7 @@ TEST(MacAudioTest, PCMWaveStreamPlay200HzTone22KssMono) {
// Custom action to clear a memory buffer.
static void ClearBuffer(AudioOutputStream* strea, void* dest,
- size_t max_size, size_t pending_bytes) {
+ uint32 max_size, uint32 pending_bytes) {
memset(dest, 0, max_size);
}
@@ -147,7 +147,7 @@ TEST(MacAudioTest, PCMWaveStreamPendingBytes) {
ASSERT_TRUE(NULL != oas);
NiceMock<MockAudioSource> source;
- size_t bytes_100_ms = (AudioManager::kAudioCDSampleRate / 10) * 2;
+ uint32 bytes_100_ms = (AudioManager::kAudioCDSampleRate / 10) * 2;
EXPECT_TRUE(oas->Open(bytes_100_ms));
// We expect the amount of pending bytes will reaching |bytes_100_ms|