[android-developers] Re: Does SoundPool work or has anyone successfully used it?

2008-11-12 Thread plusminus
HI Dave, I was using (Note: inside runOnUIThread(...)): ### final MediaPlayer mp = MediaPlayer.create(MyActivity.this, R.raw.some_sound); mp.setVolume(10, 10); mp.setAudioStreamType(AudioManager.STREAM_MUSIC); ### Is it that what you meant? Using that I can't hear

[android-developers] Re: Does SoundPool work or has anyone successfully used it?

2008-11-12 Thread Dave
The volumes should range from 0 to 1.0, where 1.0 is maximum volume, i.e. zero attenuation. A value of 10 should be returning an error, but maybe it's not being passed up properly through the framework. On Nov 12, 7:57 am, plusminus [EMAIL PROTECTED] wrote: HI Dave, I was using (Note: inside

[android-developers] Re: Does SoundPool work or has anyone successfully used it?

2008-11-11 Thread plusminus
Thx for the code but I have that onCompletion working with the MediaPlayer already. The problem actually is that the volume is s silent on some files (even after volume-normalizing them). Does anyone which values to choose, calling the following method on a MediaPlayer: --

[android-developers] Re: Does SoundPool work or has anyone successfully used it?

2008-11-11 Thread Dave
By default, the MediaPlayer volume should be set to 1.0, i.e. no attenuation. Which stream type are you using when you create the MediaPlayer? Have you checked to make sure that the master stream volume is set correctly? On Nov 11, 10:10 am, plusminus [EMAIL PROTECTED] wrote: Thx for the code

[android-developers] Re: Does SoundPool work or has anyone successfully used it?

2008-11-11 Thread Robert Green
Here's an example for managing sounds that will be played many times (like gunshots, explosions, clicks, etc) using a pool and then sounds that are just one-offs, like an announcer or an intro sound. public class MediaPlayerPool { private static final String TAG = MediaPlayerPool;

[android-developers] Re: Does SoundPool work or has anyone successfully used it?

2008-11-10 Thread plusminus
Hi all, any ideas on how to implement a kind of OnCompletionListener ? As I want to queue 2 sounds after each other :/ Any help appreciated. Best Regards, plusminus On 15 Okt., 08:47, Robert Green [EMAIL PROTECTED] wrote: I just read the whole discussion.  All I can say is... What were they

[android-developers] Re: Does SoundPool work or has anyone successfully used it?

2008-10-15 Thread blindfold
it works on both the emulator and a real G1. So you have access to a real G1. Lucky you!! I'm really surprised that there is no access to the audio buffer. How are we supposed to write dynamic audio generation apps? Unfortunately not supported by Android SDK 1.0 r1. See

[android-developers] Re: Does SoundPool work or has anyone successfully used it?

2008-10-15 Thread Robert Green
I just read the whole discussion. All I can say is... What were they thinking?? How is a developer supposed to be able to generate or synthesize audio real time? These are important apps. Just look at the guitar or harmonica app for the iPhone. Those are very popular and do exactly that.

[android-developers] Re: Does SoundPool work or has anyone successfully used it?

2008-10-14 Thread TjerkW
I also wanted to use the soundpool, but lack of documentation made it impossible to use. I tried it they way i would think it would work, but it didn't. I am using mediaplayers now, i cannot play the same sound multiple times concurrently, Too bad. On 12 okt, 19:32, Robert Green [EMAIL

[android-developers] Re: Does SoundPool work or has anyone successfully used it?

2008-10-14 Thread Robert Green
I used it for my game and it works on both the emulator and a real G1. Just follow my example. On Oct 14, 4:07 pm, TjerkW [EMAIL PROTECTED] wrote: I also wanted to use the soundpool, but lack of documentation made it impossible to use. I tried it they way i would think it would work, but it

[android-developers] Re: Does SoundPool work or has anyone successfully used it?

2008-10-12 Thread Robert Green
I have a few more comments on this class. 1) Is it going to be officially supported? 2) Here are some problems I've found with it and workarounds I used: Bug #1) Looping an mp3 crashes around the 8th loop but looping waves seems to work fine. Bug #2) SoundPool.stop(streamId) immediately

[android-developers] Re: Does SoundPool work or has anyone successfully used it?

2008-10-11 Thread Robert Green
Problem solved. Here's how I did it: This only loads one sound but you can load as many as you want. I have an mp3 in my res/raw directory called explosion.mp3. Java: public static final int SOUND_EXPLOSION = 1; public static final int SOUND_YOU_WIN = 2; public