| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_BASE_AUDIO_LATENCY_H_ | 5 #ifndef MEDIA_BASE_AUDIO_LATENCY_H_ |
| 6 #define MEDIA_BASE_AUDIO_LATENCY_H_ | 6 #define MEDIA_BASE_AUDIO_LATENCY_H_ |
| 7 | 7 |
| 8 #include "media/base/media_export.h" | 8 #include "media/base/media_export.h" |
| 9 | 9 |
| 10 namespace base { | 10 namespace base { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 int preferred_buffer_size); | 36 int preferred_buffer_size); |
| 37 | 37 |
| 38 // |hardware_buffer_size| should be set to 0 if unknown/invalid/not preferred. | 38 // |hardware_buffer_size| should be set to 0 if unknown/invalid/not preferred. |
| 39 static int GetRtcBufferSize(int sample_rate, int hardware_buffer_size); | 39 static int GetRtcBufferSize(int sample_rate, int hardware_buffer_size); |
| 40 | 40 |
| 41 static int GetInteractiveBufferSize(int hardware_buffer_size); | 41 static int GetInteractiveBufferSize(int hardware_buffer_size); |
| 42 | 42 |
| 43 static int GetExactBufferSize(base::TimeDelta duration, | 43 static int GetExactBufferSize(base::TimeDelta duration, |
| 44 int sample_rate, | 44 int sample_rate, |
| 45 int hardware_buffer_size); | 45 int hardware_buffer_size); |
| 46 |
| 47 static int GetMinimumAudioBufferSize(int sample_rate); |
| 48 static int GetMaximumAudioBufferSize(int sample_rate); |
| 49 static int GetDefaultAudioBufferSize(bool is_input, int sample_rate); |
| 46 }; | 50 }; |
| 47 | 51 |
| 48 } // namespace media | 52 } // namespace media |
| 49 | 53 |
| 50 #endif // MEDIA_BASE_AUDIO_LATENCY_H_ | 54 #endif // MEDIA_BASE_AUDIO_LATENCY_H_ |
| OLD | NEW |