| 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_AUDIO_CONFIG_H_ | 5 #ifndef PPAPI_CPP_AUDIO_CONFIG_H_ |
| 6 #define PPAPI_CPP_AUDIO_CONFIG_H_ | 6 #define PPAPI_CPP_AUDIO_CONFIG_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/ppb_audio_config.h" | 8 #include "ppapi/c/ppb_audio_config.h" |
| 9 #include "ppapi/c/pp_stdint.h" | 9 #include "ppapi/c/pp_stdint.h" |
| 10 #include "ppapi/cpp/resource.h" | 10 #include "ppapi/cpp/resource.h" |
| 11 | 11 |
| 12 | |
| 13 /// @file | 12 /// @file |
| 14 /// This file defines the interface for establishing an | 13 /// This file defines the interface for establishing an |
| 15 /// audio configuration resource within the browser. | 14 /// audio configuration resource within the browser. |
| 16 | 15 |
| 17 namespace pp { | 16 namespace pp { |
| 18 | 17 |
| 19 class InstanceHandle; | 18 class InstanceHandle; |
| 20 | 19 |
| 21 /// A 16 bit stereo AudioConfig resource. Refer to the | 20 /// A 16 bit stereo AudioConfig resource. Refer to the |
| 22 /// <a href="/native-client/{{pepperversion}}/devguide/coding/audio">Audio | 21 /// <a href="/native-client/{{pepperversion}}/devguide/coding/audio">Audio |
| 23 /// </a> chapter in the Developer's Guide for information on using this | 22 /// </a>chapter in the Developer's Guide for information on using this |
| 24 /// interface. | 23 /// interface. |
| 25 /// | 24 /// |
| 26 /// A single sample frame on a stereo device means one value for the left | 25 /// A single sample frame on a stereo device means one value for the left |
| 27 /// channel and one value for the right channel. | 26 /// channel and one value for the right channel. |
| 28 /// | 27 /// |
| 29 /// Buffer layout for a stereo int16 configuration: | 28 /// Buffer layout for a stereo int16 configuration: |
| 30 /// | 29 /// |
| 31 /// <code>int16_t *buffer16;</code> | 30 /// <code>int16_t *buffer16;</code> |
| 32 /// <code>buffer16[0]</code> is the first left channel sample. | 31 /// <code>buffer16[0]</code> is the first left channel sample. |
| 33 /// <code>buffer16[1]</code> is the first right channel sample. | 32 /// <code>buffer16[1]</code> is the first right channel sample. |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 | 123 |
| 125 private: | 124 private: |
| 126 PP_AudioSampleRate sample_rate_; | 125 PP_AudioSampleRate sample_rate_; |
| 127 uint32_t sample_frame_count_; | 126 uint32_t sample_frame_count_; |
| 128 }; | 127 }; |
| 129 | 128 |
| 130 } // namespace pp | 129 } // namespace pp |
| 131 | 130 |
| 132 #endif // PPAPI_CPP_AUDIO_CONFIG_H_ | 131 #endif // PPAPI_CPP_AUDIO_CONFIG_H_ |
| 133 | 132 |
| OLD | NEW |