| OLD | NEW |
| (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 #ifndef PPAPI_CPP_DEV_AUDIO_INPUT_DEV_H_ | |
| 6 #define PPAPI_CPP_DEV_AUDIO_INPUT_DEV_H_ | |
| 7 | |
| 8 #include "ppapi/c/dev/ppb_audio_input_dev.h" | |
| 9 #include "ppapi/cpp/audio_config.h" | |
| 10 #include "ppapi/cpp/resource.h" | |
| 11 | |
| 12 namespace pp { | |
| 13 | |
| 14 class Instance; | |
| 15 | |
| 16 class AudioInput_Dev : public Resource { | |
| 17 public: | |
| 18 /// An empty constructor for an AudioInput resource. | |
| 19 AudioInput_Dev() {} | |
| 20 | |
| 21 AudioInput_Dev(Instance* instance, | |
| 22 const AudioConfig& config, | |
| 23 PPB_AudioInput_Callback callback, | |
| 24 void* user_data); | |
| 25 | |
| 26 /// Getter function for returning the internal <code>PPB_AudioConfig</code> | |
| 27 /// struct. | |
| 28 /// | |
| 29 /// @return A mutable reference to the PPB_AudioConfig struct. | |
| 30 AudioConfig& config() { return config_; } | |
| 31 | |
| 32 /// Getter function for returning the internal <code>PPB_AudioConfig</code> | |
| 33 /// struct. | |
| 34 /// | |
| 35 /// @return A const reference to the internal <code>PPB_AudioConfig</code> | |
| 36 /// struct. | |
| 37 const AudioConfig& config() const { return config_; } | |
| 38 | |
| 39 bool StartCapture(); | |
| 40 bool StopCapture(); | |
| 41 | |
| 42 private: | |
| 43 AudioConfig config_; | |
| 44 }; | |
| 45 | |
| 46 } // namespace pp | |
| 47 | |
| 48 #endif // PPAPI_CPP_DEV_AUDIO_INPUT_DEV_H_ | |
| OLD | NEW |