Code Monkey home page Code Monkey logo

Comments (12)

alnitak avatar alnitak commented on June 5, 2024 1

I tried on these devices without seeing the problem:
Xiaomi Mi 6
Xiaomi Mi Max 3
Xiaomi Note 8 Pro
Samsung Galaxy s9
Samsung Galaxy Note S10 and S20
Huawei P smart Z

I leave this issue open, maybe we will find something, or maybe someone else can help!

from flutter_soloud.

synchronisator avatar synchronisator commented on June 5, 2024

To clarify: The Problem does NOT appear on Linux, only on Android

from flutter_soloud.

alnitak avatar alnitak commented on June 5, 2024

Hi, that log comes from the OS not from the plugin.
I guess the device is not fast enough to read or decode the file to fill the audio buffer when it needs samples to output. For this reason, you may notice audio glitches.

  1. On which device are you noticing this problem and which Android version does it have?
  2. I tried (the example audio samples) on a bunch of devices without seeing that log. Can you provide me the audio you used?
  3. Does it happen also when running the plugin example?
  4. Does it happens also by pressing a note for a long time in the waveform tab in the example? (There, is not used an audio file but the wave data is generated)

Thanks for reporting this, hope we will resolve it!

from flutter_soloud.

synchronisator avatar synchronisator commented on June 5, 2024

Thanks for your answer.

  1. its a Xiaomi Redmi note 7 with Android 10 QKQ1.190910.002
  2. Thats the curios part. The error occurs immidiatly after the init. I have not loaded any audio.file at this time. The init does not get any error.
  3. I have not tested this yet. Sorry.
    4.) Not tested this either, but i think it is not relevant because the output is there without giving it a audio-output at all.

Thank you very much for anserwing so quick. I hope we find the problem :)

from flutter_soloud.

synchronisator avatar synchronisator commented on June 5, 2024

There is an unaswered Question on stackoverflow...
https://stackoverflow.com/questions/63910496/many-times-in-the-log-i-get-the-same-error-processaudiobuffer34-obtainbuffe

from flutter_soloud.

alnitak avatar alnitak commented on June 5, 2024

I found that too! :)
I read this also which is, more or less, old as the other one.

I am trying on some devices but with no luck seeing that log!
Maybe worth trying to call SoLoud().startIsolate() somewhere else in the code, ie when you need to play a file and see if that happens. Because I am trying now on a Xiaomi Redmi Note 8 Pro and I see:
I/AudioTrack(27834): isLongTimeZeroData zero date time 2 Seconds
I mean, don't start isolate before the runApp in main

from flutter_soloud.

synchronisator avatar synchronisator commented on June 5, 2024

I just checked on a samsung galaxy s8 running android 9 and the problem does not appear.
Thanks for the hint, i will try this.

from flutter_soloud.

synchronisator avatar synchronisator commented on June 5, 2024

Changing the position in the code where it is called is not relevant. It happens everytime the init is called.

from flutter_soloud.

synchronisator avatar synchronisator commented on June 5, 2024

I posted this question on the mini audio discord.
I got this reply:

Not sure what's going on there. Never seen that error before. Do you know what backend SoLoud is using? If it's using it's stock OpenSL backend, do you know if it's possible to switch to SoLoud's miniaudio backend instead?

I don't have the most experience with Android, but just from bug reports I hear through miniaudio it seems like Android is very inconsistent. You'll just get random errors on random hardware across different versions of Android. It's very annoying.

Can you answer the questions?
Thanks

from flutter_soloud.

alnitak avatar alnitak commented on June 5, 2024

This plugin uses Soloud with miniaudio enabled on all platforms with this C code

SoLoud::result result = soloud.init(
        SoLoud::Soloud::CLIP_ROUNDOFF,
        SoLoud::Soloud::MINIAUDIO, 44100, 2048, 2U);

If I remember well, miniaudio makes use of OpenSL on Android < 8 and AAudio on Android >= 8 where AAudio was introduced.

from flutter_soloud.

alnitak avatar alnitak commented on June 5, 2024

The only thing I could think for now, is that the loop in the audio_isolate can cause a CPU overload.
Could you please try to raise the Duration from 10 to maybe 50 or 100, or maybe comment all the Future.delayed in audio_isolate.dart? And then try to play a sound

from flutter_soloud.

synchronisator avatar synchronisator commented on June 5, 2024

Changing the delay does not change the consoleoutput.

from flutter_soloud.

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.