You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2013/06/27 01:05:26 UTC

git commit: fixed compile issue with beep

Updated Branches:
  refs/heads/master 20a3e4458 -> 76f2f23b9


fixed compile issue with beep


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/commit/76f2f23b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/tree/76f2f23b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/diff/76f2f23b

Branch: refs/heads/master
Commit: 76f2f23b952fc9ecf14aa5a028bdca03eb15b89c
Parents: 20a3e44
Author: Steven Gill <st...@gmail.com>
Authored: Wed Jun 26 16:05:20 2013 -0700
Committer: Steven Gill <st...@gmail.com>
Committed: Wed Jun 26 16:05:20 2013 -0700

----------------------------------------------------------------------
 src/ios/CDVNotification.m | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration/blob/76f2f23b/src/ios/CDVNotification.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVNotification.m b/src/ios/CDVNotification.m
index 9f0a59b..8e60153 100644
--- a/src/ios/CDVNotification.m
+++ b/src/ios/CDVNotification.m
@@ -125,7 +125,11 @@
 static void playBeep(int count) {
     SystemSoundID completeSound;
     NSURL* audioPath = [[NSBundle mainBundle] URLForResource:@"CDVNotification.bundle/beep" withExtension:@"wav"];
-    AudioServicesCreateSystemSoundID((CFURLRef)audioPath, &completeSound);
+    #if __has_feature(objc_arc)
+        AudioServicesCreateSystemSoundID((__bridge CFURLRef)audioPath, &completeSound);
+    #else
+        AudioServicesCreateSystemSoundID((CFURLRef)audioPath, &completeSound);
+    #endif
     AudioServicesAddSystemSoundCompletion(completeSound, NULL, NULL, soundCompletionCallback, (void*)(count-1));
     AudioServicesPlaySystemSound(completeSound);
 }