Dave, Thank you for your quick response. SoundPool is indeed the right way to go and I've got my SFX playing...pretty straight forward interface.
A small problem I'm having is that during playback I get a lot of: W/AudioFlinger( 31): write blocked for 50 msecs Also, although my (relative short) SFX are playing, the background music fails with: E/AudioCache( 31): Heap size overflow! req size: 1050624, max size: 1048576 This same audio track worked fine with JetPlayer. Any idea why SoundPool thinks it's too big? cheers, k. On 30 July, 17:27, Dave Sparks <[email protected]> wrote: > triggerClip() was designed to play synchronized sound effects for > musical games like JetBoy. > > If you just want to play random sound effects, I would use SoundPool > instead. > > On Jul 30, 5:53 am, kk <[email protected]> wrote: > > > > > Hi all, > > > I'm using JetPlayer in order to add some audio to a game I'm > > developing. > > Using the examples in JetBoy I have managed to create a .jet file > > using JetCreator and play an audio track. > > So far so good. However, I'm having some trouble playing sound effects > > for my game. > > > I have a set of very small .mid files, each containing a shooting > > sound for a different weapon. > > However, when I try to add the .mid file in JetCreator I get > > "The segment starting and ending times are illogical" > > I'm guessing this is because the clip is too short and starting/ending > > M/B/T are both 1/1/0 ? > > > The idea was to add these SFXs and then use triggerClip to play them. > > My question is, background music aside (I can make that work) what's > > the best way to add SFX in a game > > so that you can trigger them at any point programmaticaly? (i.e. have > > something like playShootingSFX1(), > > playShootingSFX2(), etc. that will go and play the SFX immediately). > > > thx in advance, > > k. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

