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

Side by Side Diff: media/audio/virtual_audio_output_stream.cc

Issue 1542013004: Switch to standard integer types in media/, take 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more stddef Created 4 years, 12 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
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/virtual_audio_output_stream.h" 5 #include "media/audio/virtual_audio_output_stream.h"
6 6
7 #include <stdint.h>
8
7 #include "base/logging.h" 9 #include "base/logging.h"
8 #include "media/audio/virtual_audio_input_stream.h" 10 #include "media/audio/virtual_audio_input_stream.h"
9 11
10 namespace media { 12 namespace media {
11 13
12 VirtualAudioOutputStream::VirtualAudioOutputStream( 14 VirtualAudioOutputStream::VirtualAudioOutputStream(
13 const AudioParameters& params, VirtualAudioInputStream* target, 15 const AudioParameters& params, VirtualAudioInputStream* target,
14 const AfterCloseCallback& after_close_cb) 16 const AfterCloseCallback& after_close_cb)
15 : params_(params), target_input_stream_(target), 17 : params_(params), target_input_stream_(target),
16 after_close_cb_(after_close_cb), callback_(NULL), volume_(1.0f) { 18 after_close_cb_(after_close_cb), callback_(NULL), volume_(1.0f) {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 base::TimeDelta::FromSeconds(1); 85 base::TimeDelta::FromSeconds(1);
84 const int frames = callback_->OnMoreData( 86 const int frames = callback_->OnMoreData(
85 audio_bus, static_cast<uint32_t>(upstream_delay_in_bytes), 0); 87 audio_bus, static_cast<uint32_t>(upstream_delay_in_bytes), 0);
86 if (frames < audio_bus->frames()) 88 if (frames < audio_bus->frames())
87 audio_bus->ZeroFramesPartial(frames, audio_bus->frames() - frames); 89 audio_bus->ZeroFramesPartial(frames, audio_bus->frames() - frames);
88 90
89 return frames > 0 ? volume_ : 0; 91 return frames > 0 ? volume_ : 0;
90 } 92 }
91 93
92 } // namespace media 94 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/virtual_audio_input_stream_unittest.cc ('k') | media/audio/virtual_audio_output_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698