简体   繁体   中英

How to know when the sound finished playing using soundPool

I am using sound pool to play a short sound files in android , but I want to play the sounds at for example, If I clicked a button to play a sound and clicked the button again, I don't want to play the sound as long as it is already playing . how ?

It looks like you should use a MediaPlayer Class instead of soundpool to accomplish this result, in combination with an OnClickListener.

A simple StackOverflow search returns the following:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM