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

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

Issue 9805001: Move media/audio files into media namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix various compiler errors Created 8 years, 9 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 | Annotate | Revision Log
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 #include "media/audio/audio_io.h" 5 #include "media/audio/audio_io.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <objbase.h> // This has to be before initguid.h 8 #include <objbase.h> // This has to be before initguid.h
9 #include <initguid.h> 9 #include <initguid.h>
10 #include <mmsystem.h> 10 #include <mmsystem.h>
(...skipping 20 matching lines...) Expand all
31 #pragma comment(lib, "setupapi.lib") 31 #pragma comment(lib, "setupapi.lib")
32 32
33 // The following are defined in various DDK headers, and we (re)define them 33 // The following are defined in various DDK headers, and we (re)define them
34 // here to avoid adding the DDK as a chrome dependency. 34 // here to avoid adding the DDK as a chrome dependency.
35 #define DRV_QUERYDEVICEINTERFACE 0x80c 35 #define DRV_QUERYDEVICEINTERFACE 0x80c
36 #define DRVM_MAPPER_PREFERRED_GET 0x2015 36 #define DRVM_MAPPER_PREFERRED_GET 0x2015
37 #define DRV_QUERYDEVICEINTERFACESIZE 0x80d 37 #define DRV_QUERYDEVICEINTERFACESIZE 0x80d
38 DEFINE_GUID(AM_KSCATEGORY_AUDIO, 0x6994ad04, 0x93ef, 0x11d0, 38 DEFINE_GUID(AM_KSCATEGORY_AUDIO, 0x6994ad04, 0x93ef, 0x11d0,
39 0xa3, 0xcc, 0x00, 0xa0, 0xc9, 0x22, 0x31, 0x96); 39 0xa3, 0xcc, 0x00, 0xa0, 0xc9, 0x22, 0x31, 0x96);
40 40
41 namespace media {
42
41 // Maximum number of output streams that can be open simultaneously. 43 // Maximum number of output streams that can be open simultaneously.
42 static const int kMaxOutputStreams = 50; 44 static const int kMaxOutputStreams = 50;
43 45
44 // Up to 8 channels can be passed to the driver. 46 // Up to 8 channels can be passed to the driver.
45 // This should work, given the right drivers, but graceful error handling is 47 // This should work, given the right drivers, but graceful error handling is
46 // needed. 48 // needed.
47 static const int kWinMaxChannels = 8; 49 static const int kWinMaxChannels = 8;
48 50
49 // We use 3 buffers for recording audio so that if a recording callback takes 51 // We use 3 buffers for recording audio so that if a recording callback takes
50 // some time to return we won't lose audio. More buffers while recording are 52 // some time to return we won't lose audio. More buffers while recording are
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 } 312 }
311 313
312 return new PCMWaveInAudioInputStream(this, params, kNumInputBuffers, 314 return new PCMWaveInAudioInputStream(this, params, kNumInputBuffers,
313 xp_device_id); 315 xp_device_id);
314 } 316 }
315 317
316 /// static 318 /// static
317 AudioManager* CreateAudioManager() { 319 AudioManager* CreateAudioManager() {
318 return new AudioManagerWin(); 320 return new AudioManagerWin();
319 } 321 }
322
323 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698