| 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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 // Note: that function correctly returns that Windows Server 2003 does not | 518 // Note: that function correctly returns that Windows Server 2003 does not |
| 519 // support WASAPI. | 519 // support WASAPI. |
| 520 return base::win::GetVersion() >= base::win::VERSION_VISTA; | 520 return base::win::GetVersion() >= base::win::VERSION_VISTA; |
| 521 } | 521 } |
| 522 | 522 |
| 523 int NumberOfWaveOutBuffers() { | 523 int NumberOfWaveOutBuffers() { |
| 524 // Simple heuristic: use 3 buffers on single-core system or on Vista, | 524 // Simple heuristic: use 3 buffers on single-core system or on Vista, |
| 525 // 2 otherwise. | 525 // 2 otherwise. |
| 526 // Entire Windows audio stack was rewritten for Windows Vista, and wave out | 526 // Entire Windows audio stack was rewritten for Windows Vista, and wave out |
| 527 // API is simulated on top of new API, so there is noticeable performance | 527 // API is simulated on top of new API, so there is noticeable performance |
| 528 // degradation compared to Windows XP. Part of regression was fixed in | 528 // degradation compared to Windows XP. Part of regression was apparently fixed |
| 529 // Windows 7. Maybe it is fixed in Vista Serice Pack, but let's be cautious. | 529 // in Windows 7, but problems remain at least with some configurations. |
| 530 if ((base::SysInfo::NumberOfProcessors() < 2) || | 530 if ((base::SysInfo::NumberOfProcessors() < 2) || |
| 531 (base::win::GetVersion() == base::win::VERSION_VISTA)) { | 531 (base::win::GetVersion() >= base::win::VERSION_VISTA)) { |
| 532 return 3; | 532 return 3; |
| 533 } | 533 } |
| 534 return 2; | 534 return 2; |
| 535 } | 535 } |
| 536 | 536 |
| 537 #endif | 537 #endif |
| 538 | 538 |
| 539 } // namespace media | 539 } // namespace media |
| OLD | NEW |