Skip to content

Commit

Permalink
LinphoneManager: fix ringtone asset
Browse files Browse the repository at this point in the history
  • Loading branch information
bagage committed Jan 19, 2016
1 parent 2f0b4e0 commit d4103ba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions Classes/LinphoneManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -1458,14 +1458,13 @@ - (void)createLinphoneCore {

// Set audio assets
NSString *ring =
([LinphoneManager bundleFile:[NSString stringWithUTF8String:linphone_core_get_ringback(theLinphoneCore) ?: ""]
.lastPathComponent]
([LinphoneManager
bundleFile:[NSString stringWithUTF8String:linphone_core_get_ring(theLinphoneCore) ?: ""].lastPathComponent]
?: [LinphoneManager bundleFile:@"notes_of_the_optimistic.caf"])
.lastPathComponent;
NSString *ringback =
([LinphoneManager
bundleFile:[NSString stringWithUTF8String:linphone_core_get_remote_ringback_tone(theLinphoneCore) ?: ""]
.lastPathComponent]
([LinphoneManager bundleFile:[NSString stringWithUTF8String:linphone_core_get_ringback(theLinphoneCore) ?: ""]
.lastPathComponent]
?: [LinphoneManager bundleFile:@"ringback.wav"])
.lastPathComponent;
NSString *hold =
Expand All @@ -1474,8 +1473,8 @@ - (void)createLinphoneCore {
?: [LinphoneManager bundleFile:@"hold.caf"])
.lastPathComponent;

linphone_core_set_ringback(theLinphoneCore, [LinphoneManager bundleFile:ring].UTF8String);
linphone_core_set_remote_ringback_tone(theLinphoneCore, [LinphoneManager bundleFile:ringback].UTF8String);
linphone_core_set_ring(theLinphoneCore, [LinphoneManager bundleFile:ring].UTF8String);
linphone_core_set_ringback(theLinphoneCore, [LinphoneManager bundleFile:ringback].UTF8String);
linphone_core_set_play_file(theLinphoneCore, [LinphoneManager bundleFile:hold].UTF8String);

/* set the CA file no matter what, since the remote provisioning could be hitting an HTTPS server */
Expand Down
2 changes: 1 addition & 1 deletion linphone-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>3</string>
<string>4</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationExitsOnSuspend</key>
Expand Down

0 comments on commit d4103ba

Please sign in to comment.