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

Side by Side Diff: media/audio/win/audio_output_win_unittest.cc

Issue 8786013: Replace media::Limits struct with media::limits namespace and update documentation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix logic Created 9 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 | Annotate | Revision Log
« no previous file with comments | « media/audio/audio_parameters.cc ('k') | media/base/audio_decoder_config.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <windows.h> 5 #include <windows.h>
6 #include <mmsystem.h> 6 #include <mmsystem.h>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 EXPECT_TRUE(NULL == audio_man->MakeAudioOutputStream( 255 EXPECT_TRUE(NULL == audio_man->MakeAudioOutputStream(
256 AudioParameters(fmt, CHANNEL_LAYOUT_UNSUPPORTED, 8000, 16, 256))); 256 AudioParameters(fmt, CHANNEL_LAYOUT_UNSUPPORTED, 8000, 16, 256)));
257 EXPECT_TRUE(NULL == audio_man->MakeAudioOutputStream( 257 EXPECT_TRUE(NULL == audio_man->MakeAudioOutputStream(
258 AudioParameters(fmt, CHANNEL_LAYOUT_STEREO, -8000, 16, 256))); 258 AudioParameters(fmt, CHANNEL_LAYOUT_STEREO, -8000, 16, 256)));
259 EXPECT_TRUE(NULL == audio_man->MakeAudioOutputStream( 259 EXPECT_TRUE(NULL == audio_man->MakeAudioOutputStream(
260 AudioParameters(fmt, CHANNEL_LAYOUT_MONO, 8000, 16, -100))); 260 AudioParameters(fmt, CHANNEL_LAYOUT_MONO, 8000, 16, -100)));
261 EXPECT_TRUE(NULL == audio_man->MakeAudioOutputStream( 261 EXPECT_TRUE(NULL == audio_man->MakeAudioOutputStream(
262 AudioParameters(fmt, CHANNEL_LAYOUT_MONO, 8000, 16, 0))); 262 AudioParameters(fmt, CHANNEL_LAYOUT_MONO, 8000, 16, 0)));
263 EXPECT_TRUE(NULL == audio_man->MakeAudioOutputStream( 263 EXPECT_TRUE(NULL == audio_man->MakeAudioOutputStream(
264 AudioParameters(fmt, CHANNEL_LAYOUT_MONO, 8000, 16, 264 AudioParameters(fmt, CHANNEL_LAYOUT_MONO, 8000, 16,
265 media::Limits::kMaxSamplesPerPacket + 1))); 265 media::limits::kMaxSamplesPerPacket + 1)));
266 } 266 }
267 267
268 // Test that it can be opened and closed. 268 // Test that it can be opened and closed.
269 TEST(WinAudioTest, PCMWaveStreamOpenAndClose) { 269 TEST(WinAudioTest, PCMWaveStreamOpenAndClose) {
270 if (IsRunningHeadless()) 270 if (IsRunningHeadless())
271 return; 271 return;
272 AudioManager* audio_man = AudioManager::GetAudioManager(); 272 AudioManager* audio_man = AudioManager::GetAudioManager();
273 ASSERT_TRUE(NULL != audio_man); 273 ASSERT_TRUE(NULL != audio_man);
274 if (!audio_man->HasAudioOutputDevices()) 274 if (!audio_man->HasAudioOutputDevices())
275 return; 275 return;
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 743
744 oas->Start(&source); 744 oas->Start(&source);
745 745
746 ::WaitForSingleObject(thread, INFINITE); 746 ::WaitForSingleObject(thread, INFINITE);
747 ::CloseHandle(thread); 747 ::CloseHandle(thread);
748 delete sockets[1]; 748 delete sockets[1];
749 749
750 oas->Stop(); 750 oas->Stop();
751 oas->Close(); 751 oas->Close();
752 } 752 }
OLDNEW
« no previous file with comments | « media/audio/audio_parameters.cc ('k') | media/base/audio_decoder_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698