Attention : vous avez été redirigé vers la plus récente documentation correspondant à votre version générale ( 2023.1.7.8574 ). Si vous souhaitez accéder à la documentation de votre version précise, veuillez télécharger la documentation hors ligne depuis l'Audiokinetic Launcher et sélectionner l'option de documentation Offline dans l'application de création Wwise.
Go to the documentation of this file.
38 CAkJNIThread(JavaVM* jvm) : m_jvm(jvm), m_jEnv(
NULL), m_mustDetachExplicitely(false), m_mustPopLocalFrame(false)
43 CAkJNIThread(JavaVM* jvm,
int numLocalRefs) : m_jvm(jvm), m_jEnv(
NULL), m_mustDetachExplicitely(false), m_mustPopLocalFrame(false)
45 AcquireEnv(jvm, numLocalRefs);
50 if (m_mustPopLocalFrame)
52 m_jEnv->PopLocalFrame(
NULL);
53 m_mustPopLocalFrame =
false;
55 if (m_jvm !=
NULL && m_jEnv !=
NULL && m_mustDetachExplicitely)
57 m_jvm->DetachCurrentThread();
58 m_mustDetachExplicitely =
false;
69 return m_jEnv !=
NULL;
73 void AcquireEnv(JavaVM* jvm,
int numLocalRefs)
78 jvm->GetEnv((
void**)&m_jEnv, JNI_VERSION_1_6);
81 JavaVMAttachArgs lJavaVMAttachArgs;
82 lJavaVMAttachArgs.version = JNI_VERSION_1_6;
83 lJavaVMAttachArgs.name =
"NativeThread";
84 lJavaVMAttachArgs.group =
NULL;
86 jvm->AttachCurrentThread(&m_jEnv, &lJavaVMAttachArgs);
87 m_mustDetachExplicitely =
true;
89 if (m_jEnv && numLocalRefs > 0)
91 m_mustPopLocalFrame = 0 == m_jEnv->PushLocalFrame(numLocalRefs);
97 bool m_mustDetachExplicitely: 1;
98 bool m_mustPopLocalFrame: 1;
Platform-dependent helpers.
CAkJNIThread(JavaVM *jvm, int numLocalRefs)
Utility class for acquiring a pointer to a valid JNI environment attached to the current thread (with...
CAkJNIThread(JavaVM *jvm)
Besoin d'aide ?
Des questions ? Des problèmes ? Besoin de plus d'informations ? Contactez-nous, nous pouvons vous aider !
Visitez notre page d'Aide
Décrivez-nous de votre projet. Nous sommes là pour vous aider.
Enregistrez votre projet et nous vous aiderons à démarrer sans aucune obligation !
Partir du bon pied avec Wwise