OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef PPAPI_CPP_DEV_AUDIO_DEV_H_ | 5 #ifndef PPAPI_CPP_DEV_AUDIO_DEV_H_ |
6 #define PPAPI_CPP_DEV_AUDIO_DEV_H_ | 6 #define PPAPI_CPP_DEV_AUDIO_DEV_H_ |
7 | 7 |
8 #include "ppapi/c/pp_stdint.h" | 8 #include "ppapi/c/pp_stdint.h" |
9 #include "ppapi/c/dev/ppb_audio_dev.h" | 9 #include "ppapi/c/dev/ppb_audio_dev.h" |
10 #include "ppapi/cpp/dev/audio_config_dev.h" | 10 #include "ppapi/cpp/dev/audio_config_dev.h" |
11 #include "ppapi/cpp/dev/buffer_dev.h" | 11 #include "ppapi/cpp/dev/buffer_dev.h" |
12 #include "ppapi/cpp/instance.h" | 12 #include "ppapi/cpp/instance.h" |
13 #include "ppapi/cpp/resource.h" | 13 #include "ppapi/cpp/resource.h" |
14 | 14 |
15 namespace pp { | 15 namespace pp { |
16 | 16 |
17 class Audio_Dev : public Resource { | 17 class Audio_Dev : public Resource { |
18 public: | 18 public: |
19 Audio_Dev() {} | 19 Audio_Dev() {} |
20 Audio_Dev(const Instance& instance, | 20 Audio_Dev(Instance* instance, |
21 const AudioConfig_Dev& config, | 21 const AudioConfig_Dev& config, |
22 PPB_Audio_Callback callback, | 22 PPB_Audio_Callback callback, |
23 void* user_data); | 23 void* user_data); |
24 | 24 |
25 AudioConfig_Dev& config() { return config_; } | 25 AudioConfig_Dev& config() { return config_; } |
26 const AudioConfig_Dev& config() const { return config_; } | 26 const AudioConfig_Dev& config() const { return config_; } |
27 | 27 |
28 bool StartPlayback(); | 28 bool StartPlayback(); |
29 bool StopPlayback(); | 29 bool StopPlayback(); |
30 | 30 |
31 private: | 31 private: |
32 AudioConfig_Dev config_; | 32 AudioConfig_Dev config_; |
33 }; | 33 }; |
34 | 34 |
35 } // namespace pp | 35 } // namespace pp |
36 | 36 |
37 #endif // PPAPI_CPP_DEV_AUDIO_DEV_H_ | 37 #endif // PPAPI_CPP_DEV_AUDIO_DEV_H_ |
38 | 38 |
OLD | NEW |