Skip to content

Commit

Permalink
Fix iOS build error
Browse files Browse the repository at this point in the history
STREGA committed Nov 30, 2023
1 parent 4aff012 commit b46b664
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -74,11 +74,11 @@ internal final class UIKitApplicationDelegate: NSObject, UIApplicationDelegate {
}

if session.secondaryAudioShouldBeSilencedHint {
if let mixer = Game.shared.audio.musicMixers[.music] {
if let mixer = Game.shared.audio.musicMixers[.soundTrack] {
mixer.volume = 0
}
} else {
if let mixer = Game.shared.audio.musicMixers[.music] {
if let mixer = Game.shared.audio.musicMixers[.soundTrack] {
mixer.volume = 1
}
}
@@ -88,14 +88,14 @@ internal final class UIKitApplicationDelegate: NSObject, UIApplicationDelegate {
object: nil,
queue: nil
) { notification in
if notification.userInfo?[AVAudioSessionSilenceSecondaryAudioHintTypeKey] as? Int
== 1
{
if let mixer = Game.shared.audio.musicMixers[.music] {
let userInfo = notification.userInfo
let silenceSecondary = userInfo?[AVAudioSessionSilenceSecondaryAudioHintTypeKey] as? Int
if silenceSecondary == 1 {
if let mixer = Game.shared.audio.musicMixers[.soundTrack] {
mixer.volume = 0
}
} else {
if let mixer = Game.shared.audio.musicMixers[.music] {
if let mixer = Game.shared.audio.musicMixers[.soundTrack] {
mixer.volume = 1
}
}

0 comments on commit b46b664

Please sign in to comment.