fix
This commit is contained in:
1 parent
4e35c0e218
commit
18311301c4
6 files changed
+92
-50
No files matched your search
Executable
+35
@@ -0,0 +1,35 @@
|
||||
#include "Sounds.h"
|
||||
#include <jni.h>
|
||||
|
||||
static JNIEnv* env = NULL;
|
||||
static jclass jSounds = NULL;
|
||||
|
||||
/** BackgroundSound */
|
||||
|
||||
void playBackgroundSound() {
|
||||
jmethodID method = env->GetStaticMethodID(jSounds, "JniPlayBackgroundSound", "()V");
|
||||
env->CallStaticVoidMethod(jSounds, method);
|
||||
}
|
||||
|
||||
void stopBackgroundSound () {
|
||||
jmethodID method = env->GetStaticMethodID(jSounds, "JniStopBackgroundSound", "()V");
|
||||
env->CallStaticVoidMethod(jSounds, method);
|
||||
}
|
||||
|
||||
/** GameSound - Gunshot */
|
||||
|
||||
void playGameSoundGunshot() {
|
||||
jmethodID method = env->GetStaticMethodID(jSounds, "JniPlayGunshotSound", "()V");
|
||||
env->CallStaticVoidMethod(jSounds, method);
|
||||
}
|
||||
|
||||
void stopGameSoundGunshot() {
|
||||
jmethodID method = env->GetStaticMethodID(jSounds, "JniStopGunshotSound", "()V");
|
||||
env->CallStaticVoidMethod(jSounds, method);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_fishrungames_doublehitballs_sounds_JniSoundCalls_initJniSounds(JNIEnv *pEnv, jobject pThis) {
|
||||
env = pEnv;
|
||||
jSounds = env->FindClass("fishrungames/doublehitballs/sounds/JniSoundCalls");
|
||||
playBackgroundSound();
|
||||
}
|
||||
+2
-2
@@ -359,7 +359,7 @@ void TMyApplication::LoadResources()
|
||||
TextureNamesToLoad.push_back(std::pair<std::string, std::string>(CONST_CREDITS_TEXTURE + ".png", CONST_CREDITS_TEXTURE));
|
||||
|
||||
#ifdef TARGET_IOS
|
||||
ResourceManager->SoundManager.LoadMusicLooped("level1ogg.ogg");
|
||||
//ResourceManager->SoundManager.LoadMusicLooped("level1ogg.ogg");
|
||||
#else
|
||||
//ResourceManager->SoundManager.LoadMusic("level1ogg.ogg");
|
||||
#endif
|
||||
@@ -733,4 +733,4 @@ void TMyApplication::SetButtonsAction () {
|
||||
this->GameLevel->PrevLevelStateIsStandby = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user