if(res != E_SUCCESS)
{
AppLogDebug("__pReminderPlayer Construct failed with %d",res);
+ delete __pReminderPlayer;
+ __pReminderPlayer = null;
return;
}
res = __pReminderPlayer->OpenFile(reminderTonePath,false);
if(res != E_SUCCESS)
{
AppLogDebug("__pReminderPlayer OpenFile failed with %d",res);
+ delete __pReminderPlayer;
+ __pReminderPlayer = null;
return;
}
res = __pReminderPlayer->SetLooping(false);
if(res != E_SUCCESS)
{
AppLogDebug("__pReminderPlayer SetLooping failed with %d",res);
+ delete __pReminderPlayer;
+ __pReminderPlayer = null;
return;
}
res = __pReminderPlayer->SetVolume(80);
if(res != E_SUCCESS)
{
AppLogDebug("__pReminderPlayer SetVolume failed with %d",res);
+ delete __pReminderPlayer;
+ __pReminderPlayer = null;
return;
}
}
if(res != E_SUCCESS)
{
AppLogDebug("__pDisconnectPlayer Construct failed with %d",res);
+ delete __pDisconnectPlayer;
+ __pDisconnectPlayer = null;
return;
}
res = __pDisconnectPlayer->OpenFile(disconnectTonePath,false);
if(res != E_SUCCESS)
{
AppLogDebug("__pDisconnectPlayer OpenFile failed with %d",res);
+ delete __pDisconnectPlayer;
+ __pDisconnectPlayer = null;
return;
}
res = __pDisconnectPlayer->SetLooping(false);
if(res != E_SUCCESS)
{
AppLogDebug("__pDisconnectPlayer SetLooping failed with %d",res);
+ delete __pDisconnectPlayer;
+ __pDisconnectPlayer = null;
return;
}
res = __pDisconnectPlayer->SetVolume(80);
if(res != E_SUCCESS)
{
AppLogDebug("__pDisconnectPlayer SetLooping SetVolume with %d",res);
+ delete __pDisconnectPlayer;
+ __pDisconnectPlayer = null;
return;
}
if(res != E_SUCCESS)
{
AppLogDebug("__pConnectPlayer Construct failed with %d",res);
+ delete __pConnectPlayer;
+ __pConnectPlayer = null;
return;
}
res = __pConnectPlayer->OpenFile(connectTonePath,false);
if(res != E_SUCCESS)
{
AppLogDebug("__pConnectPlayer OpenFile failed with %d",res);
+ delete __pConnectPlayer;
+ __pConnectPlayer = null;
return;
}
res = __pConnectPlayer->SetLooping(false);
if(res != E_SUCCESS)
{
AppLogDebug("__pConnectPlayer SetLooping failed with %d",res);
+ delete __pConnectPlayer;
+ __pConnectPlayer = null;
return;
}
res = __pConnectPlayer->SetVolume(80);
if(res != E_SUCCESS)
{
AppLogDebug("__pConnectPlayer SetVolume failed with %d",res);
+ delete __pConnectPlayer;
+ __pConnectPlayer = null;
return;
}
}
if(res != E_SUCCESS)
{
AppLogDebug("__pWaitingTonePlayer Construct failed with %d",res);
+ delete __pWaitingTonePlayer;
+ __pWaitingTonePlayer = null;
return;
}
res = __pWaitingTonePlayer->OpenFile(waitingTonePath,false);
if(res != E_SUCCESS)
{
AppLogDebug("__pWaitingTonePlayer OpenFile failed with %d",res);
+ delete __pWaitingTonePlayer;
+ __pWaitingTonePlayer = null;
+
return;
}
res = __pWaitingTonePlayer->SetLooping(true);
if(res != E_SUCCESS)
{
AppLogDebug("__pWaitingTonePlayer SetLooping failed with %d",res);
+ delete __pWaitingTonePlayer;
+ __pWaitingTonePlayer = null;
+
return;
}
res = __pWaitingTonePlayer->SetVolume(80);
if(res != E_SUCCESS)
{
AppLogDebug("__pWaitingTonePlayer SetVolume failed with %d",res);
+ delete __pWaitingTonePlayer;
+ __pWaitingTonePlayer = null;
+
return;
}
}
if(res != E_SUCCESS)
{
AppLogDebug("__pPlayer Construct failed with %d",res);
+ delete __pPlayer;
+ __pPlayer = null;
return;
}
}
if (__isSoundStatusOn == true)
{
//todo: stop player
- AppLogDebug("Stopping ring tone");
- if(__pPlayer->GetState() == PLAYER_STATE_PLAYING)
- {
- res = __pPlayer->Stop();
- }
- if(res != E_SUCCESS)
+ if(__pPlayer != null)
{
- AppLogDebug("__pPlayer Stop failed with %d",res);
- return;
- }
- res = __pPlayer->Close();
- if(res != E_SUCCESS)
- {
- AppLogDebug("__pPlayer Close failed with %d",res);
- return;
+ AppLogDebug("Stopping ring tone");
+ if(__pPlayer->GetState() == PLAYER_STATE_PLAYING)
+ {
+ res = __pPlayer->Stop();
+ }
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer Stop failed with %d",res);
+ return;
+ }
+ res = __pPlayer->Close();
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer Close failed with %d",res);
+ return;
+ }
+ SetSoundMode(SOUND_MODE_VOICE);
+ __isSoundStatusOn = false;
+ StopSession();
}
- SetSoundMode(SOUND_MODE_VOICE);
- __isSoundStatusOn = false;
- StopSession();
}
if (__isVibrateStatusOn == true)
{