SwiftySound icon indicating copy to clipboard operation
SwiftySound copied to clipboard

instance play not works.

Open isayeter opened this issue 1 year ago • 3 comments

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.

isayeter avatar Mar 25 '24 13:03 isayeter

Hello,

Have you checked the example app? It works there

Thanks, Adam

adamcichy avatar Mar 25 '24 14:03 adamcichy

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)

isayeter avatar Mar 25 '24 16:03 isayeter