Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumblekit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikkel Krautz <mikkel@krautz.dk>2014-03-11 01:40:56 +0400
committerMikkel Krautz <mikkel@krautz.dk>2014-03-11 02:58:43 +0400
commit0d753bceb48025c85f05f2ccc2de417ed7b7d6fb (patch)
tree44311cc806a203ae867daa5f37d9951f602620fa
parent3868c44ad1dd3680809f92cac1a3d058040b60df (diff)
MKAudio: handle RouteConfigurationChange in AudioSession route change callback.
This fixes the erroneous infinite restarting bug, which is seen when running 'Mumble for iOS' 1.2.3 on iOS 7.1. Something with the VPIO AudioUnit is causing the route change reason kAudioSessionRouteChangeReason_RouteConfigurationChange to be emitted. This seemingly happens when the VPIO AudioUnit is initialized, or somewhere around it. The MKAudio code didn't handle this change reason (it was introduced in iOS 7.0). Because MKAudio didn't handle it, it was treated as a 'restart' reason, and thus MKAudio would restart both MKAudioInput and MKAudioOutput when it received the RouteConfigurationChange reason. This restart triggered the same change reason to be emitted, leaving MumbleKit's audio subsystem in an infinite restart loop.
-rw-r--r--src/MKAudio.m3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/MKAudio.m b/src/MKAudio.m
index c4de70b..c42eaf1 100644
--- a/src/MKAudio.m
+++ b/src/MKAudio.m
@@ -108,6 +108,9 @@ static void MKAudio_AudioRouteChangedCallback(MKAudio *audio, AudioSessionProper
case kAudioSessionRouteChangeReason_Override:
case kAudioSessionRouteChangeReason_CategoryChange:
case kAudioSessionRouteChangeReason_NoSuitableRouteForCategory:
+#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000
+ case kAudioSessionRouteChangeReason_RouteConfigurationChange:
+#endif
NSLog(@"MKAudio: audio route changed, skipping; reason=%i", reason);
return;
}