cassette
cassette copied to clipboard
Sound works ~14 times and then stops working
Hi man, awesome job with the library, it seems like it is the only one that actually does work with android and it's exciting to see possible manipulations with music via processing on android.
Nevertheless, there is some sort of a glitch that prevents the music from playing once it gets repeated, in my case around 14 times. I saw someone having the same issue on the processing forum: https://forum.processing.org/two/discussion/19302/using-android-mediaplayer-to-play-sound Although in that case it was 7 times.
May I ask whether you would know where does the error come from or whether it is easy to fix? As processing does not throw any error whatsoever which seems suspicious.
Once again, thanks mate for your great work!
Hello ! The exactly same thing is happening to me
(Using Processing for Android, similair to Java) It only works 1 time for me if I load the SoundFile in setup. It works exactly 14 times if I load the SoundFile right before I play the sound.
This indeed only seems like the only library that works on Android, I've tried many. It would be great if you could fix it!
Also, it doesn't matter if you use different files. There's a maximum of 14 playbacks. If you have 2 files, it doesn't go to 28.
code is something like:
music.play(); if(mousePressed) music.stop();'
And repeating that( of course only executing play() and stop() once, only when state changes)
So, i´ve decided to change library for playing sounds in processing for android.
This thread give me the solution : https://discourse.processing.org/t/a-working-sound-playing-app-sketch-works-as-of-may-27-2018/451/18
If I load the resource again, it is limited to 14 plays. If I don't load the resource again, it is limited to 1 play.
So that solution doesn't work
But yeah, MediaPlayer might work better. It's a lot more complicated though, so it would be nice if this library gets fixed, because of it's simplicity
@Aurelian24 Does this solution work for Android as well? Seems like it, looking forward to trying it out :)
In case of this library: I somehow managed to stuff three tracks into an app and miraculously the sounds would not crash. But if I changed the sounds to some other configuration with the same names or even the same sounds but converted differently, the sounds would... crash.
I have no idea what's the root of the problem but that must be an eerie one.