| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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_AUDIO_H_ | 5 #ifndef PPAPI_CPP_AUDIO_H_ |
| 6 #define PPAPI_CPP_AUDIO_H_ | 6 #define PPAPI_CPP_AUDIO_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/pp_stdint.h" | 8 #include "ppapi/c/pp_stdint.h" |
| 9 #include "ppapi/c/ppb_audio.h" | 9 #include "ppapi/c/ppb_audio.h" |
| 10 #include "ppapi/cpp/audio_config.h" | 10 #include "ppapi/cpp/audio_config.h" |
| 11 #include "ppapi/cpp/instance.h" | 11 #include "ppapi/cpp/instance.h" |
| 12 #include "ppapi/cpp/resource.h" | 12 #include "ppapi/cpp/resource.h" |
| 13 | 13 |
| 14 /// @file | 14 /// @file |
| 15 /// This file defines the API to create realtime stereo audio streaming | 15 /// This file defines the API to create realtime stereo audio streaming |
| 16 /// capabilities. | 16 /// capabilities. |
| 17 | 17 |
| 18 namespace pp { | 18 namespace pp { |
| 19 | 19 |
| 20 /// An audio resource. Refer to the | 20 /// An audio resource. Refer to the |
| 21 /// <a href="/chrome/nativeclient/docs/audio.html">Pepper | 21 /// <a href="/native-client/devguide/coding/audio">Audio</a> |
| 22 /// Audio API Code Walkthrough</a> for information on using this interface. | 22 /// chapter in the Developer's Guide for information on using this interface. |
| 23 class Audio : public Resource { | 23 class Audio : public Resource { |
| 24 public: | 24 public: |
| 25 | 25 |
| 26 /// An empty constructor for an Audio resource. | 26 /// An empty constructor for an Audio resource. |
| 27 Audio() {} | 27 Audio() {} |
| 28 | 28 |
| 29 /// A constructor that creates an Audio resource. No sound will be heard | 29 /// A constructor that creates an Audio resource. No sound will be heard |
| 30 /// until StartPlayback() is called. The callback is called with the buffer | 30 /// until StartPlayback() is called. The callback is called with the buffer |
| 31 /// address and given user data whenever the buffer needs to be filled. | 31 /// address and given user data whenever the buffer needs to be filled. |
| 32 /// From within the callback, you should not call <code>PPB_Audio</code> | 32 /// From within the callback, you should not call <code>PPB_Audio</code> |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 bool StopPlayback(); | 74 bool StopPlayback(); |
| 75 | 75 |
| 76 private: | 76 private: |
| 77 AudioConfig config_; | 77 AudioConfig config_; |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 } // namespace pp | 80 } // namespace pp |
| 81 | 81 |
| 82 #endif // PPAPI_CPP_AUDIO_H_ | 82 #endif // PPAPI_CPP_AUDIO_H_ |
| 83 | 83 |
| OLD | NEW |