Fixes bug where Peeking + Popping into a game resulted in slightly delayed audio
This commit is contained in:
parent
290f1b93e5
commit
572ef0abec
@ -106,6 +106,11 @@ class EmulationViewController: UIViewController
|
|||||||
self.deferredPreparationHandler?()
|
self.deferredPreparationHandler?()
|
||||||
self.deferredPreparationHandler = nil
|
self.deferredPreparationHandler = nil
|
||||||
|
|
||||||
|
// Toggle audioManager.enabled to reset the audio buffer and ensure the audio isn't delayed from the beginning
|
||||||
|
// This is especially noticeable when peeking a game
|
||||||
|
self.emulatorCore.audioManager.enabled = false
|
||||||
|
self.emulatorCore.audioManager.enabled = true
|
||||||
|
|
||||||
switch self.emulatorCore.state
|
switch self.emulatorCore.state
|
||||||
{
|
{
|
||||||
case .Stopped: self.emulatorCore.startEmulation()
|
case .Stopped: self.emulatorCore.startEmulation()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user