Chromium Code Reviews| Index: ppapi/examples/audio_input/audio_input.cc |
| diff --git a/ppapi/examples/audio_input/audio_input.cc b/ppapi/examples/audio_input/audio_input.cc |
| index 7aff669e4db31e2f6e21a9523d59059db1deb428..7d156b72e6381d00b6fcde660edc262a66c6507c 100644 |
| --- a/ppapi/examples/audio_input/audio_input.cc |
| +++ b/ppapi/examples/audio_input/audio_input.cc |
| @@ -114,6 +114,8 @@ class MyInstance : public pp::Instance { |
| audio_input_ = pp::AudioInput_Dev(); |
| } else if (event == "Stop") { |
| Stop(); |
| + } else if (event == "Start") { |
| + Start(); |
| } |
| } else if (message_data.is_number()) { |
| int index = message_data.AsInt(); |
| @@ -229,6 +231,16 @@ class MyInstance : public pp::Instance { |
| } |
| } |
| + void Start() { |
| + if (!audio_input_.is_null()) { |
| + if (!audio_input_.StartCapture()) |
|
no longer working on chromium
2012/03/18 00:38:59
hasn't this function been changed to void?
yzshen1
2012/03/19 21:47:54
We changed PlatformAudioInput::StartCapture() to r
|
| + PostMessage(pp::Var("StartFailed")); |
| + } else if (audio_input_0_1_ != 0) { |
| + if (!audio_input_interface_0_1_->StartCapture(audio_input_0_1_)) |
| + PostMessage(pp::Var("StartFailed")); |
| + } |
| + } |
| + |
| void EnumerateDevicesFinished(int32_t result) { |
| static const char* const kDelimiter = "#__#"; |