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

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

Issue 7206066: Coverity: Initialize member variables. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « media/audio/mac/audio_input_mac.cc ('k') | media/audio/mac/audio_output_mac.cc » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <CoreServices/CoreServices.h> 7 #include <CoreServices/CoreServices.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 29 matching lines...) Expand all
40 // packet is always one frame. 40 // packet is always one frame.
41 format_.mSampleRate = params.sample_rate; 41 format_.mSampleRate = params.sample_rate;
42 format_.mFormatID = kAudioFormatLinearPCM; 42 format_.mFormatID = kAudioFormatLinearPCM;
43 format_.mFormatFlags = kLinearPCMFormatFlagIsPacked | 43 format_.mFormatFlags = kLinearPCMFormatFlagIsPacked |
44 kLinearPCMFormatFlagIsSignedInteger; 44 kLinearPCMFormatFlagIsSignedInteger;
45 format_.mBitsPerChannel = params.bits_per_sample; 45 format_.mBitsPerChannel = params.bits_per_sample;
46 format_.mChannelsPerFrame = params.channels; 46 format_.mChannelsPerFrame = params.channels;
47 format_.mFramesPerPacket = 1; 47 format_.mFramesPerPacket = 1;
48 format_.mBytesPerPacket = (format_.mBitsPerChannel * params.channels) / 8; 48 format_.mBytesPerPacket = (format_.mBitsPerChannel * params.channels) / 8;
49 format_.mBytesPerFrame = format_.mBytesPerPacket; 49 format_.mBytesPerFrame = format_.mBytesPerPacket;
50 format_.mReserved = 0;
50 51
51 // Calculate the number of sample frames per callback. 52 // Calculate the number of sample frames per callback.
52 number_of_frames_ = params.GetPacketSize() / format_.mBytesPerPacket; 53 number_of_frames_ = params.GetPacketSize() / format_.mBytesPerPacket;
53 } 54 }
54 55
55 AUAudioOutputStream::~AUAudioOutputStream() { 56 AUAudioOutputStream::~AUAudioOutputStream() {
56 } 57 }
57 58
58 bool AUAudioOutputStream::Open() { 59 bool AUAudioOutputStream::Open() {
59 // Open and initialize the DefaultOutputUnit. 60 // Open and initialize the DefaultOutputUnit.
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 0, 239 0,
239 0, 240 0,
240 &info_size, 241 &info_size,
241 &nominal_sample_rate); 242 &nominal_sample_rate);
242 DCHECK_EQ(result, 0); 243 DCHECK_EQ(result, 0);
243 if (result) 244 if (result)
244 return 0.0; // error 245 return 0.0; // error
245 246
246 return nominal_sample_rate; 247 return nominal_sample_rate;
247 } 248 }
OLDNEW
« no previous file with comments | « media/audio/mac/audio_input_mac.cc ('k') | media/audio/mac/audio_output_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698