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 // Software adjust volume of samples, allows each audio stream its own | 5 // Software adjust volume of samples, allows each audio stream its own |
6 // volume without impacting master volume for chrome and other applications. | 6 // volume without impacting master volume for chrome and other applications. |
7 | 7 |
8 // Implemented as templates to allow 8, 16 and 32 bit implementations. | 8 // Implemented as templates to allow 8, 16 and 32 bit implementations. |
9 // 8 bit is unsigned and biased by 128. | 9 // 8 bit is unsigned and biased by 128. |
10 | 10 |
11 // TODO(vrk): This file has been running pretty wild and free, and it's likely | 11 // TODO(vrk): This file has been running pretty wild and free, and it's likely |
12 // that a lot of the functions can be simplified and made more elegant. Revisit | 12 // that a lot of the functions can be simplified and made more elegant. Revisit |
13 // after other audio cleanup is done. (crbug.com/120319) | 13 // after other audio cleanup is done. (crbug.com/120319) |
14 | 14 |
15 #include "media/audio/audio_util.h" | 15 #include "media/audio/audio_util.h" |
16 | 16 |
17 #include "base/command_line.h" | 17 #include "base/command_line.h" |
18 #include "base/string_number_conversions.h" | 18 #include "base/strings/string_number_conversions.h" |
19 #include "base/time.h" | 19 #include "base/time.h" |
20 #include "media/base/media_switches.h" | 20 #include "media/base/media_switches.h" |
21 | 21 |
22 #if defined(OS_WIN) | 22 #if defined(OS_WIN) |
23 #include "base/win/windows_version.h" | 23 #include "base/win/windows_version.h" |
24 #endif | 24 #endif |
25 | 25 |
26 namespace media { | 26 namespace media { |
27 | 27 |
28 // Returns user buffer size as specified on the command line or 0 if no buffer | 28 // Returns user buffer size as specified on the command line or 0 if no buffer |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 // out performance was degraded compared to XP. | 90 // out performance was degraded compared to XP. |
91 // - The regression was fixed in Windows 7 and most configurations will work | 91 // - The regression was fixed in Windows 7 and most configurations will work |
92 // with 2, but some (e.g., some Sound Blasters) still need 3. | 92 // with 2, but some (e.g., some Sound Blasters) still need 3. |
93 // - Some XP configurations (even multi-processor ones) also need 3. | 93 // - Some XP configurations (even multi-processor ones) also need 3. |
94 return (base::win::GetVersion() == base::win::VERSION_VISTA) ? 4 : 3; | 94 return (base::win::GetVersion() == base::win::VERSION_VISTA) ? 4 : 3; |
95 } | 95 } |
96 | 96 |
97 #endif | 97 #endif |
98 | 98 |
99 } // namespace media | 99 } // namespace media |
OLD | NEW |