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

Side by Side Diff: media/audio/mac/audio_low_latency_input_mac.cc

Issue 2028023002: Use valid log callback for audio modem's audio recorder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « media/audio/mac/audio_auhal_mac.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_input_mac.h" 5 #include "media/audio/mac/audio_low_latency_input_mac.h"
6 #include <CoreServices/CoreServices.h> 6 #include <CoreServices/CoreServices.h>
7 #include <mach/mach.h> 7 #include <mach/mach.h>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 last_number_of_frames_(0), 263 last_number_of_frames_(0),
264 total_lost_frames_(0), 264 total_lost_frames_(0),
265 largest_glitch_frames_(0), 265 largest_glitch_frames_(0),
266 glitches_detected_(0), 266 glitches_detected_(0),
267 number_of_restart_indications_(0), 267 number_of_restart_indications_(0),
268 number_of_restart_attempts_(0), 268 number_of_restart_attempts_(0),
269 total_number_of_restart_attempts_(0), 269 total_number_of_restart_attempts_(0),
270 log_callback_(log_callback), 270 log_callback_(log_callback),
271 weak_factory_(this) { 271 weak_factory_(this) {
272 DCHECK(manager_); 272 DCHECK(manager_);
273 DCHECK(!log_callback_.Equals(AudioManager::LogCallback())); 273 CHECK(!log_callback_.Equals(AudioManager::LogCallback()));
274 274
275 // Set up the desired (output) format specified by the client. 275 // Set up the desired (output) format specified by the client.
276 format_.mSampleRate = input_params.sample_rate(); 276 format_.mSampleRate = input_params.sample_rate();
277 format_.mFormatID = kAudioFormatLinearPCM; 277 format_.mFormatID = kAudioFormatLinearPCM;
278 format_.mFormatFlags = kLinearPCMFormatFlagIsPacked | 278 format_.mFormatFlags = kLinearPCMFormatFlagIsPacked |
279 kLinearPCMFormatFlagIsSignedInteger; 279 kLinearPCMFormatFlagIsSignedInteger;
280 DCHECK(FormatIsInterleaved(format_.mFormatFlags)); 280 DCHECK(FormatIsInterleaved(format_.mFormatFlags));
281 format_.mBitsPerChannel = input_params.bits_per_sample(); 281 format_.mBitsPerChannel = input_params.bits_per_sample();
282 format_.mChannelsPerFrame = input_params.channels(); 282 format_.mChannelsPerFrame = input_params.channels();
283 format_.mFramesPerPacket = 1; // uncompressed audio 283 format_.mFramesPerPacket = 1; // uncompressed audio
(...skipping 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after
1671 1671
1672 number_of_frames_provided_ = 0; 1672 number_of_frames_provided_ = 0;
1673 glitches_detected_ = 0; 1673 glitches_detected_ = 0;
1674 last_sample_time_ = 0; 1674 last_sample_time_ = 0;
1675 last_number_of_frames_ = 0; 1675 last_number_of_frames_ = 0;
1676 total_lost_frames_ = 0; 1676 total_lost_frames_ = 0;
1677 largest_glitch_frames_ = 0; 1677 largest_glitch_frames_ = 0;
1678 } 1678 }
1679 1679
1680 } // namespace media 1680 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/mac/audio_auhal_mac.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698