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

Side by Side Diff: tests/ppapi_example_audio/audio.cc

Issue 7265001: Build and use libraries locally in the nacl build, not requiring "partial SDK" (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: final fix for pnacl Created 9 years, 5 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
« no previous file with comments | « src/untrusted/pthread/nacl.scons ('k') | tests/threads/thread_test.c » ('j') | 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 Native Client Authors. All rights reserved. 1 // Copyright (c) 2011 The Native Client 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 5
6 #include <nacl/nacl_log.h> 6 #include <nacl/nacl_log.h>
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <stdio.h> 9 #include <stdio.h>
10 #include <stdlib.h> 10 #include <stdlib.h>
11 #include <string.h> 11 #include <string.h>
12 12
13 #include <cmath> 13 #include <cmath>
14 #include <limits> 14 #include <limits>
15 #include <string> 15 #include <string>
16 #include <nacl/nacl_inttypes.h>
16 17
17 #include "native_client/src/shared/ppapi_proxy/utility.h" 18 #include "native_client/src/shared/ppapi_proxy/utility.h"
18 #include "ppapi/c/pp_bool.h" 19 #include "ppapi/c/pp_bool.h"
19 #include "ppapi/c/pp_errors.h" 20 #include "ppapi/c/pp_errors.h"
20 #include "ppapi/c/ppb_audio.h" 21 #include "ppapi/c/ppb_audio.h"
21 #include "ppapi/c/ppb_audio_config.h" 22 #include "ppapi/c/ppb_audio_config.h"
22 #include "ppapi/cpp/audio.h" 23 #include "ppapi/cpp/audio.h"
23 #include "ppapi/cpp/audio_config.h" 24 #include "ppapi/cpp/audio_config.h"
24 #include "ppapi/cpp/completion_callback.h" 25 #include "ppapi/cpp/completion_callback.h"
25 #include "ppapi/cpp/instance.h" 26 #include "ppapi/cpp/instance.h"
26 #include "ppapi/cpp/module.h" 27 #include "ppapi/cpp/module.h"
27 #include "ppapi/cpp/var.h" 28 #include "ppapi/cpp/var.h"
28 29
29 // Due to a bug in nacl-newlib, this #include has to come last.
30 // See http://code.google.com/p/nativeclient/issues/detail?id=1654
31 #include <nacl/nacl_inttypes.h>
32
33 30
34 // Most of this example is borrowed from ppapi/examples/audio/audio.cc 31 // Most of this example is borrowed from ppapi/examples/audio/audio.cc
35 32
36 // Separate left and right frequency to make sure we didn't swap L & R. 33 // Separate left and right frequency to make sure we didn't swap L & R.
37 // Sounds pretty horrible, though... 34 // Sounds pretty horrible, though...
38 const double kDefaultFrequencyLeft = 400.0; 35 const double kDefaultFrequencyLeft = 400.0;
39 const double kDefaultFrequencyRight = 1000.0; 36 const double kDefaultFrequencyRight = 1000.0;
40 const uint32_t kDefaultDuration = 10000; 37 const uint32_t kDefaultDuration = 10000;
41 38
42 // This sample frequency is guaranteed to work. 39 // This sample frequency is guaranteed to work.
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 287
291 namespace pp { 288 namespace pp {
292 289
293 // Factory function for your specialization of the Module object. 290 // Factory function for your specialization of the Module object.
294 Module* CreateModule() { 291 Module* CreateModule() {
295 NaClLogModuleInit(); 292 NaClLogModuleInit();
296 return new MyModule(); 293 return new MyModule();
297 } 294 }
298 295
299 } // namespace pp 296 } // namespace pp
OLDNEW
« no previous file with comments | « src/untrusted/pthread/nacl.scons ('k') | tests/threads/thread_test.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698