From 16c84cfcd81ca128c1b2411a89bb3f4c19fed83b Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Thu, 4 Apr 2013 16:01:39 +0530 Subject: [PATCH] Fix for N_SE-32024: AudioEqualizer should keep its previous set bands setting Change-Id: Icd424d714c0413d1c949afa322894417942094cb Signed-off-by: Amit Kumar --- project/src/Audio/AudioEqualizerForm.cpp | 23 +++++++++++++++++++++++ project/src/Audio/AudioEqualizerForm.h | 1 + 2 files changed, 24 insertions(+) diff --git a/project/src/Audio/AudioEqualizerForm.cpp b/project/src/Audio/AudioEqualizerForm.cpp index a8bee1a..b74ac66 100644 --- a/project/src/Audio/AudioEqualizerForm.cpp +++ b/project/src/Audio/AudioEqualizerForm.cpp @@ -550,6 +550,28 @@ CATCH: return; } +void +AudioEqualizerForm::SetBandsBeforePlay() +{ + AppLog("Enter"); + result r = E_SUCCESS; + int value = 0; + int count = 0; + + count = __sliderList.GetCount(); + Slider* pSlider = null; + + for(int i = 0; i < count; i++) + { + r = __sliderList.GetAt(i, pSlider); + TryReturn(r == E_SUCCESS, ,"__sliderList.GetAt failed! %s", GetErrorMessage(GetLastResult())); + value = pSlider->GetValue(); + r = __pAudioEqualizer->SetBandLevel(i, value); + TryReturn(r == E_SUCCESS, , "AudiEqualizer SetBandLevel() failed!"); + } +} + + result AudioEqualizerForm::GetFileFromConfig(String &filePath) { @@ -614,6 +636,7 @@ AudioEqualizerForm::StartPlay() __pPlayer->SetLooping(true); TryCatch(r == E_SUCCESS, , "SetLooping failed!"); + SetBandsBeforePlay(); r = __pPlayer->Play(); TryCatch(r == E_SUCCESS, , "Play failed!"); diff --git a/project/src/Audio/AudioEqualizerForm.h b/project/src/Audio/AudioEqualizerForm.h index 2b9c532..04d43a7 100644 --- a/project/src/Audio/AudioEqualizerForm.h +++ b/project/src/Audio/AudioEqualizerForm.h @@ -88,6 +88,7 @@ private: void SetSelectedBandLevel(int band, int bandLevel); void SetUserDefined(); void SetButtonChecked(int i); + void SetBandsBeforePlay(void); private: static const int ID_BUTTON_PLAY = 100; static const int ID_BUTTON_STOP = 101; -- 2.7.4