Giter Site home page Giter Site logo

Comments (9)

ryanheise avatar ryanheise commented on July 4, 2024 1

I don't use VSCode, but I searched and found this: https://marketplace.visualstudio.com/items?itemName=abhiagr.logcat

from just_audio.

ryanheise avatar ryanheise commented on July 4, 2024

Just to clarify, does it happen with the example application when switching in your m4a file?

I have a theory on what is causing it. I added some code to "re-seek" when the initial seek missed the mark (which happens, since MediaExtractor actually has quite poor seek accuracy in some situations - a flaw which also exists in the higher level MediaPlayer API).

If this is what's happening, you'll see the plugin output "Too early, re-seeking" in logcat, generated by this code:

                if (System.currentTimeMillis() - behindStartTime > BEHIND_LIMIT) {
                  System.out.println("Too early, re-seeking");
                  extractor.seekTo(start*1000L, MediaExtractor.SEEK_TO_CLOSEST_SYNC);
                  behindStartTime = 0;
                }

You can try commenting out this code and see if it helps. If it's the culprit, I'll delete that code.

from just_audio.

BeMacized avatar BeMacized commented on July 4, 2024

Just to clarify, does it happen with the example application when switching in your m4a file?

Yes.

You can try commenting out this code and see if it helps. If it's the culprit, I'll delete that code.

Indeed, when looking in logcat i found those messages. Commenting out this section seems to have fixed my issue.

from just_audio.

rohansohonee avatar rohansohonee commented on July 4, 2024

Why am i not getting the logs printed out in my console????
Even I am facing similar issues with seek but my application just crashes abruptly. Not able to pin point the cause.
Also nothing is getting printed on console???
Log.d() and System.out.println from native code not printing in console at all??
Only dart print() is showing in my console.
I think flutter 1.12 maybe the culprit. Can you tell me how you are getting the logs to work??

from just_audio.

ryanheise avatar ryanheise commented on July 4, 2024

I noticed that too. To see the full logs, I run adb logcat directly from the command line. Some IDEs may have a built in logcat viewer, or at least Android Studio would have it.

from just_audio.

rohansohonee avatar rohansohonee commented on July 4, 2024

I am using VS Code.

from just_audio.

ryanheise avatar ryanheise commented on July 4, 2024

I've just published the fix in 0.0.4.

@rohansohonee hopefully if you can see the logcat output for your issue, you can post it in a new issue.

from just_audio.

BeMacized avatar BeMacized commented on July 4, 2024

I've just published the fix in 0.0.4.

Thank you!

from just_audio.

github-actions avatar github-actions commented on July 4, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs, or use StackOverflow if you need help with just_audio.

from just_audio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.