| OLD | NEW |
| 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 | |
| OLD | NEW |