OLD | NEW |
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" | 5 #include "ppapi/shared_impl/ppb_audio_config_shared.h" |
6 #include "ppapi/thunk/enter.h" | 6 #include "ppapi/thunk/enter.h" |
| 7 #include "ppapi/thunk/ppb_instance_api.h" |
7 | 8 |
8 namespace ppapi { | 9 namespace ppapi { |
9 | 10 |
10 PPB_AudioConfig_Shared::PPB_AudioConfig_Shared(ResourceObjectType type, | 11 PPB_AudioConfig_Shared::PPB_AudioConfig_Shared(ResourceObjectType type, |
11 PP_Instance instance) | 12 PP_Instance instance) |
12 : Resource(type, instance), | 13 : Resource(type, instance), |
13 sample_rate_(PP_AUDIOSAMPLERATE_NONE), | 14 sample_rate_(PP_AUDIOSAMPLERATE_NONE), |
14 sample_frame_count_(0) { | 15 sample_frame_count_(0) { |
15 } | 16 } |
16 | 17 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 if (sample_frame_count > PP_AUDIOMAXSAMPLEFRAMECOUNT || | 125 if (sample_frame_count > PP_AUDIOMAXSAMPLEFRAMECOUNT || |
125 sample_frame_count < PP_AUDIOMINSAMPLEFRAMECOUNT) | 126 sample_frame_count < PP_AUDIOMINSAMPLEFRAMECOUNT) |
126 return false; | 127 return false; |
127 | 128 |
128 sample_rate_ = sample_rate; | 129 sample_rate_ = sample_rate; |
129 sample_frame_count_ = sample_frame_count; | 130 sample_frame_count_ = sample_frame_count; |
130 return true; | 131 return true; |
131 } | 132 } |
132 | 133 |
133 } // namespace ppapi | 134 } // namespace ppapi |
OLD | NEW |