PDA

View Full Version : Play Audio using sound package



nishantshah
08-31-2009, 07:15 PM
Hi,

I am working on Android's Media Player.
I have developed simple code in Android using Media Player that works for wav and mp3 files.

MediaPlayer mp = MediaPlayer.create(this, R.raw.chimes);
mp.start();

I have also developed simple audio java code using built in package of Java (javax.sound.sampled). The audio files contains stream data(FileOutputStream).
But Android does not support sound package.

Is there any other way to play audio.

Thanks in advance

MeMongo
09-01-2009, 05:57 AM
Maybe you should go to http://www.anddev.org/. They have a lot of tutorials over there

nishantshah
09-05-2009, 01:52 PM
Hi,

Thanks for the reply.

I have gone through the tutorials given in this link.
http://www.anddev.org/tutorial_custom_media_streaming_for_androids_media player-t1612.html

And also my Android Player can play mp3 files when i stream it.
But i am not able to play Wav files. Why so? Streaming does not support wav in Android?

I have played wav file directly from raw. It plays.
What will be the problem?

MeMongo
09-23-2009, 08:05 AM
That's beyond my knowledge. I haven't messed with streaming audio. Maybe it has to do with how the file is being served. For example, Shoutcast is a server that streams MP3 files.