Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dispatcher takes time when started from the middle of on audio file #195

Open
reallyouttaworld opened this issue Nov 28, 2020 · 0 comments

Comments

@reallyouttaworld
Copy link

reallyouttaworld commented Nov 28, 2020

Hi, thanks @JorenSix for building this amazing library. I have been using it for quite some time now.

It works great for me except this one thing that I don't know how to fix. When I try to playback an audio file from somewhere in the middle of the song, then it takes some time to start playing from there.

If I try to play it from the beginning then it starts instantly though.

Here is the sample code that I have been using:

        FileInputStream fileInputStream = new FileInputStream(newFile);
        dispatcher = new AudioDispatcher(new UniversalAudioInputStream(fileInputStream, tarsosDSPAudioFormat), bufferSize, overlap);

        dispatcher.addAudioProcessor(new AndroidAudioPlayer(tarsosDSPAudioFormat, 6202, AudioManager.STREAM_MUSIC));
        dispatcher.addAudioProcessor(pitchProcessor);

        dispatcher.skip(skip - 0.10);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant