From b6db2bc10786783384b8e98db3b945a09decddf3 Mon Sep 17 00:00:00 2001 From: Kamil Lipiszko Date: Wed, 4 Jan 2017 14:00:35 +0100 Subject: [PATCH] [Ring] Use alarm's ringtone and volume. Change-Id: I9ae0308f74809267ba6c13bf7501dc1769ef490a --- clock/src/Model/Ring.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/clock/src/Model/Ring.cpp b/clock/src/Model/Ring.cpp index e056c58..dbc5956 100644 --- a/clock/src/Model/Ring.cpp +++ b/clock/src/Model/Ring.cpp @@ -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() -- 2.7.4