| OLD | NEW |
| 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 #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 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 // The number of buffers of size |buffer_size_| each to use. | 101 // The number of buffers of size |buffer_size_| each to use. |
| 102 const int num_buffers_; | 102 const int num_buffers_; |
| 103 | 103 |
| 104 // The size in bytes of each audio buffer. | 104 // The size in bytes of each audio buffer. |
| 105 uint32_t buffer_size_; | 105 uint32_t buffer_size_; |
| 106 | 106 |
| 107 // Channels, 1 or 2. | 107 // Channels, 1 or 2. |
| 108 const int channels_; | 108 const int channels_; |
| 109 | 109 |
| 110 // Contains the unique name of the selected endpoint device. | 110 // Contains the unique name of the selected endpoint device. |
| 111 // Note that AudioManagerBase::kDefaultDeviceId represents the default | 111 // Note that AudioDeviceDescription::kDefaultDeviceId represents the default |
| 112 // device role and is not a valid ID as such. | 112 // device role and is not a valid ID as such. |
| 113 std::string device_id_; | 113 std::string device_id_; |
| 114 | 114 |
| 115 // Windows native structure to encode the format parameters. | 115 // Windows native structure to encode the format parameters. |
| 116 WAVEFORMATEX format_; | 116 WAVEFORMATEX format_; |
| 117 | 117 |
| 118 // Handle to the instance of the wave device. | 118 // Handle to the instance of the wave device. |
| 119 HWAVEIN wavein_; | 119 HWAVEIN wavein_; |
| 120 | 120 |
| 121 // Pointer to the first allocated audio buffer. This object owns it. | 121 // Pointer to the first allocated audio buffer. This object owns it. |
| 122 WAVEHDR* buffer_; | 122 WAVEHDR* buffer_; |
| 123 | 123 |
| 124 // An event that is signaled when the callback thread is ready to stop. | 124 // An event that is signaled when the callback thread is ready to stop. |
| 125 base::win::ScopedHandle stopped_event_; | 125 base::win::ScopedHandle stopped_event_; |
| 126 | 126 |
| 127 // Lock used to avoid conflicts when Stop() is called during a callback. | 127 // Lock used to avoid conflicts when Stop() is called during a callback. |
| 128 base::Lock lock_; | 128 base::Lock lock_; |
| 129 | 129 |
| 130 // Extra audio bus used for storage of deinterleaved data for the OnData | 130 // Extra audio bus used for storage of deinterleaved data for the OnData |
| 131 // callback. | 131 // callback. |
| 132 std::unique_ptr<media::AudioBus> audio_bus_; | 132 std::unique_ptr<media::AudioBus> audio_bus_; |
| 133 | 133 |
| 134 DISALLOW_COPY_AND_ASSIGN(PCMWaveInAudioInputStream); | 134 DISALLOW_COPY_AND_ASSIGN(PCMWaveInAudioInputStream); |
| 135 }; | 135 }; |
| 136 | 136 |
| 137 } // namespace media | 137 } // namespace media |
| 138 | 138 |
| 139 #endif // MEDIA_AUDIO_WIN_WAVEIN_INPUT_WIN_H_ | 139 #endif // MEDIA_AUDIO_WIN_WAVEIN_INPUT_WIN_H_ |
| OLD | NEW |