Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: audio/mac/audio_low_latency_output_mac.cc

Issue 10833028: Make audio build on the Mac OS X 10.7 (Closed) Base URL: http://src.chromium.org/svn/trunk/src/media/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "media/audio/mac/audio_low_latency_output_mac.h" 5 #include "media/audio/mac/audio_low_latency_output_mac.h"
6 6
7 #include <CoreAudio/HostTime.h>
7 #include <CoreServices/CoreServices.h> 8 #include <CoreServices/CoreServices.h>
8 9
9 #include "base/basictypes.h" 10 #include "base/basictypes.h"
10 #include "base/logging.h" 11 #include "base/logging.h"
11 #include "base/mac/mac_logging.h" 12 #include "base/mac/mac_logging.h"
12 #include "media/audio/audio_util.h" 13 #include "media/audio/audio_util.h"
13 #include "media/audio/mac/audio_manager_mac.h" 14 #include "media/audio/mac/audio_manager_mac.h"
14 15
15 namespace media { 16 namespace media {
16 17
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 UInt64 output_time_ns = AudioConvertHostTimeToNanos( 348 UInt64 output_time_ns = AudioConvertHostTimeToNanos(
348 output_time_stamp->mHostTime); 349 output_time_stamp->mHostTime);
349 UInt64 now_ns = AudioConvertHostTimeToNanos(AudioGetCurrentHostTime()); 350 UInt64 now_ns = AudioConvertHostTimeToNanos(AudioGetCurrentHostTime());
350 double delay_frames = static_cast<double> 351 double delay_frames = static_cast<double>
351 (1e-9 * (output_time_ns - now_ns) * format_.mSampleRate); 352 (1e-9 * (output_time_ns - now_ns) * format_.mSampleRate);
352 353
353 return (delay_frames + hardware_latency_frames_); 354 return (delay_frames + hardware_latency_frames_);
354 } 355 }
355 356
356 } // namespace media 357 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698