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

Side by Side Diff: media/audio/ios/audio_manager_ios_unittest.cc

Issue 10907110: Create iOS Audio Manager implementation. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Response to reviews Created 8 years, 3 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
OLDNEW
(Empty)
1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/basictypes.h"
6 #include "media/audio/audio_io.h"
7 #include "media/audio/audio_manager.h"
8 #include "testing/gtest/include/gtest/gtest.h"
9
10 using namespace media;
11
12 // Test that input is supported and output is not.
13 TEST(IOSAudioTest, AudioSupport) {
14 AudioManager* audio_manager = AudioManager::Create();
15 ASSERT_TRUE(NULL != audio_manager);
16 ASSERT_FALSE(audio_manager->HasAudioOutputDevices());
17 ASSERT_TRUE(audio_manager->HasAudioInputDevices());
18 }
19
20 // Test that input stream can be opened and closed.
21 TEST(IOSAudioTest, InputStreamOpenAndClose) {
22 AudioManager* audio_manager = AudioManager::Create();
23 ASSERT_TRUE(NULL != audio_manager);
24 if (!audio_manager->HasAudioInputDevices())
25 return;
26 AudioInputStream* ias = audio_manager->MakeAudioInputStream(
27 AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_STEREO,
28 8000, 16, 1024),
29 std::string("test_device"));
30 ASSERT_TRUE(NULL != ias);
31 EXPECT_TRUE(ias->Open());
32 ias->Close();
33 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698