Android enables the seamless loop playback of Ogg audio

Source: Internet
Author: User

Ashamed to say, in the end it seems that they did not do something.

Because of the need for work, it is necessary to seamlessly loop multiple Ogg audio simultaneously.

I tried to decode the Ogg file in Java at the Java layer, the efficiency is not to say, want to crash to use it: D

Later tried with native code, but I finally only implemented single-threaded decoding and playback, based on the Ogg decoding library and OpenAL playback, and is decoded after playback.

In fact, the idea is very simple, while decoding the decoded data into the player cache playback just. But because of the time relationship is not done.

Finally found the bass library by accident.


BASS library:http://www.un4seen.com/


I have to say that the library is strong enough.

The try is really seamless, and the bass library itself has other great features to explore.

In addition, the author also said in the forum, the seamless loop is only decoded when decoded to the end of the file to re-decode it from the beginning.


So in the end I chose to have a simple encapsulation of it, a little reference to the MediaPlayer method.

You can see here: Https://github.com/ViTess/Android-OMEPlayer

The plug-in and some sound functions will continue to be packaged later, so you don't have to look at that somewhat confusing document.

Android enables the seamless loop playback of Ogg audio

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.