| 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 #ifndef PPAPI_CPP_DEV_AUDIO_INPUT_DEV_H_ | 5 #ifndef PPAPI_CPP_DEV_AUDIO_INPUT_DEV_H_ |
| 6 #define PPAPI_CPP_DEV_AUDIO_INPUT_DEV_H_ | 6 #define PPAPI_CPP_DEV_AUDIO_INPUT_DEV_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ppapi/c/dev/ppb_audio_input_dev.h" | 10 #include "ppapi/c/dev/ppb_audio_input_dev.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 /// @return A mutable reference to the PPB_AudioConfig struct. | 52 /// @return A mutable reference to the PPB_AudioConfig struct. |
| 53 AudioConfig& config() { return config_; } | 53 AudioConfig& config() { return config_; } |
| 54 | 54 |
| 55 /// Getter function for returning the internal <code>PPB_AudioConfig</code> | 55 /// Getter function for returning the internal <code>PPB_AudioConfig</code> |
| 56 /// struct. | 56 /// struct. |
| 57 /// | 57 /// |
| 58 /// @return A const reference to the internal <code>PPB_AudioConfig</code> | 58 /// @return A const reference to the internal <code>PPB_AudioConfig</code> |
| 59 /// struct. | 59 /// struct. |
| 60 const AudioConfig& config() const { return config_; } | 60 const AudioConfig& config() const { return config_; } |
| 61 | 61 |
| 62 // TODO(yzshen, brettw): If we forward declare DeviceRef_Dev (as opposed to | |
| 63 // including its .h file), it still compiles. However, it is not recognized as | |
| 64 // a derived class of Resource and does the wrong thing! | |
| 65 // This is due to the limitation of IsBaseOf in ppapi/cpp/output_traits.h. We | |
| 66 // need to figure out a way to overcome this problem. | |
| 67 int32_t EnumerateDevices( | 62 int32_t EnumerateDevices( |
| 68 const CompletionCallbackWithOutput<std::vector<DeviceRef_Dev> >& | 63 const CompletionCallbackWithOutput<std::vector<DeviceRef_Dev> >& |
| 69 callback); | 64 callback); |
| 70 | 65 |
| 71 /// If |device_ref| is null (i.e., is_null() returns true), the default device | 66 /// If |device_ref| is null (i.e., is_null() returns true), the default device |
| 72 /// will be used. | 67 /// will be used. |
| 73 /// In order to maintain backward compatibility, this method doesn't have | 68 /// In order to maintain backward compatibility, this method doesn't have |
| 74 /// input parameters config, audio_input_callback and user_data. Instead, it | 69 /// input parameters config, audio_input_callback and user_data. Instead, it |
| 75 /// uses those values stored when the 4-parameter constructor was called. | 70 /// uses those values stored when the 4-parameter constructor was called. |
| 76 /// | 71 /// |
| (...skipping 17 matching lines...) Expand all Loading... |
| 94 AudioConfig config_; | 89 AudioConfig config_; |
| 95 | 90 |
| 96 // Used to store the arguments of Open() for the v0.2 interface. | 91 // Used to store the arguments of Open() for the v0.2 interface. |
| 97 PPB_AudioInput_Callback audio_input_callback_; | 92 PPB_AudioInput_Callback audio_input_callback_; |
| 98 void* user_data_; | 93 void* user_data_; |
| 99 }; | 94 }; |
| 100 | 95 |
| 101 } // namespace pp | 96 } // namespace pp |
| 102 | 97 |
| 103 #endif // PPAPI_CPP_DEV_AUDIO_INPUT_DEV_H_ | 98 #endif // PPAPI_CPP_DEV_AUDIO_INPUT_DEV_H_ |
| OLD | NEW |