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

Side by Side Diff: samples/android_sample/jni/sound_service.h

Issue 11416343: Refactored Android samples / embedder. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix type error on playBackground Created 8 years 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 | « samples/android_sample/jni/resource.h ('k') | samples/android_sample/jni/sound_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #ifndef SOUND_SERVICE_H 1 #ifndef SOUND_SERVICE_H
2 #define SOUND_SERVICE_H 2 #define SOUND_SERVICE_H
3 3
4 #include <android_native_app_glue.h> 4 #include <android_native_app_glue.h>
5 #include <SLES/OpenSLES.h> 5 #include <SLES/OpenSLES.h>
6 #include <SLES/OpenSLES_Android.h> 6 #include <SLES/OpenSLES_Android.h>
7 #include <SLES/OpenSLES_AndroidConfiguration.h> 7 #include <SLES/OpenSLES_AndroidConfiguration.h>
8 #include "jni/types.h" 8 #include "jni/types.h"
9 9
10 class SoundService { 10 class SoundService {
11 public: 11 public:
12 explicit SoundService(android_app* application); 12 explicit SoundService(android_app* application);
13 int32_t Start(); 13 int32_t Start();
14 void Stop(); 14 void Stop();
15 15
16 int32_t PlayBackground(const char* path); 16 int32_t PlayBackground(const char* path);
17 void StopBackground(); 17 void StopBackground();
18 18
19 private: 19 private:
20 android_app* application_; 20 android_app* application_;
21 SLObjectItf engine_; 21 SLObjectItf engine_;
22 SLEngineItf engine_if_; 22 SLEngineItf engine_if_;
23 SLObjectItf output_mix_; 23 SLObjectItf output_mix_;
24 SLObjectItf background_player_; 24 SLObjectItf background_player_;
25 SLPlayItf background_player_if_; 25 SLPlayItf background_player_if_;
26 SLSeekItf background_player_seek_if_; 26 SLSeekItf background_player_seek_if_;
27 }; 27 };
28 28
29 int32_t PlayBackground(const char* path); 29 void PlayBackground(const char* path);
30 void StopBackground(); 30 void StopBackground();
31 #endif 31 #endif
32
OLDNEW
« no previous file with comments | « samples/android_sample/jni/resource.h ('k') | samples/android_sample/jni/sound_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698