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

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

Issue 2966005: Add recording capability to AudioManager, and implemented on windows using the WaveIn APIs. (Closed)
Patch Set: Patch Created 10 years, 5 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/audio/win/audio_input_win_unittest.cc ('k') | media/audio/win/audio_manager_win.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2010 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 #ifndef MEDIA_AUDIO_AUDIO_MANAGER_WIN_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_MANAGER_WIN_H_
6 #define MEDIA_AUDIO_AUDIO_MANAGER_WIN_H_ 6 #define MEDIA_AUDIO_AUDIO_MANAGER_WIN_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "media/audio/audio_io.h" 11 #include "media/audio/audio_io.h"
12 12
13 class PCMWaveInAudioInputStream;
13 class PCMWaveOutAudioOutputStream; 14 class PCMWaveOutAudioOutputStream;
14 15
15 // Windows implementation of the AudioManager singleton. This class is internal 16 // Windows implementation of the AudioManager singleton. This class is internal
16 // to the audio output and only internal users can call methods not exposed by 17 // to the audio output and only internal users can call methods not exposed by
17 // the AudioManager class. 18 // the AudioManager class.
18 class AudioManagerWin : public AudioManager { 19 class AudioManagerWin : public AudioManager {
19 public: 20 public:
20 AudioManagerWin() {} 21 AudioManagerWin() {}
21 // Implementation of AudioManager. 22 // Implementation of AudioManager.
22 virtual bool HasAudioOutputDevices(); 23 virtual bool HasAudioOutputDevices();
24 virtual bool HasAudioInputDevices();
23 virtual AudioOutputStream* MakeAudioOutputStream(Format format, int channels, 25 virtual AudioOutputStream* MakeAudioOutputStream(Format format, int channels,
24 int sample_rate, 26 int sample_rate,
25 char bits_per_sample); 27 char bits_per_sample);
28 virtual AudioInputStream* MakeAudioInputStream(Format format, int channels,
29 int sample_rate,
30 char bits_per_sample,
31 uint32 samples_per_packet);
26 virtual void MuteAll(); 32 virtual void MuteAll();
27 virtual void UnMuteAll(); 33 virtual void UnMuteAll();
28 34
29 // Windows-only methods to free a stream created in MakeAudioStream. These 35 // Windows-only methods to free a stream created in MakeAudioStream. These
30 // are called internally by the audio stream when it has been closed. 36 // are called internally by the audio stream when it has been closed.
31 void ReleaseOutputStream(PCMWaveOutAudioOutputStream* stream); 37 void ReleaseOutputStream(PCMWaveOutAudioOutputStream* stream);
32 38
39 // Called internally by the audio stream when it has been closed.
40 void ReleaseInputStream(PCMWaveInAudioInputStream* stream);
41
33 private: 42 private:
34 friend void DestroyAudioManagerWin(void *); 43 friend void DestroyAudioManagerWin(void *);
35 virtual ~AudioManagerWin(); 44 virtual ~AudioManagerWin();
36 DISALLOW_COPY_AND_ASSIGN(AudioManagerWin); 45 DISALLOW_COPY_AND_ASSIGN(AudioManagerWin);
37 }; 46 };
38 47
39 #endif // MEDIA_AUDIO_AUDIO_MANAGER_WIN_H_ 48 #endif // MEDIA_AUDIO_AUDIO_MANAGER_WIN_H_
OLDNEW
« no previous file with comments | « media/audio/win/audio_input_win_unittest.cc ('k') | media/audio/win/audio_manager_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698