h6ah4i / android-openslmediaplayer

Re-implementation of Android's MediaPlayer and audio effect classes based on OpenSL ES APIs.
https://openslmediaplayer.h6ah4i.com
Apache License 2.0
417 stars 97 forks source link

Playback Breaks #62

Open mauta-ii-mauta opened 5 years ago

mauta-ii-mauta commented 5 years ago

Hi, I'm using v0.7.5. It generally works well but atleast once or twice as media is playing back, the sound glitches/breaks/clips temporarily then goes back to normal after some seconds. Is there a way to fix this? my code: `
options |= OpenSLMediaPlayerContext.OPTION_USE_BASSBOOST; options |= OpenSLMediaPlayerContext.OPTION_USE_VIRTUALIZER; options |= OpenSLMediaPlayerContext.OPTION_USE_HQ_EQUALIZER; options |= OpenSLMediaPlayerContext.OPTION_USE_PREAMP; options |= OpenSLMediaPlayerContext.OPTION_USE_HQ_VISUALIZER; options |= OpenSLMediaPlayerContext.RESAMPLER_QUALITY_HIGH;

    params = new OpenSLMediaPlayerContext.Parameters();
    params.useLowLatencyIfAvailable = true;
    params.streamType = AudioManager.STREAM_MUSIC;
    params.options = options;

    playerFactory= new HybridMediaPlayerFactory(this, params) {
        @Override
        protected int getMediaPlayerOptions () {
            return 0;
        }
    };
    mPlayer= playerFactory.createMediaPlayer();`