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

Side by Side Diff: media/audio/cras/cras_unified.cc

Issue 17950002: Fix yet another instance of scoped_ptr<T>(NULL) on ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
« no previous file with comments | « no previous file | 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 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/cras/cras_unified.h" 5 #include "media/audio/cras/cras_unified.h"
6 6
7 #include <cras_client.h> 7 #include <cras_client.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 CrasUnifiedStream::CrasUnifiedStream(const AudioParameters& params, 80 CrasUnifiedStream::CrasUnifiedStream(const AudioParameters& params,
81 AudioManagerCras* manager) 81 AudioManagerCras* manager)
82 : client_(NULL), 82 : client_(NULL),
83 stream_id_(0), 83 stream_id_(0),
84 params_(params), 84 params_(params),
85 bytes_per_frame_(0), 85 bytes_per_frame_(0),
86 is_playing_(false), 86 is_playing_(false),
87 volume_(1.0), 87 volume_(1.0),
88 manager_(manager), 88 manager_(manager),
89 source_callback_(NULL), 89 source_callback_(NULL),
90 input_bus_(NULL),
91 output_bus_(NULL),
92 stream_direction_(CRAS_STREAM_OUTPUT) { 90 stream_direction_(CRAS_STREAM_OUTPUT) {
93 DCHECK(manager_); 91 DCHECK(manager_);
94 DCHECK(params_.channels() > 0); 92 DCHECK(params_.channels() > 0);
95 93
96 // Must have at least one input or output. If there are both they must be the 94 // Must have at least one input or output. If there are both they must be the
97 // same. 95 // same.
98 int input_channels = params_.input_channels(); 96 int input_channels = params_.input_channels();
99 97
100 if (input_channels) { 98 if (input_channels) {
101 // A unified stream for input and output. 99 // A unified stream for input and output.
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 return frames_filled; 358 return frames_filled;
361 } 359 }
362 360
363 void CrasUnifiedStream::NotifyStreamError(int err) { 361 void CrasUnifiedStream::NotifyStreamError(int err) {
364 // This will remove the stream from the client. 362 // This will remove the stream from the client.
365 if (source_callback_) 363 if (source_callback_)
366 source_callback_->OnError(this); 364 source_callback_->OnError(this);
367 } 365 }
368 366
369 } // namespace media 367 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698