Hi,

Thanks for your early reply Md.Fazla Rabbi.

* I have noted your point, in my app  I am  also using same as this,  but
here is  my requirement below*:
1. Once i click on a button, it should give me three different sounds one
after the other?  I have three music files, which should be run one after
the other as soon as the music of first complete, then second should start,
once the second is completed then third should start, and complete. How to
provide duration for each audio file?

*Here the problem is: *
In my app audio files are with different duration lengths.
How can I find the duration length and play each audio file?
If anyone knows soon for this, Please provide me.


Thanks & Regards,
Kumar Varma.





On Wed, Dec 21, 2011 at 10:59 AM, Md.Fazla Rabbi OPU <
[email protected]> wrote:

> Hi Verma,
> I have developed a app which holds some audio files(50 sound files). For
> my app  i have used *MediaPlayer* Object which play one sound file at a
> time. So for these 50 sound files i have stored sound files in 
> *res/raw*folder. Then in my code i use an array which holds the
> *id* of the sounds. After that i pass one sound file at a time to *
> MediaPlayer* Object using the index number of the array.
>
> This is something like this:
>
> *int [] sounds=new int[] {R.raw.sound1, R.raw.sound2, R.raw.sound3};
>
> MediaPlayer mp=new MediaPlayer( MyActivity.this, sounds[i] );///*Where *i*is 
> the index no. of the
> *sounds array
> mp.start();*
>
> Hope this will helpful for you.
>
>  --
> 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
>

-- 
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

Reply via email to