Skip to content
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

instance play not works. #68

Open
isayeter opened this issue Mar 25, 2024 · 2 comments
Open

instance play not works. #68

isayeter opened this issue Mar 25, 2024 · 2 comments

Comments

@isayeter
Copy link

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.

@adamcichy
Copy link
Owner

Hello,

Have you checked the example app? It works there

Thanks,
Adam

@isayeter
Copy link
Author

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants