Comments (12)
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.
To clarify: The Problem does NOT appear on Linux, only on Android
from flutter_soloud.
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.
- On which device are you noticing this problem and which Android version does it have?
- I tried (the example audio samples) on a bunch of devices without seeing that log. Can you provide me the audio you used?
- Does it happen also when running the plugin example?
- 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.
Thanks for your answer.
- its a Xiaomi Redmi note 7 with Android 10 QKQ1.190910.002
- 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.
- 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.
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.
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.
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.
Changing the position in the code where it is called is not relevant. It happens everytime the init is called.
from flutter_soloud.
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.
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.
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.
Changing the delay does not change the consoleoutput.
from flutter_soloud.
Related Issues (20)
- fix: Crash when opening a malformed mp3 file HOT 2
- feat: Make it possible to "instance" SoLoud? HOT 3
- feat: Find a better mechanism than the `audioEvent` stream for listening to changes in the engine HOT 3
- feat: Fail-fast more often HOT 2
- feat: WASM support HOT 27
- chore: Address C++ compilation warnings HOT 2
- proposal: Another set of renames HOT 4
- feat: Implement setProtectVoice() HOT 1
- docs: What does disposeSound actually do? HOT 2
- fix: Wrong error reported when trying to add a filter twice
- bug: crash on deinit() HOT 1
- docs: Document that iOS app gives a warning to the user about microphone permission -- but only in debug mode and not in production HOT 22
- feat: Simplified Recording Mechanism HOT 12
- feat: WaveForm for complete Audiofile HOT 1
- perf: Ability to play precise sound sequences HOT 3
- fix: Missing audio on playing a loaded url HOT 1
- fix: Init error on hot restart HOT 3
- fix: handles become invalid at unknown points HOT 9
- MA_NODE_FLAG_SILENT_OUTPUT duplicates API recursive triggers (bangs) HOT 2
- feat: Set audio session mode to allow audio to mix with others
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_soloud.