| 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 CONTENT_RENDERER_MEDIA_AUDIO_HARDWARE_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_AUDIO_HARDWARE_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_AUDIO_HARDWARE_H_ | 6 #define CONTENT_RENDERER_MEDIA_AUDIO_HARDWARE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 // Fetch the sample rate of the default audio input end point device. | 22 // Fetch the sample rate of the default audio input end point device. |
| 23 // Must be called from RenderThreadImpl::current(). | 23 // Must be called from RenderThreadImpl::current(). |
| 24 CONTENT_EXPORT int GetInputSampleRate(); | 24 CONTENT_EXPORT int GetInputSampleRate(); |
| 25 | 25 |
| 26 // Fetch the buffer size we use for the default output device. | 26 // Fetch the buffer size we use for the default output device. |
| 27 // Must be called from RenderThreadImpl::current(). | 27 // Must be called from RenderThreadImpl::current(). |
| 28 // Must be used in conjunction with AUDIO_PCM_LOW_LATENCY. | 28 // Must be used in conjunction with AUDIO_PCM_LOW_LATENCY. |
| 29 CONTENT_EXPORT size_t GetOutputBufferSize(); | 29 CONTENT_EXPORT size_t GetOutputBufferSize(); |
| 30 | 30 |
| 31 // Computes a buffer size based on the given |sample_rate|. Must be used in | |
| 32 // conjunction with AUDIO_PCM_LINEAR. | |
| 33 CONTENT_EXPORT size_t GetHighLatencyOutputBufferSize(int sample_rate); | |
| 34 | |
| 35 // Fetch the audio channel layout for the default input device. | 31 // Fetch the audio channel layout for the default input device. |
| 36 // Must be called from RenderThreadImpl::current(). | 32 // Must be called from RenderThreadImpl::current(). |
| 37 CONTENT_EXPORT ChannelLayout GetInputChannelLayout(); | 33 CONTENT_EXPORT ChannelLayout GetInputChannelLayout(); |
| 38 | 34 |
| 39 // Forces the next call to any of the Get functions to query the hardware | 35 // Forces the next call to any of the Get functions to query the hardware |
| 40 // and repopulate the cache. | 36 // and repopulate the cache. |
| 41 CONTENT_EXPORT void ResetCache(); | 37 CONTENT_EXPORT void ResetCache(); |
| 42 | 38 |
| 43 } // namespace audio_hardware | 39 } // namespace audio_hardware |
| 44 | 40 |
| 45 #endif // CONTENT_RENDERER_MEDIA_AUDIO_HARDWARE_H_ | 41 #endif // CONTENT_RENDERER_MEDIA_AUDIO_HARDWARE_H_ |
| OLD | NEW |