Open ash0080 opened 2 years ago
Same problem here, I can confirm the issue does not happen in Android devices
Same problem here, I can confirm the issue does not happen in Android devices
I switched to audioplayers
I have a question: Specification of SoundPool states:
Sounds can be looped by setting a non-zero loop value. A value of -1 causes the sound to loop forever. In this case, the application must explicitly call the stop() function to stop the sound. Any other non-zero value will cause the sound to repeat the specified number of times, e.g. a value of 3 causes the sound to play a total of 4 times.
but in the code there is:
assert(soundId > -1,
"Invalid 'soundId' parameter. Only values greater than -1 are valid.");
Should't it handle >=-1
?
There is also setLoop API, but unfortunatelly it's not implemented here ;(
I have a question: Specification of SoundPool states:
Sounds can be looped by setting a non-zero loop value. A value of -1 causes the sound to loop forever. In this case, the application must explicitly call the stop() function to stop the sound. Any other non-zero value will cause the sound to repeat the specified number of times, e.g. a value of 3 causes the sound to play a total of 4 times.
but in the code there is:
assert(soundId > -1, "Invalid 'soundId' parameter. Only values greater than -1 are valid.");
Should't it handle
>=-1
?
soundId
is a key to decoded sound content in the storage not number of repeats.
The number of loops is passed directly to play
method here as repeat
variable.
@ukasz123, oh, you're right. I've mistaken soundId
with repeat
:D
but setLoop
is not implemented, right?
It would be also great if you add -1
as infinite
into the documentation :)
iOS / macOS version 2.3.0
No matter how many repeat settings are set, it will only play once Because of a bug, I haven't been able to test it on Android