| OLD | NEW |
| (Empty) |
| 1 #ifndef SOUND_SERVICE_H | |
| 2 #define SOUND_SERVICE_H | |
| 3 | |
| 4 #include <android_native_app_glue.h> | |
| 5 #include <SLES/OpenSLES.h> | |
| 6 #include <SLES/OpenSLES_Android.h> | |
| 7 #include <SLES/OpenSLES_AndroidConfiguration.h> | |
| 8 #include "jni/types.h" | |
| 9 | |
| 10 class SoundService { | |
| 11 public: | |
| 12 explicit SoundService(android_app* application); | |
| 13 int32_t Start(); | |
| 14 void Stop(); | |
| 15 | |
| 16 int32_t PlayBackground(const char* path); | |
| 17 void StopBackground(); | |
| 18 | |
| 19 private: | |
| 20 android_app* application_; | |
| 21 SLObjectItf engine_; | |
| 22 SLEngineItf engine_if_; | |
| 23 SLObjectItf output_mix_; | |
| 24 SLObjectItf background_player_; | |
| 25 SLPlayItf background_player_if_; | |
| 26 SLSeekItf background_player_seek_if_; | |
| 27 }; | |
| 28 | |
| 29 void PlayBackground(const char* path); | |
| 30 void StopBackground(); | |
| 31 #endif | |
| OLD | NEW |