Game Development Reference
In-Depth Information
Figure 6-7. Snapshot of the Wolf 3D sound tracks
The sound architecture can be resumed in the following key steps:
1. When the native game loop requests a sound, a JNI callback will fire calling the
method wolf.jni.Natives.OnStartSound(idx) , where idx represents an index
or sound ID.
2. wolf.jni.Natives will delegate the sound request to the listener WolfLauncher
which is the main activity of the application.
The main activity will use the classes AudioManager and AudioClip to play the
sound by mapping the sound ID to the corresponding raw resource ( WAVE file).
3.
4.
The mappings of native sound IDs to Android raw ( WAVE ) files are defined in
the class wolf.audio.SoundNames .
Search WWH ::




Custom Search