Search found 2333 matches
- Thu Oct 10, 2024 4:19 pm
- Forum: General discussion
- Topic: Google Play New problem : 64bits
- Replies: 173
- Views: 40302
Re: Google Play New problem : 64bits
The "2" parameter is the number of local Java handles needed. You can try raising it to 20. The nil in pop seems to be ok, it just indicates that we do not need a result. I'm not sure why simply calling BeginThread will causing things to fail. Do you still have cthreads as first unit in Zz...
- Thu Oct 10, 2024 1:34 pm
- Forum: General discussion
- Topic: Google Play New problem : 64bits
- Replies: 173
- Views: 40302
Re: Google Play New problem : 64bits
Maybe we should try disabling more specific stuff. What happens if you comment out this line:
env^.CallNonvirtualIntMethodA(env, track, cAudioTrack, mWrite ..
env^.CallNonvirtualIntMethodA(env, track, cAudioTrack, mWrite ..
- Thu Oct 10, 2024 11:56 am
- Forum: General discussion
- Topic: Google Play New problem : 64bits
- Replies: 173
- Views: 40302
Re: Google Play New problem : 64bits
Indeed, it seems you should always use the "A" version over the "V" version for 64-bit, I forgot that in the code I posted. While the game is running, the code will stay in the "while not AudioTerminated do" loop. So the "mRelease" part is for cleanup when the...
- Thu Oct 10, 2024 8:18 am
- Forum: General discussion
- Topic: Google Play New problem : 64bits
- Replies: 173
- Views: 40302
Re: Google Play New problem : 64bits
Try this change:
Code: Select all
MixAndCopyData(PBuffer, Min(OnePassSize, bufferSizeInBytes));
env^.ReleasePrimitiveArrayCritical(env, buffer, pBuffer, 0);
env^.CallNonvirtualIntMethodV(env, track, cAudioTrack, mWrite, C([buffer, 0, Min(OnePassSize, bufferSizeInBytes)]));
- Wed Oct 09, 2024 4:48 pm
- Forum: General discussion
- Topic: Google Play New problem : 64bits
- Replies: 173
- Views: 40302
Re: Google Play New problem : 64bits
Try adding this line as first line in C function:
Fillchar(Params, SizeOf(Params), 0);
Fillchar(Params, SizeOf(Params), 0);
- Wed Oct 09, 2024 9:29 am
- Forum: General discussion
- Topic: Google Play New problem : 64bits
- Replies: 173
- Views: 40302
Re: Google Play New problem : 64bits
Aha, sorry it should be "VPointer" and "PJValue".
I'm impressed with the solutions that ChatGPT suggest for you, they are better than expected.
I'm impressed with the solutions that ChatGPT suggest for you, they are better than expected.
- Wed Oct 09, 2024 9:03 am
- Forum: General discussion
- Topic: Google Play New problem : 64bits
- Replies: 173
- Views: 40302
Re: Google Play New problem : 64bits
Try this change:
Code: Select all
Params : array[0..10] of JValue;
function C(const args : array of const) : JValue;
var
I : integer;
begin
for I := 0 to High(args) do
Params[I] := args[I].vtPointer;
Result := @Params;
end;
- Wed Oct 09, 2024 8:15 am
- Forum: General discussion
- Topic: Google Play New problem : 64bits
- Replies: 173
- Views: 40302
Re: Google Play New problem : 64bits
Try changing to NewObjectA.
- Wed Oct 09, 2024 6:57 am
- Forum: General discussion
- Topic: Google Play New problem : 64bits
- Replies: 173
- Views: 40302
Re: Google Play New problem : 64bits
Ok, let's keep trying and focus on jni.
1. Undo the changes to the two files that I suggested.
2. Then change the CallStaticIntMethodV to CallStaticIntMethodA like this:
1. Undo the changes to the two files that I suggested.
2. Then change the CallStaticIntMethodV to CallStaticIntMethodA like this:
Code: Select all
bufferSizeInBytes := Env^.CallStaticIntMethodA(env, cAudioTrack, mGetMinBufferSize, C([AudioPlayer.AudioRate, 3, 2]));
- Tue Oct 08, 2024 11:40 am
- Forum: General discussion
- Topic: Google Play New problem : 64bits
- Replies: 173
- Views: 40302
Re: Google Play New problem : 64bits
Seems it is the "C" function that converts arguments that does not work on 64-bits.
Please try the attached changes to jni.pas and ZPlatform_Android.inc.
Please try the attached changes to jni.pas and ZPlatform_Android.inc.
- Tue Oct 08, 2024 10:07 am
- Forum: General discussion
- Topic: Google Play New problem : 64bits
- Replies: 173
- Views: 40302
Re: Google Play New problem : 64bits
Also I just noticed the constant to choose stereo is 12 and not 2: https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_STEREO So you could try changing 2 to 12 like this: bufferSizeInBytes := Env^.CallStaticIntMethodV(env, cAudioTrack, mGetMinBufferSize, C([AudioPlayer.Audi...
- Tue Oct 08, 2024 9:51 am
- Forum: General discussion
- Topic: Google Play New problem : 64bits
- Replies: 173
- Views: 40302
Re: Google Play New problem : 64bits
Try printing the bufferSizeInBytes value after it is assigned in ZPlatform_Android.
Platform_error('audio buffer size: ' + inttostr(bufferSizeInBytes));
Platform_error('audio buffer size: ' + inttostr(bufferSizeInBytes));
- Tue Oct 08, 2024 7:33 am
- Forum: General discussion
- Topic: Google Play New problem : 64bits
- Replies: 173
- Views: 40302
Re: Google Play New problem : 64bits
ZGE does not use SDL on Android.
About the audio crash: if you try to play a sound do you hear this at all before it crashes?
About the audio crash: if you try to play a sound do you hear this at all before it crashes?
- Mon Oct 07, 2024 8:22 am
- Forum: General discussion
- Topic: Google Play New problem : 64bits
- Replies: 173
- Views: 40302
Re: Google Play New problem : 64bits
I think Kjell contacted me with PM so it is possible the update was not mentioned on public forum. Sorry for the inconvenience.
For the Read beyond EOF issue: please try reimport the original model if you still have it.
For the Read beyond EOF issue: please try reimport the original model if you still have it.
- Mon Oct 07, 2024 7:16 am
- Forum: General discussion
- Topic: Google Play New problem : 64bits
- Replies: 173
- Views: 40302
Re: Google Play New problem : 64bits
MeshImport was updated earlier this year to handle different encoding options (in reply to Kjell having issues with .obj file import). Do you export to Android from the very latest ZGE? Please check to be sure: http://www.zgameeditor.org/files/ZGameEditor_beta.zip