[Ring] Use alarm's ringtone and volume. 89/108489/3
authorKamil Lipiszko <k.lipiszko@samsung.com>
Wed, 4 Jan 2017 13:00:35 +0000 (14:00 +0100)
committerLukasz Stanislawski <l.stanislaws@samsung.com>
Wed, 4 Jan 2017 13:21:51 +0000 (05:21 -0800)
Change-Id: I9ae0308f74809267ba6c13bf7501dc1769ef490a

clock/src/Model/Ring.cpp

index e056c58..dbc5956 100644 (file)
@@ -17,6 +17,9 @@
 #include "Model/Ring.h"
 #include "Utils/SoundManager.h"
 #include "Utils/FeedbackManager.h"
+#include "Utils/Utils.h"
+
+#define DEFAULT_SOUND_PATH "ringtones/alarm.mp3"
 
 namespace model {
 
@@ -88,10 +91,11 @@ namespace model {
        void Ring::SoundPlay()
        {
                if (alarm_)
-                       utils::SoundManager::SoundPlay("/opt/share/settings/Ringtones/ringtone_sdk.mp3");
-                       //utils::SoundManager::SoundPlay(alarm_->GetMelody()); TODO
+                       utils::SoundManager::SoundPlay(alarm_->GetMelody(), alarm_->GetVolume());
                else
-                       utils::SoundManager::SoundPlay("/opt/share/settings/Ringtones/ringtone_sdk.mp3");
+                       utils::SoundManager::SoundPlay(
+                                       utils::Utils::GetAppResourcePath(
+                                               utils::Utils::APP_DIR_SHARED_RESOURCE, DEFAULT_SOUND_PATH));
        }
 
        void Ring::SoundStop()