| 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_AUDIO_UTIL_H_ | 5 #ifndef MEDIA_AUDIO_AUDIO_UTIL_H_ |
| 6 #define MEDIA_AUDIO_AUDIO_UTIL_H_ | 6 #define MEDIA_AUDIO_AUDIO_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 // Returns the audio input hardware sample-rate for the specified device. | 45 // Returns the audio input hardware sample-rate for the specified device. |
| 46 MEDIA_EXPORT int GetAudioInputHardwareSampleRate( | 46 MEDIA_EXPORT int GetAudioInputHardwareSampleRate( |
| 47 const std::string& device_id); | 47 const std::string& device_id); |
| 48 | 48 |
| 49 // Returns the optimal low-latency buffer size for the audio hardware. | 49 // Returns the optimal low-latency buffer size for the audio hardware. |
| 50 // This is the smallest buffer size the system can comfortably render | 50 // This is the smallest buffer size the system can comfortably render |
| 51 // at without glitches. The buffer size is in sample-frames. | 51 // at without glitches. The buffer size is in sample-frames. |
| 52 MEDIA_EXPORT size_t GetAudioHardwareBufferSize(); | 52 MEDIA_EXPORT size_t GetAudioHardwareBufferSize(); |
| 53 | 53 |
| 54 MEDIA_EXPORT int GetAudioHardwareOutputChannels(); |
| 55 |
| 54 // Returns the channel layout for the specified audio input device. | 56 // Returns the channel layout for the specified audio input device. |
| 55 MEDIA_EXPORT ChannelLayout GetAudioInputHardwareChannelLayout( | 57 MEDIA_EXPORT ChannelLayout GetAudioInputHardwareChannelLayout( |
| 56 const std::string& device_id); | 58 const std::string& device_id); |
| 57 | 59 |
| 58 // Computes a buffer size based on the given |sample_rate|. Must be used in | 60 // Computes a buffer size based on the given |sample_rate|. Must be used in |
| 59 // conjunction with AUDIO_PCM_LINEAR. | 61 // conjunction with AUDIO_PCM_LINEAR. |
| 60 MEDIA_EXPORT size_t GetHighLatencyOutputBufferSize(int sample_rate); | 62 MEDIA_EXPORT size_t GetHighLatencyOutputBufferSize(int sample_rate); |
| 61 | 63 |
| 62 #if defined(OS_WIN) | 64 #if defined(OS_WIN) |
| 63 | 65 |
| 64 // Returns number of buffers to be used by wave out. | 66 // Returns number of buffers to be used by wave out. |
| 65 MEDIA_EXPORT int NumberOfWaveOutBuffers(); | 67 MEDIA_EXPORT int NumberOfWaveOutBuffers(); |
| 66 | 68 |
| 67 #endif // defined(OS_WIN) | 69 #endif // defined(OS_WIN) |
| 68 | 70 |
| 69 } // namespace media | 71 } // namespace media |
| 70 | 72 |
| 71 #endif // MEDIA_AUDIO_AUDIO_UTIL_H_ | 73 #endif // MEDIA_AUDIO_AUDIO_UTIL_H_ |
| OLD | NEW |