| OLD | NEW |
| 1 #ifndef SOUND_SERVICE_H | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 #define SOUND_SERVICE_H | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 #ifndef EMBEDDERS_ANDROID_SOUND_SERVICE_H_ |
| 6 #define EMBEDDERS_ANDROID_SOUND_SERVICE_H_ |
| 3 | 7 |
| 4 #include <android_native_app_glue.h> | 8 #include <android_native_app_glue.h> |
| 5 #include <SLES/OpenSLES.h> | 9 #include <SLES/OpenSLES.h> |
| 6 #include <SLES/OpenSLES_Android.h> | 10 #include <SLES/OpenSLES_Android.h> |
| 7 #include <SLES/OpenSLES_AndroidConfiguration.h> | 11 #include <SLES/OpenSLES_AndroidConfiguration.h> |
| 8 #include "jni/types.h" | 12 #include "embedders/android/types.h" |
| 9 | 13 |
| 10 class SoundService { | 14 class SoundService { |
| 11 public: | 15 public: |
| 12 explicit SoundService(android_app* application); | 16 explicit SoundService(android_app* application); |
| 13 int32_t Start(); | 17 int32_t Start(); |
| 14 void Stop(); | 18 void Stop(); |
| 15 | 19 |
| 16 int32_t PlayBackground(const char* path); | 20 int32_t PlayBackground(const char* path); |
| 17 void StopBackground(); | 21 void StopBackground(); |
| 18 | 22 |
| 19 private: | 23 private: |
| 20 android_app* application_; | 24 android_app* application_; |
| 21 SLObjectItf engine_; | 25 SLObjectItf engine_; |
| 22 SLEngineItf engine_if_; | 26 SLEngineItf engine_if_; |
| 23 SLObjectItf output_mix_; | 27 SLObjectItf output_mix_; |
| 24 SLObjectItf background_player_; | 28 SLObjectItf background_player_; |
| 25 SLPlayItf background_player_if_; | 29 SLPlayItf background_player_if_; |
| 26 SLSeekItf background_player_seek_if_; | 30 SLSeekItf background_player_seek_if_; |
| 27 }; | 31 }; |
| 28 | 32 |
| 29 void PlayBackground(const char* path); | 33 void PlayBackground(const char* path); |
| 30 void StopBackground(); | 34 void StopBackground(); |
| 31 #endif | 35 #endif // EMBEDDERS_ANDROID_SOUND_SERVICE_H_ |
| OLD | NEW |