mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +02:00
The code related to t.audio.mixwithsystem=true is run before the audio module is loaded. Fixes issue #1430.
This commit is contained in:
+5
-2
@@ -347,7 +347,7 @@ void vibrate()
|
||||
}
|
||||
}
|
||||
|
||||
void setAudioMixWithOthers(bool mixEnabled)
|
||||
bool setAudioMixWithOthers(bool mixEnabled)
|
||||
{
|
||||
@autoreleasepool
|
||||
{
|
||||
@@ -357,8 +357,11 @@ void setAudioMixWithOthers(bool mixEnabled)
|
||||
if (mixEnabled)
|
||||
category = AVAudioSessionCategoryAmbient;
|
||||
|
||||
if (![[AVAudioSession sharedInstance] setCategory:category error:&err])
|
||||
bool success = [[AVAudioSession sharedInstance] setCategory:category error:&err];
|
||||
if (!success)
|
||||
NSLog(@"Error in AVAudioSession setCategory: %@", [err localizedDescription]);
|
||||
|
||||
return success;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user