problem associated with audio playback button

All your problems with Audio, Video and Images.

problem associated with audio playback button

Postby gioeleslfierro » Sat Feb 06, 2010 4:42 pm

Sorry for my bad English, I'm Italian. I will try to explain my problem.

This is the code for a button:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. button2.setOnClickListener(
  2.  
  3.                 new Button.OnClickListener(){
  4.  
  5.                 public void onClick(View v)
  6.  
  7.                 {
  8.  
  9.                        
  10.  
  11.                     MediaPlayer mp = MediaPlayer.create(context, R.drawable.test);
  12.  
  13.                     mp.start();
  14.  
  15.                    
  16.  
  17.                 }
  18.  
  19.             });
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


Sound plays but if I press the button 20-25 times everything hangs.

Why?
Thank you very much
gioeleslfierro
Freshman
Freshman
 
Posts: 3
Joined: Sat Feb 06, 2010 4:36 pm

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 13 guests