The technique presented to play BGM from a MIME source is very practical but sadly, not flexible enough. Recreating an
AudioPlayer object is not necessary and accessing asset files each time is not good in term of efficiency.
So when it comes to playing sounds quickly in response to an event and generating them dynamically, we need to use a sound buffer queue. Each sound is preloaded or even generated into a memory buffer, and placed into a queue when playback is requested. No need to access a file at runtime!
A sound buffer, in current OpenSL ES Android implementation, can contain PCM data. PCM, which stands for Pulse Code Modulation, is a data format dedicated to the representation of digital sounds. It is the format used in CD ...