Chromium Code Reviews| Index: media/audio/audio_util.cc |
| =================================================================== |
| --- media/audio/audio_util.cc (revision 78925) |
| +++ media/audio/audio_util.cc (working copy) |
| @@ -11,6 +11,9 @@ |
| #include "base/basictypes.h" |
| #include "base/logging.h" |
| #include "media/audio/audio_util.h" |
| +#if defined(OS_MACOSX) |
| +#include "media/audio/mac/audio_low_latency_output_mac.h" |
| +#endif |
| namespace media { |
| @@ -219,4 +222,16 @@ |
| } |
| } |
| +double GetAudioHardwareSampleRate() |
| +{ |
|
scherkus (not reviewing)
2011/03/23 04:57:57
nit: chromium style has brackets go on the functio
|
| +#if defined(OS_MACOSX) |
| + // Hardware sample-rate on the Mac can be configured, so we must query. |
|
scherkus (not reviewing)
2011/03/23 04:57:57
nit: two space indent
|
| + return AUAudioOutputStream::HardwareSampleRate(); |
| +#else |
| + // Hardware for Windows and Linux is nearly always 48KHz. |
| + // TODO(crogers) : return correct value in rare non-48KHz cases. |
|
scherkus (not reviewing)
2011/03/23 04:57:57
this isn't quite true... in fact chrome os was shi
|
| + return 48000.0; |
| +#endif |
| +} |
| + |
| } // namespace media |