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

Side by Side Diff: ppapi/shared_impl/ppb_audio_config_shared.cc

Issue 1445003002: Use std::default_delete as the default deleter for scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: How many trial and errors before this builds on the Windows bots Created 5 years, 1 month 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 | « net/quic/crypto/strike_register.cc ('k') | remoting/base/compound_buffer.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) 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 "ppapi/shared_impl/ppb_audio_config_shared.h"
6
7 #include <algorithm>
8
5 #include "build/build_config.h" 9 #include "build/build_config.h"
6 #include "ppapi/shared_impl/ppb_audio_config_shared.h"
7 #include "ppapi/thunk/enter.h" 10 #include "ppapi/thunk/enter.h"
8 #include "ppapi/thunk/ppb_instance_api.h" 11 #include "ppapi/thunk/ppb_instance_api.h"
9 12
10 namespace ppapi { 13 namespace ppapi {
11 14
12 // Rounds up requested_size to the nearest multiple of minimum_size. 15 // Rounds up requested_size to the nearest multiple of minimum_size.
13 static uint32_t CalculateMultipleOfSampleFrameCount(uint32_t minimum_size, 16 static uint32_t CalculateMultipleOfSampleFrameCount(uint32_t minimum_size,
14 uint32_t requested_size) { 17 uint32_t requested_size) {
15 const uint32_t multiple = (requested_size + minimum_size - 1) / minimum_size; 18 const uint32_t multiple = (requested_size + minimum_size - 1) / minimum_size;
16 return std::min(minimum_size * multiple, 19 return std::min(minimum_size * multiple,
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 if (sample_frame_count > PP_AUDIOMAXSAMPLEFRAMECOUNT || 172 if (sample_frame_count > PP_AUDIOMAXSAMPLEFRAMECOUNT ||
170 sample_frame_count < PP_AUDIOMINSAMPLEFRAMECOUNT) 173 sample_frame_count < PP_AUDIOMINSAMPLEFRAMECOUNT)
171 return false; 174 return false;
172 175
173 sample_rate_ = sample_rate; 176 sample_rate_ = sample_rate;
174 sample_frame_count_ = sample_frame_count; 177 sample_frame_count_ = sample_frame_count;
175 return true; 178 return true;
176 } 179 }
177 180
178 } // namespace ppapi 181 } // namespace ppapi
OLDNEW
« no previous file with comments | « net/quic/crypto/strike_register.cc ('k') | remoting/base/compound_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698