| 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 #include "media/audio/mac/audio_synchronized_mac.h" | 5 #include "media/audio/mac/audio_synchronized_mac.h" |
| 6 | 6 |
| 7 #include <CoreServices/CoreServices.h> | 7 #include <CoreServices/CoreServices.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 target_fifo_frames_(kBaseTargetFifoFrames), | 78 target_fifo_frames_(kBaseTargetFifoFrames), |
| 79 average_delta_(0.0), | 79 average_delta_(0.0), |
| 80 fifo_rate_compensation_(1.0), | 80 fifo_rate_compensation_(1.0), |
| 81 input_unit_(0), | 81 input_unit_(0), |
| 82 varispeed_unit_(0), | 82 varispeed_unit_(0), |
| 83 output_unit_(0), | 83 output_unit_(0), |
| 84 first_input_time_(-1), | 84 first_input_time_(-1), |
| 85 is_running_(false), | 85 is_running_(false), |
| 86 hardware_buffer_size_(kHardwareBufferSize), | 86 hardware_buffer_size_(kHardwareBufferSize), |
| 87 channels_(kChannels) { | 87 channels_(kChannels) { |
| 88 VLOG(1) << "AudioSynchronizedStream::AudioSynchronizedStream()"; |
| 88 } | 89 } |
| 89 | 90 |
| 90 AudioSynchronizedStream::~AudioSynchronizedStream() { | 91 AudioSynchronizedStream::~AudioSynchronizedStream() { |
| 91 DCHECK(!input_unit_); | 92 DCHECK(!input_unit_); |
| 92 DCHECK(!output_unit_); | 93 DCHECK(!output_unit_); |
| 93 DCHECK(!varispeed_unit_); | 94 DCHECK(!varispeed_unit_); |
| 94 } | 95 } |
| 95 | 96 |
| 96 bool AudioSynchronizedStream::Open() { | 97 bool AudioSynchronizedStream::Open() { |
| 97 if (params_.channels() != kChannels) { | 98 if (params_.channels() != kChannels) { |
| (...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 936 &pa, | 937 &pa, |
| 937 0, | 938 0, |
| 938 0, | 939 0, |
| 939 &property_size, | 940 &property_size, |
| 940 &buffer_size_frames_); | 941 &buffer_size_frames_); |
| 941 | 942 |
| 942 OSSTATUS_DCHECK(result == noErr, result); | 943 OSSTATUS_DCHECK(result == noErr, result); |
| 943 } | 944 } |
| 944 | 945 |
| 945 } // namespace media | 946 } // namespace media |
| OLD | NEW |