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

Sound Randomly Stops #23

Closed
aabosh opened this issue Nov 5, 2017 · 4 comments
Closed

Sound Randomly Stops #23

aabosh opened this issue Nov 5, 2017 · 4 comments

Comments

@aabosh
Copy link

aabosh commented Nov 5, 2017

Hi,

I'm using SwiftySound and I've noticed that when I play a sound, it occasionally stops out of a sudden. It does not always occur, only sometimes. When it does, it seems to happen at a random duration and is unpredictable.

I'm using Sound.play(file: "Timer.m4a") to play and Sound.stop(file: "Timer.m4a") to stop the sound. I've uploaded the audio file here.

Any help would be much appreciated, thanks!

@adamcichy
Copy link
Owner

I will check it out, however it entirely depends on AVFoundation framework and might be not related to SwiftySound itself. Uploaded the file here so it doesn't get lost.
Timer.m4a.zip

@JanX2
Copy link

JanX2 commented May 30, 2018

Is this still current @aabosh?

@saranpol
Copy link

saranpol commented Oct 17, 2018

I have the same problem

My work around is don't use Sound.stop(file: "your_file")
but use

let url = Bundle.main.url(forResource: "question_bg", withExtension: "mp3")
mSoundQuestion = Sound(url: url!)
mSoundQuestion?.play()

and
mSoundQuestion?.stop()
instead.

@adamcichy
Copy link
Owner

Closing this since it isn't reproducible. I ran a final long test with the attached file and it works perfectly.

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

4 participants