not sure if this will help you...
in big5ViewController.m I added (after the vibration routine):
// soundPlay
else if ([command isEqualToString:@"soundPlay"]){
NSLog(@"soundPlay: request!");
CFURLRef soundFileURLRef;
SystemSoundID soundFileObject;
// Get the main bundle for the app
CFBundleRef mainBundle;
mainBundle = CFBundleGetMainBundle ();
// Get the URL to the sound file to play
soundFileURLRef = CFBundleCopyResourceURL (
mainBundle,
CFSTR ("pop2"),
CFSTR ("aif"),
NULL
);
// Create a system sound object representing the sound file
AudioServicesCreateSystemSoundID (soundFileURLRef,
&soundFileObject);
// Play it
AudioServicesPlaySystemSound (soundFileObject);
}
/////////
Then in the big5.js I added (again after the vibration function):
soundPlay: function() {
// setting_vibration: true;
return Device.exec("soundPlay")
},
///
then in my app I just call Device.soundPlay();
The only thing to remember is that this routine uses the "system
sound" routines, and are therefore limited to about 20 seconds of
sound, and I've had best success with *.aif file format.