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

Side by Side Diff: native_client_sdk/doc_generated/devguide/coding/audio.html

Issue 146203002: [NaCl SDK Docs] Remove table-of-contents from generated pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add .gitignore for .buildinfo Created 6 years, 11 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
OLDNEW
1 {{+bindTo:partials.standard_nacl_article}} 1 {{+bindTo:partials.standard_nacl_article}}
2 2
3 <section id="audio"> 3 <section id="audio">
4 <span id="devguide-coding-audio"></span><h1 id="audio"><span id="devguide-coding -audio"></span>Audio</h1> 4 <span id="devguide-coding-audio"></span><h1 id="audio"><span id="devguide-coding -audio"></span>Audio</h1>
5 <div class="contents local topic" id="contents"> 5 <div class="contents local" id="contents" style="display: none">
6 <ul class="small-gap"> 6 <ul class="small-gap">
7 <li><a class="reference internal" href="#reference-information" id="id1">Referen ce information</a></li> 7 <li><a class="reference internal" href="#reference-information" id="id1">Referen ce information</a></li>
8 <li><a class="reference internal" href="#about-the-pepper-audio-api" id="id2">Ab out the Pepper audio API</a></li> 8 <li><a class="reference internal" href="#about-the-pepper-audio-api" id="id2">Ab out the Pepper audio API</a></li>
9 <li><a class="reference internal" href="#digital-audio-concepts" id="id3">Digita l audio concepts</a></li> 9 <li><a class="reference internal" href="#digital-audio-concepts" id="id3">Digita l audio concepts</a></li>
10 <li><a class="reference internal" href="#setting-up-the-module" id="id4">Setting up the module</a></li> 10 <li><a class="reference internal" href="#setting-up-the-module" id="id4">Setting up the module</a></li>
11 <li><p class="first"><a class="reference internal" href="#creating-an-audio-conf iguration-resource" id="id5">Creating an audio configuration resource</a></p> 11 <li><p class="first"><a class="reference internal" href="#creating-an-audio-conf iguration-resource" id="id5">Creating an audio configuration resource</a></p>
12 <ul class="small-gap"> 12 <ul class="small-gap">
13 <li><a class="reference internal" href="#resources" id="id6">Resources</a></li> 13 <li><a class="reference internal" href="#resources" id="id6">Resources</a></li>
14 <li><a class="reference internal" href="#sample-frame-count" id="id7">Sample fra me count</a></li> 14 <li><a class="reference internal" href="#sample-frame-count" id="id7">Sample fra me count</a></li>
15 <li><a class="reference internal" href="#supported-audio-configurations" id="id8 ">Supported audio configurations</a></li> 15 <li><a class="reference internal" href="#supported-audio-configurations" id="id8 ">Supported audio configurations</a></li>
16 </ul> 16 </ul>
17 </li> 17 </li>
18 <li><a class="reference internal" href="#creating-an-audio-resource" id="id9">Cr eating an audio resource</a></li> 18 <li><a class="reference internal" href="#creating-an-audio-resource" id="id9">Cr eating an audio resource</a></li>
19 <li><p class="first"><a class="reference internal" href="#implementing-a-callbac k-function" id="id10">Implementing a callback function</a></p> 19 <li><p class="first"><a class="reference internal" href="#implementing-a-callbac k-function" id="id10">Implementing a callback function</a></p>
20 <ul class="small-gap"> 20 <ul class="small-gap">
21 <li><a class="reference internal" href="#application-threads-and-real-time-requi rements" id="id11">Application threads and real-time requirements</a></li> 21 <li><a class="reference internal" href="#application-threads-and-real-time-requi rements" id="id11">Application threads and real-time requirements</a></li>
22 </ul> 22 </ul>
23 </li> 23 </li>
24 <li><a class="reference internal" href="#starting-and-stopping-playback" id="id1 2">Starting and stopping playback</a></li> 24 <li><a class="reference internal" href="#starting-and-stopping-playback" id="id1 2">Starting and stopping playback</a></li>
25 </ul> 25 </ul>
26 </div> 26
27 <p>This chapter describes how to use the Pepper audio API to play an audio 27 </div><p>This chapter describes how to use the Pepper audio API to play an audio
28 stream. The Pepper audio API provides a low-level means of playing a stream of 28 stream. The Pepper audio API provides a low-level means of playing a stream of
29 audio samples generated by a Native Client module. The API generally works as 29 audio samples generated by a Native Client module. The API generally works as
30 follows: A Native Client module creates an audio resource that represents an 30 follows: A Native Client module creates an audio resource that represents an
31 audio stream, and tells the browser to start or stop playing the audio 31 audio stream, and tells the browser to start or stop playing the audio
32 resource. The browser calls a function in the Native Client module to fill a 32 resource. The browser calls a function in the Native Client module to fill a
33 buffer with audio samples every time it needs data to play from the audio 33 buffer with audio samples every time it needs data to play from the audio
34 stream.</p> 34 stream.</p>
35 <p>The code examples in this chapter describe a simple Native Client module that 35 <p>The code examples in this chapter describe a simple Native Client module that
36 generates audio samples using a sine wave with a frequency of 440 Hz. The module 36 generates audio samples using a sine wave with a frequency of 440 Hz. The module
37 starts playing the audio samples as soon as it is loaded into the browser. For a 37 starts playing the audio samples as soon as it is loaded into the browser. For a
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 } else if (message == kStopSoundId) { 343 } else if (message == kStopSoundId) {
344 audio_.StopPlayback(); 344 audio_.StopPlayback();
345 } else if (...) { 345 } else if (...) {
346 ... 346 ...
347 } 347 }
348 } 348 }
349 </pre> 349 </pre>
350 </section></section> 350 </section></section>
351 351
352 {{/partials.standard_nacl_article}} 352 {{/partials.standard_nacl_article}}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698