-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
sound.length not returning correctly #67
Comments
Branch started to fix the issue, but i got weird results. First, we can know the duration of a sound only when it's correctly loaded, any call to the MediaPlayer.getDuration will lead to error like:
The question is: should we sync the loading (as pygame does by default) on android? We might get some lag then. Also, the duration was correct when playing, but in milliseconds. Then i tried to / 1000. to get seconds, and the division result is just a very weird number. Maybe the java part is wrong. Anyway, will continue later. |
This is the branch: https://github.com/kivy/python-for-android/tree/fix-sound-length |
Has there been any change for this? I'm having the same issue and sound length is critical. |
I'm hitting this error now, and I'm wondering if it has something to do with Python 2 implicitly casting a float to an integer. Just a thought. p.s. Once this issue is fixed it would be nice to inform this thread about it too. |
@tito Does this kivy/kivy#2776 mean this is taken care of? |
As a workaround, I pre-saved all my sound lengths to CSV using the
Then I load sounds using the static method
|
Closing as this issue relates to the old toolchain which is no longer supported. Please open a new issue if you experience this issue with the current master branch. |
sound.length seems to always return 1.0 on Android.
https://groups.google.com/forum/?fromgroups=#!topic/kivy-users/Dzf2ubmxILU
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: