SwiftySound
SwiftySound copied to clipboard
instance play not works.
Hello,
This works:
Sound.play(url: realFile, numberOfLoops: numLoop)
but, this is not working:
let mySound = Sound(url: realFile)
mySound?.volume = Float(volume) //volume is absolutely 1.0, checked.
mySound?.play(numberOfLoops: numLoop)
Any suggestion? Thank you.
Hello,
Have you checked the example app? It works there
Thanks, Adam
Yes I have. checked the demo, when I use
Sound.play(url: realFile, numberOfLoops: numLoop)
it works, but I need to adjust the volume, so I changed the code to:
let mySound = Sound(url: realFile)
mySound?.volume = Float(volume)
mySound?.play(numberOfLoops: numLoop)
it doesn't work, everything else is the same. (I'm not using a file in the Bundle, I'm trying to play an .mp3 file in the documents folder btw)