Reputation: 101
In libGDX, I want to divide a long audio file in small portions, like each portion consists of 1 second duration.So that I can play individual portion when necessary.Is there any way to do that?Answer may not be libGDX specific.
Thanks
Upvotes: 0
Views: 53
Reputation: 51
As far as I know, there is no way to do that in libGDX. If what you are doing is for Android you should use MediaPlayer and its seek method. Here is an example of how to use it to make a player: http://mrbool.com/how-to-play-audio-files-in-android-with-a-seekbar-feature-and-mediaplayer-class/28243
I suggest you just use separate files for each sound if having a single file is not mandatory. I see no reason to doing what you want to do.
I hope this helps.
Upvotes: 1