How to play sound files sequentially.

All your problems with Audio, Video and Images.

How to play sound files sequentially.

Postby bltpyro » Mon May 02, 2011 1:13 am

Specifically, I am trying to read out the time on a timer. For example, if it is 3:28 it reads out "three minutes twenty eight seconds". Right now I have all of the individual sounds in the res/raw and am using soundpool, but I can't figure out how to play the sounds after each other( as in play three then when three is done, play minutes, etc.). I also want it to be able to run in the background (or have a music player run in the background) so I can listen to music and the periodically hear the timer time.

Thanks,
Brandon
bltpyro
Once Poster
Once Poster
 
Posts: 1
Joined: Mon May 02, 2011 1:04 am

Top

Re: How to play sound files sequentially.

Postby onlineadr » Tue May 03, 2011 2:12 am

ok as for playing the audio files one after another, one way to do it is setting up the file names so they make sense

e.g.
1_sound.mp3
2_sound.mp3
3_sound.mp3
10_sound.mp3
20_sound.mp3
30_sound.mp3
ect....
when you call the sound at a specific time tell the application to load the mintute sound depending what minute it gets from the timer and same for the second

you should be using mediaplayer because soundpool WILL overlap

as for running in the background use a service
onlineadr
Experienced Developer
Experienced Developer
 
Posts: 59
Joined: Thu Apr 28, 2011 12:45 pm

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: Google Feedfetcher and 13 guests