Looping sound mediaplayer problems... pausing and starting

All your problems with Audio, Video and Images.

Looping sound mediaplayer problems... pausing and starting

Postby ameetnsharma » Sat Jan 16, 2010 10:09 pm

I have a sound that I'm looping... so I've set

mp.setLooping(true);


I'm using this to pause:

mp.pause();

and this to start:
if(!mp.isPlaying())
mp.start();


Now, I want to be able to start and pause the sound freely... This works for a while, but occasionally what happens is that the sound loops, and I'm no longer able to pause it... Why does this happen and how can I fix it? Thanks.
ameetnsharma
Developer
Developer
 
Posts: 30
Joined: Tue Dec 08, 2009 10:55 pm

Top

Postby willis127 » Mon Jan 18, 2010 4:13 am

more code please.

remote service would work.
willis127
Freshman
Freshman
 
Posts: 9
Joined: Wed Nov 11, 2009 8:03 pm

Postby ameetnsharma » Mon Jan 18, 2010 6:43 am

Thanks. I took a bit of a different route and I've fixed this problem.
ameetnsharma
Developer
Developer
 
Posts: 30
Joined: Tue Dec 08, 2009 10:55 pm

Postby matany » Tue Jan 19, 2010 10:10 pm

Hi ameetnsharma


How did you fix your problem. I have the same problem. Please provide the code to play, pause, stop and loop sound.

Thanks alot

Mat
matany
Experienced Developer
Experienced Developer
 
Posts: 66
Joined: Tue Dec 08, 2009 9:29 pm

Postby ameetnsharma » Tue Jan 19, 2010 11:38 pm

matany wrote:Hi ameetnsharma


How did you fix your problem. I have the same problem. Please provide the code to play, pause, stop and loop sound.

Thanks alot

Mat


Hi matany. I apologize, I wasn't able to fix that problem. I took a different route and decided not to do the pause and resume thing... I just start a new sound altogether...
ameetnsharma
Developer
Developer
 
Posts: 30
Joined: Tue Dec 08, 2009 10:55 pm

Postby matany » Wed Jan 20, 2010 1:50 am

Ok,

Thank you.

Mat
matany
Experienced Developer
Experienced Developer
 
Posts: 66
Joined: Tue Dec 08, 2009 9:29 pm

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 25 guests