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

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

Issue 1060673002: Disable low latency audio under remote desktop sessions. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable for remote audio, on Open() too. Created 5 years, 8 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
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 // Utility methods for the Core Audio API on Windows. 5 // Utility methods for the Core Audio API on Windows.
6 // Always ensure that Core Audio is supported before using these methods. 6 // Always ensure that Core Audio is supported before using these methods.
7 // Use media::CoreAudioUtil::IsSupported() for this purpose. 7 // Use media::CoreAudioUtil::IsSupported() for this purpose.
8 // Also, all methods must be called on a valid COM thread. This can be done 8 // Also, all methods must be called on a valid COM thread. This can be done
9 // by using the base::win::ScopedCOMInitializer helper class. 9 // by using the base::win::ScopedCOMInitializer helper class.
10 10
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 // input data from a capture endpoint buffer. 222 // input data from a capture endpoint buffer.
223 static ScopedComPtr<IAudioCaptureClient> CreateCaptureClient( 223 static ScopedComPtr<IAudioCaptureClient> CreateCaptureClient(
224 IAudioClient* client); 224 IAudioClient* client);
225 225
226 // Fills up the endpoint rendering buffer with silence for an existing 226 // Fills up the endpoint rendering buffer with silence for an existing
227 // IAudioClient given by |client| and a corresponding IAudioRenderClient 227 // IAudioClient given by |client| and a corresponding IAudioRenderClient
228 // given by |render_client|. 228 // given by |render_client|.
229 static bool FillRenderEndpointBufferWithSilence( 229 static bool FillRenderEndpointBufferWithSilence(
230 IAudioClient* client, IAudioRenderClient* render_client); 230 IAudioClient* client, IAudioRenderClient* render_client);
231 231
232 // Returns true if the given output device is a remote audio endpoint.
233 static bool IsRemoteOutputDevice(const std::string& device_id);
234
232 private: 235 private:
233 CoreAudioUtil() {} 236 CoreAudioUtil() {}
234 ~CoreAudioUtil() {} 237 ~CoreAudioUtil() {}
235 DISALLOW_COPY_AND_ASSIGN(CoreAudioUtil); 238 DISALLOW_COPY_AND_ASSIGN(CoreAudioUtil);
236 }; 239 };
237 240
238 // The special audio session identifier we use when opening up the default 241 // The special audio session identifier we use when opening up the default
239 // communication device. This has the effect that a separate volume control 242 // communication device. This has the effect that a separate volume control
240 // will be shown in the system's volume mixer and control over ducking and 243 // will be shown in the system's volume mixer and control over ducking and
241 // visually observing the behavior of ducking, is easier. 244 // visually observing the behavior of ducking, is easier.
242 // Use with |SharedModeInitialize|. 245 // Use with |SharedModeInitialize|.
243 extern const GUID kCommunicationsSessionId; 246 extern const GUID kCommunicationsSessionId;
244 247
245 } // namespace media 248 } // namespace media
246 249
247 #endif // MEDIA_AUDIO_WIN_CORE_AUDIO_UTIL_WIN_H_ 250 #endif // MEDIA_AUDIO_WIN_CORE_AUDIO_UTIL_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698