project_files/HedgewarsMobile/Classes/ObjcExports.m
changeset 4948 c3dc41ae68fa
parent 4752 d65705a67c4e
child 4976 088d40d8aba2
--- a/project_files/HedgewarsMobile/Classes/ObjcExports.m	Sat Feb 19 01:01:03 2011 +0100
+++ b/project_files/HedgewarsMobile/Classes/ObjcExports.m	Sat Feb 19 01:38:40 2011 +0100
@@ -154,38 +154,3 @@
 void updateVisualsNewTurn(void) {
     [amvc_instance updateAmmoVisuals];
 }
-
-/*
-// http://stackoverflow.com/questions/287543/how-to-programatically-sense-the-iphone-mute-switch
-BOOL isAppleDeviceMuted(void) {
-    if (!gAudioSessionInited) {
-        AudioSessionInterruptionListener inInterruptionListener = NULL;
-        OSStatus error;
-        if ((error = AudioSessionInitialize(NULL, NULL, inInterruptionListener, NULL)))
-            DLog(@"*** Error *** error in AudioSessionInitialize: %d", error);
-        else
-            gAudioSessionInited = YES;
-    }
-    UInt32 propertySize = sizeof(CFStringRef);
-    BOOL muteResult = NO;
-
-    // this checks if there is volume
-    Float32 volume;
-    OSStatus n = AudioSessionGetProperty(kAudioSessionProperty_CurrentHardwareOutputVolume, &propertySize, &volume);
-    if (n != 0)
-        DLog( @"AudioSessionGetProperty 'volume': %d", n );
-    BOOL volumeResult = (volume == 0.0f);
-    
-    // this checks if the device is muted
-    CFStringRef state;
-    n = AudioSessionGetProperty(kAudioSessionProperty_AudioRoute, &propertySize, &state);
-    if (n != 0)
-        DLog( @"AudioSessionGetProperty 'audioRoute': %d", n );
-    else {
-        NSString *result = (NSString *)state;
-        muteResult = ([result length] == 0);
-        releaseAndNil(result);
-    }
-    return volumeResult || muteResult;
-}
-*/