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

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

Issue 13403002: Add OSX aggregate audio device support for best performance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 8 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_auhal_mac.h" 5 #include "media/audio/mac/audio_auhal_mac.h"
6 6
7 #include <CoreServices/CoreServices.h> 7 #include <CoreServices/CoreServices.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 source_(NULL), 69 source_(NULL),
70 device_(device), 70 device_(device),
71 audio_unit_(0), 71 audio_unit_(0),
72 volume_(1), 72 volume_(1),
73 hardware_latency_frames_(0), 73 hardware_latency_frames_(0),
74 stopped_(false), 74 stopped_(false),
75 input_buffer_list_(NULL) { 75 input_buffer_list_(NULL) {
76 // We must have a manager. 76 // We must have a manager.
77 DCHECK(manager_); 77 DCHECK(manager_);
78 78
79 DVLOG(1) << "Input channels: " << input_channels_; 79 VLOG(1) << "AUHALStream::AUHALStream()";
80 DVLOG(1) << "Output channels: " << output_channels_; 80 VLOG(1) << "Device: " << device;
81 DVLOG(1) << "Sample rate: " << params_.sample_rate(); 81 VLOG(1) << "Input channels: " << input_channels_;
82 DVLOG(1) << "Buffer size: " << number_of_frames_; 82 VLOG(1) << "Output channels: " << output_channels_;
83 VLOG(1) << "Sample rate: " << params_.sample_rate();
84 VLOG(1) << "Buffer size: " << number_of_frames_;
83 } 85 }
84 86
85 AUHALStream::~AUHALStream() { 87 AUHALStream::~AUHALStream() {
86 } 88 }
87 89
88 bool AUHALStream::Open() { 90 bool AUHALStream::Open() {
89 // Get the total number of input and output channels that the 91 // Get the total number of input and output channels that the
90 // hardware supports. 92 // hardware supports.
91 int device_input_channels; 93 int device_input_channels;
92 bool got_input_channels = AudioManagerMac::GetDeviceChannels( 94 bool got_input_channels = AudioManagerMac::GetDeviceChannels(
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 0, 521 0,
520 &callback, 522 &callback,
521 sizeof(callback)); 523 sizeof(callback));
522 if (result != noErr) 524 if (result != noErr)
523 return false; 525 return false;
524 526
525 return true; 527 return true;
526 } 528 }
527 529
528 } // namespace media 530 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698