PhoneGap - Sound Effects using Native Sounds
This Cordova template application shows how to add sound effects to an application. It requires the 'Low Latency Audio' and the 'Status' bar plugins.
Sound effects can be integrated in to applications using the 'Low Latency Audio' plugin which is integrated into Alpha Anywhere. The Low Latency Audio plugin enables multi-channel and multi-voice playback and uses caching to minimize playback latency by leveraging the native audio APIs available on mobile devices. While HTML5 offers audio in mobile browsers, the quality is poor.
The PhoneGap - Sound Effect using Native Sounds template demonstrates using the 'Low Latency Audio' plugin to take advantage of native audio on a mobile device. The template uses several sound files that must be downloaded and added to the project. The sound files can be downloaded from the link below:
When the sound file have been downloaded, unzip the sound files to the project folder.
When building the Cordova application, make sure to select the Additional files property to add the sound files to the project. For example, if the sound files are in a folder called sounds in the web project, the entry to add to the Additional files property would be:
When the app is launched, it will programmatically play some sounds. All sounds can also be played using the buttons.