简体   繁体   中英

Audio in java and android sdk

I have question about audio in android . I want to make app with soundboard . I have 2 buttons for example and 1 audio file . i wish when i click at 1st button audio play from 1 second to 3 second . and i click 2nd button audio play from 5 second to 8 second . How to do it?

Check the MediaPlayer class. It has for example seekTo() method.

http://developer.android.com/reference/android/media/MediaPlayer.html#seekTo(int )

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