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

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

Issue 8138008: Implementation of ppapi audio. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 2 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
Property Changes:
Added: svn:executable
+ *
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ppapi/cpp/dev/audio_input_dev.h"
6
7 #include "ppapi/c/dev/ppb_audio_input_dev.h"
8 #include "ppapi/c/pp_errors.h"
9 #include "ppapi/cpp/instance.h"
10 #include "ppapi/cpp/module.h"
11 #include "ppapi/cpp/module_impl.h"
12
13 namespace pp {
14
15 namespace {
16
17 template <> const char* interface_name<PPB_AudioInput_Dev>() {
18 return PPB_AUDIO_INPUT_DEV_INTERFACE;
19 }
20
21 } // namespace
22
23 AudioInput_Dev::AudioInput_Dev(Instance* instance,
24 PPB_AudioInput_Callback callback,
25 void* user_data) {
26 if (has_interface<PPB_AudioInput_Dev>()) {
27 PassRefFromConstructor(get_interface<PPB_AudioInput_Dev>()->Create(
28 instance->pp_instance(), callback, user_data));
29 }
30 }
31
32 bool AudioInput_Dev::StartCapture() {
33 return has_interface<PPB_AudioInput_Dev>() &&
34 get_interface<PPB_AudioInput_Dev>()->StartCapture(pp_resource());
35 }
36
37 bool AudioInput_Dev::StopCapture() {
38 return has_interface<PPB_AudioInput_Dev>() &&
39 get_interface<PPB_AudioInput_Dev>()->StopCapture(pp_resource());
40 }
41
42 } // namespace pp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698