| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 // | |
| 5 #ifndef CONTENT_RENDERER_MEDIA_AUDIO_HARDWARE_H_ | |
| 6 #define CONTENT_RENDERER_MEDIA_AUDIO_HARDWARE_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "content/common/content_export.h" | |
| 10 #include "media/base/channel_layout.h" | |
| 11 | |
| 12 // This file contains static methods to query audio hardware properties from | |
| 13 // the browser process. Values are cached to avoid unnecessary round trips, | |
| 14 // but the cache can be cleared if needed (currently only used by tests). | |
| 15 | |
| 16 namespace content { | |
| 17 | |
| 18 // Fetch the sample rate of the default audio output end point device. | |
| 19 // Must be called from RenderThreadImpl::current(). | |
| 20 CONTENT_EXPORT int GetAudioOutputSampleRate(); | |
| 21 | |
| 22 // Fetch the sample rate of the default audio input end point device. | |
| 23 // Must be called from RenderThreadImpl::current(). | |
| 24 CONTENT_EXPORT int GetAudioInputSampleRate(); | |
| 25 | |
| 26 // Fetch the buffer size we use for the default output device. | |
| 27 // Must be called from RenderThreadImpl::current(). | |
| 28 // Must be used in conjunction with AUDIO_PCM_LOW_LATENCY. | |
| 29 CONTENT_EXPORT size_t GetAudioOutputBufferSize(); | |
| 30 | |
| 31 // Fetch the audio channel layout for the default input device. | |
| 32 // Must be called from RenderThreadImpl::current(). | |
| 33 CONTENT_EXPORT media::ChannelLayout GetAudioInputChannelLayout(); | |
| 34 | |
| 35 // Forces the next call to any of the Get functions to query the hardware | |
| 36 // and repopulate the cache. | |
| 37 CONTENT_EXPORT void ResetAudioCache(); | |
| 38 } // namespace content | |
| 39 | |
| 40 #endif // CONTENT_RENDERER_MEDIA_AUDIO_HARDWARE_H_ | |
| OLD | NEW |