-
-
Notifications
You must be signed in to change notification settings - Fork 40
fix: App freezing #201
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
Comments
Hi @TimeLord2010, I tried your code with your vit_gpt_flutter_api package, but only on the simulator. With or without the completer, the code worked as expected. To feed the buffer I used random numbers. the code I used:
Also, the addAudioDataStream should throw if the player has not been initialized or the I have no clues about this issue. Could you provide a minimal, complete project without third-party packages to reproduce the issue? |
Description
When in buffering mode, the app crashed after some time after receiving some data. I have a strong belief that this was caused by feeding the audio data to the player while or before a buffer stream was created.
I was struggling with this issue for about two weeks, tried different approaches, and even other packages (turns out, yours is actually the best for my case). The app started to freeze suddely without any notice or error message, even when if I moved the player code to an isolate.
Here is my player class:
After I introduced the
Completer
to prevent data from being sent to the player before the buffer was created, the issue was no longer seem. But it would be awesome if a error message warned the dev about this.One other possible cause that I did not test, was initializing the player with the no parameters for channels and sample rate. All I did was add the Completer and the parameters to the init function also and it worked, so what solved it could be any of these.
Additional Context
Platform: IOS 18.
The text was updated successfully, but these errors were encountered: