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
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
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:
--
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
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;
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
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
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.
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
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
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
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
12 matches
Mail list logo