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

Side by Side Diff: ppapi/cpp/dev/audio_config_dev.cc

Issue 6281007: Remove dev/audio, dev/audio_config, and dev/audio_trusted... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 | « ppapi/cpp/dev/audio_config_dev.h ('k') | ppapi/cpp/dev/audio_dev.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ppapi/cpp/dev/audio_config_dev.h"
6
7 #include "ppapi/cpp/instance.h"
8 #include "ppapi/cpp/module.h"
9 #include "ppapi/cpp/module_impl.h"
10
11 namespace pp {
12
13 namespace {
14
15 template <> const char* interface_name<PPB_AudioConfig_Dev>() {
16 return PPB_AUDIO_CONFIG_DEV_INTERFACE;
17 }
18
19 } // namespace
20
21 AudioConfig_Dev::AudioConfig_Dev()
22 : sample_rate_(PP_AUDIOSAMPLERATE_NONE),
23 sample_frame_count_(0) {
24 }
25
26 AudioConfig_Dev::AudioConfig_Dev(Instance* instance,
27 PP_AudioSampleRate_Dev sample_rate,
28 uint32_t sample_frame_count)
29 : sample_rate_(sample_rate),
30 sample_frame_count_(sample_frame_count) {
31 if (has_interface<PPB_AudioConfig_Dev>()) {
32 PassRefFromConstructor(
33 get_interface<PPB_AudioConfig_Dev>()->CreateStereo16Bit(
34 instance->pp_instance(), sample_rate, sample_frame_count));
35 }
36 }
37
38 // static
39 uint32_t AudioConfig_Dev::RecommendSampleFrameCount(
40 uint32_t requested_sample_frame_count) {
41 if (!has_interface<PPB_AudioConfig_Dev>())
42 return 0;
43 return get_interface<PPB_AudioConfig_Dev>()->
44 RecommendSampleFrameCount(requested_sample_frame_count);
45 }
46
47 } // namespace pp
48
OLDNEW
« no previous file with comments | « ppapi/cpp/dev/audio_config_dev.h ('k') | ppapi/cpp/dev/audio_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698