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_AUDIO_UNIFIED_WIN_H_ | 5 #ifndef MEDIA_AUDIO_WIN_AUDIO_UNIFIED_WIN_H_ |
6 #define MEDIA_AUDIO_WIN_AUDIO_UNIFIED_WIN_H_ | 6 #define MEDIA_AUDIO_WIN_AUDIO_UNIFIED_WIN_H_ |
7 | 7 |
8 #include <Audioclient.h> | 8 #include <Audioclient.h> |
9 #include <MMDeviceAPI.h> | 9 #include <MMDeviceAPI.h> |
10 | 10 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // Stops and joins the audio thread in case of an error. | 87 // Stops and joins the audio thread in case of an error. |
88 void StopAndJoinThread(HRESULT err); | 88 void StopAndJoinThread(HRESULT err); |
89 | 89 |
90 // Converts unique endpoint ID to user-friendly device name. | 90 // Converts unique endpoint ID to user-friendly device name. |
91 std::string GetDeviceName(LPCWSTR device_id) const; | 91 std::string GetDeviceName(LPCWSTR device_id) const; |
92 | 92 |
93 // Returns the number of channels the audio engine uses for its internal | 93 // Returns the number of channels the audio engine uses for its internal |
94 // processing/mixing of shared-mode streams for the default endpoint device. | 94 // processing/mixing of shared-mode streams for the default endpoint device. |
95 int endpoint_channel_count() { return format_.Format.nChannels; } | 95 int endpoint_channel_count() { return format_.Format.nChannels; } |
96 | 96 |
| 97 bool FillRenderEndpointBufferWithSilence(UINT32* num_written_frames); |
| 98 |
97 // Contains the thread ID of the creating thread. | 99 // Contains the thread ID of the creating thread. |
98 base::PlatformThreadId creating_thread_id_; | 100 base::PlatformThreadId creating_thread_id_; |
99 | 101 |
100 // Our creator, the audio manager needs to be notified when we close. | 102 // Our creator, the audio manager needs to be notified when we close. |
101 AudioManagerWin* manager_; | 103 AudioManagerWin* manager_; |
102 | 104 |
103 // The sharing mode for the streams. | 105 // The sharing mode for the streams. |
104 // Valid values are AUDCLNT_SHAREMODE_SHARED and AUDCLNT_SHAREMODE_EXCLUSIVE | 106 // Valid values are AUDCLNT_SHAREMODE_SHARED and AUDCLNT_SHAREMODE_EXCLUSIVE |
105 // where AUDCLNT_SHAREMODE_SHARED is the default. | 107 // where AUDCLNT_SHAREMODE_SHARED is the default. |
106 AUDCLNT_SHAREMODE share_mode_; | 108 AUDCLNT_SHAREMODE share_mode_; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 | 172 |
171 // Container for sending data to AudioSourceCallback::OnMoreIOData(). | 173 // Container for sending data to AudioSourceCallback::OnMoreIOData(). |
172 scoped_ptr<AudioBus> capture_bus_; | 174 scoped_ptr<AudioBus> capture_bus_; |
173 | 175 |
174 DISALLOW_COPY_AND_ASSIGN(WASAPIUnifiedStream); | 176 DISALLOW_COPY_AND_ASSIGN(WASAPIUnifiedStream); |
175 }; | 177 }; |
176 | 178 |
177 } // namespace media | 179 } // namespace media |
178 | 180 |
179 #endif // MEDIA_AUDIO_WIN_AUDIO_UNIFIED_WIN_H_ | 181 #endif // MEDIA_AUDIO_WIN_AUDIO_UNIFIED_WIN_H_ |
OLD | NEW |