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 |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
540 // support WASAPI. | 540 // support WASAPI. |
541 return base::win::GetVersion() >= base::win::VERSION_VISTA; | 541 return base::win::GetVersion() >= base::win::VERSION_VISTA; |
542 } | 542 } |
543 | 543 |
544 int NumberOfWaveOutBuffers() { | 544 int NumberOfWaveOutBuffers() { |
545 // Simple heuristic: use 3 buffers on single-core system or on Vista, | 545 // Simple heuristic: use 3 buffers on single-core system or on Vista, |
546 // 2 otherwise. | 546 // 2 otherwise. |
547 // Entire Windows audio stack was rewritten for Windows Vista, and wave out | 547 // Entire Windows audio stack was rewritten for Windows Vista, and wave out |
548 // API is simulated on top of new API, so there is noticeable performance | 548 // API is simulated on top of new API, so there is noticeable performance |
549 // degradation compared to Windows XP. Part of regression was fixed in | 549 // degradation compared to Windows XP. Part of regression was fixed in |
550 // Windows 7. Maybe it is fixed in Vista Serice Pack, but let's be cautious. | 550 // Windows 7. Maybe it is fixed in Vista Serice Pack, but let's be cautious. |
cpu_(ooo_6.6-7.5)
2012/07/31 02:20:13
remove the "was fixed in windows 7"
scherkus (not reviewing)
2012/07/31 02:21:35
+1
| |
551 if ((base::SysInfo::NumberOfProcessors() < 2) || | 551 if ((base::SysInfo::NumberOfProcessors() < 2) || |
552 (base::win::GetVersion() == base::win::VERSION_VISTA)) { | 552 (base::win::GetVersion() >= base::win::VERSION_VISTA)) { |
553 return 3; | 553 return 3; |
554 } | 554 } |
555 return 2; | 555 return 2; |
556 } | 556 } |
557 | 557 |
558 #endif | 558 #endif |
559 | 559 |
560 } // namespace media | 560 } // namespace media |
OLD | NEW |