OLD | NEW |
1 // Copyright (c) 2010 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 #ifndef MEDIA_AUDIO_WIN_WAVEIN_INPUT_WIN_H_ | 5 #ifndef MEDIA_AUDIO_WIN_WAVEIN_INPUT_WIN_H_ |
6 #define MEDIA_AUDIO_WIN_WAVEIN_INPUT_WIN_H_ | 6 #define MEDIA_AUDIO_WIN_WAVEIN_INPUT_WIN_H_ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <mmsystem.h> | 9 #include <mmsystem.h> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/scoped_handle_win.h" | 12 #include "base/win/scoped_handle.h" |
13 #include "media/audio/audio_io.h" | 13 #include "media/audio/audio_io.h" |
14 #include "media/audio/audio_parameters.h" | 14 #include "media/audio/audio_parameters.h" |
15 | 15 |
16 class AudioManagerWin; | 16 class AudioManagerWin; |
17 | 17 |
18 class PCMWaveInAudioInputStream : public AudioInputStream { | 18 class PCMWaveInAudioInputStream : public AudioInputStream { |
19 public: | 19 public: |
20 // The ctor takes all the usual parameters, plus |manager| which is the | 20 // The ctor takes all the usual parameters, plus |manager| which is the |
21 // the audio manager who is creating this object and |device_id| which | 21 // the audio manager who is creating this object and |device_id| which |
22 // is provided by the operating system. | 22 // is provided by the operating system. |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 // Windows native structure to encode the format parameters. | 86 // Windows native structure to encode the format parameters. |
87 WAVEFORMATEX format_; | 87 WAVEFORMATEX format_; |
88 | 88 |
89 // Handle to the instance of the wave device. | 89 // Handle to the instance of the wave device. |
90 HWAVEIN wavein_; | 90 HWAVEIN wavein_; |
91 | 91 |
92 // Pointer to the first allocated audio buffer. This object owns it. | 92 // Pointer to the first allocated audio buffer. This object owns it. |
93 WAVEHDR* buffer_; | 93 WAVEHDR* buffer_; |
94 | 94 |
95 // An event that is signaled when the callback thread is ready to stop. | 95 // An event that is signaled when the callback thread is ready to stop. |
96 ScopedHandle stopped_event_; | 96 base::win::ScopedHandle stopped_event_; |
97 | 97 |
98 DISALLOW_COPY_AND_ASSIGN(PCMWaveInAudioInputStream); | 98 DISALLOW_COPY_AND_ASSIGN(PCMWaveInAudioInputStream); |
99 }; | 99 }; |
100 | 100 |
101 #endif // MEDIA_AUDIO_WIN_WAVEIN_INPUT_WIN_H_ | 101 #endif // MEDIA_AUDIO_WIN_WAVEIN_INPUT_WIN_H_ |
OLD | NEW |