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

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

Issue 1892433002: Moving device description utils from AudioManager[Base] into AudioDeviceDescription; to be shared b… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another rebase Created 4 years, 7 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/core_audio_util_win_unittest.cc ('k') | media/audio/win/wavein_input_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) 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
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_
OLDNEW
« no previous file with comments | « media/audio/win/core_audio_util_win_unittest.cc ('k') | media/audio/win/wavein_input_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698