OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Contains limit definition constants for the media subsystem. | 5 // Contains limit definition constants for the media subsystem. |
6 | 6 |
7 #ifndef MEDIA_BASE_LIMITS_H_ | 7 #ifndef MEDIA_BASE_LIMITS_H_ |
8 #define MEDIA_BASE_LIMITS_H_ | 8 #define MEDIA_BASE_LIMITS_H_ |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 // | 27 // |
28 // A few notes on sample rates of common formats: | 28 // A few notes on sample rates of common formats: |
29 // - AAC files are limited to 96 kHz. | 29 // - AAC files are limited to 96 kHz. |
30 // - MP3 files are limited to 48 kHz. | 30 // - MP3 files are limited to 48 kHz. |
31 // - Vorbis used to be limited to 96 KHz, but no longer has that | 31 // - Vorbis used to be limited to 96 KHz, but no longer has that |
32 // restriction. | 32 // restriction. |
33 // - Most PC audio hardware is limited to 192 KHz. | 33 // - Most PC audio hardware is limited to 192 KHz. |
34 kMaxSampleRate = 192000, | 34 kMaxSampleRate = 192000, |
35 kMinSampleRate = 3000, | 35 kMinSampleRate = 3000, |
36 kMaxChannels = 32, | 36 kMaxChannels = 32, |
37 kMaxBitsPerSample = 64, | 37 kMaxBitsPerSample = 32, |
38 kMaxSamplesPerPacket = kMaxSampleRate, | 38 kMaxSamplesPerPacket = kMaxSampleRate, |
39 kMaxPacketSizeInBytes = | 39 kMaxPacketSizeInBytes = |
40 (kMaxBitsPerSample / 8) * kMaxChannels * kMaxSamplesPerPacket, | 40 (kMaxBitsPerSample / 8) * kMaxChannels * kMaxSamplesPerPacket, |
41 }; | 41 }; |
42 | 42 |
43 } // namespace limits | 43 } // namespace limits |
44 | 44 |
45 } // namespace media | 45 } // namespace media |
46 | 46 |
47 #endif // MEDIA_BASE_LIMITS_H_ | 47 #endif // MEDIA_BASE_LIMITS_H_ |
OLD | NEW |