Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Side by Side Diff: ppapi/cpp/audio_config.h

Issue 9421037: Added @code/@endcode and removed .html (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« ppapi/c/ppb_messaging.h ('K') | « ppapi/c/ppp_messaging.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
cstefansen 2012/02/21 18:43:37 2012
jond 2012/02/27 20:31:49 Done.
jond 2012/02/27 20:31:49 Done.
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
(...skipping 21 matching lines...) Expand all
33 /// <code>buffer16[2]</code> is the second left channel sample. 33 /// <code>buffer16[2]</code> is the second left channel sample.
34 /// <code>buffer16[3]</code> is the second right channel sample. 34 /// <code>buffer16[3]</code> is the second right channel sample.
35 /// <code>...</code> 35 /// <code>...</code>
36 /// <code>buffer16[2 * (sample_frame_count - 1)]</code> is the last left 36 /// <code>buffer16[2 * (sample_frame_count - 1)]</code> is the last left
37 /// channel sample. 37 /// channel sample.
38 /// <code>buffer16[2 * (sample_frame_count - 1) + 1]</code> is the last right 38 /// <code>buffer16[2 * (sample_frame_count - 1) + 1]</code> is the last right
39 /// channel sample. 39 /// channel sample.
40 /// Data will always be in the native endian format of the platform. 40 /// Data will always be in the native endian format of the platform.
41 /// 41 ///
42 /// <strong>Example:</strong> 42 /// <strong>Example:</strong>
43 /// <code> 43 /// @code
44 /// 44 ///
45 /// // Create an audio config with a supported frame count. 45 /// // Create an audio config with a supported frame count.
46 /// uint32_t sample_frame_count = AudioConfig::RecommendSampleFrameCount( 46 /// uint32_t sample_frame_count = AudioConfig::RecommendSampleFrameCount(
47 /// PP_AUDIOSAMPLERATE_44100, 4096); 47 /// PP_AUDIOSAMPLERATE_44100, 4096);
48 /// AudioConfig config(PP_AUDIOSAMPLERATE_44100, sample_frame_count); 48 /// AudioConfig config(PP_AUDIOSAMPLERATE_44100, sample_frame_count);
49 /// if (config.is_null()) 49 /// if (config.is_null())
50 /// return false; // Couldn't configure audio. 50 /// return false; // Couldn't configure audio.
51 /// 51 ///
52 /// // Then use the config to create your audio resource. 52 /// // Then use the config to create your audio resource.
53 /// Audio audio(instance, config, callback, user_data); 53 /// Audio audio(instance, config, callback, user_data);
54 /// if (audio.is_null()) 54 /// if (audio.is_null())
55 /// return false; // Couldn't create audio. 55 /// return false; // Couldn't create audio.
56 /// </code> 56 /// @endcode
57 class AudioConfig : public Resource { 57 class AudioConfig : public Resource {
58 public: 58 public:
59 /// An empty constructor for an <code>AudioConfig</code> resource. 59 /// An empty constructor for an <code>AudioConfig</code> resource.
60 AudioConfig(); 60 AudioConfig();
61 61
62 /// A constructor that creates an audio config based on the given sample rate 62 /// A constructor that creates an audio config based on the given sample rate
63 /// and frame count. If the rate and frame count aren't supported, the 63 /// and frame count. If the rate and frame count aren't supported, the
64 /// resulting resource will be is_null(). You can pass the result of 64 /// resulting resource will be is_null(). You can pass the result of
65 /// RecommendSampleFrameCount() as the sample frame count. 65 /// RecommendSampleFrameCount() as the sample frame count.
66 /// 66 ///
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 private: 113 private:
114 PP_AudioSampleRate sample_rate_; 114 PP_AudioSampleRate sample_rate_;
115 uint32_t sample_frame_count_; 115 uint32_t sample_frame_count_;
116 }; 116 };
117 117
118 } // namespace pp 118 } // namespace pp
119 119
120 #endif // PPAPI_CPP_AUDIO_CONFIG_H_ 120 #endif // PPAPI_CPP_AUDIO_CONFIG_H_
121 121
OLDNEW
« ppapi/c/ppb_messaging.h ('K') | « ppapi/c/ppp_messaging.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698