play *after* stop

In theory this shouldn't make a difference, since we're not playing the
ringer twice, but in practice I fail to here ringer audio 50% of the
time (in DEBUG builds) while app is in the foreground.

// FREEBIE
pull/1/head
Michael Kirk 8 years ago
parent 8abde1dff8
commit 43a3a4afaf

@ -253,13 +253,13 @@ import AVFoundation
private func play(sound: Sound) {
guard let newPlayer = sound.player else {
Logger.error("\(self.TAG) unable to build player")
assertionFailure()
return
}
Logger.info("\(self.TAG) playing sound: \(sound.filePath)")
newPlayer.play()
self.currentPlayer?.stop()
newPlayer.play()
self.currentPlayer = newPlayer
}

Loading…
Cancel
Save