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

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

Issue 12049070: Avoids irregular OnMoreData callbacks on Windows using Core Audio (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleaned up Created 7 years, 10 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 | Annotate | Revision Log
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_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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698