From 3b7c5edcfa07c392639c19b7a7f05212b6a38485 Mon Sep 17 00:00:00 2001 From: Alexandre Savard <alexandre.savard@savoirfairelinux.com> Date: Wed, 22 Aug 2012 12:43:02 -0400 Subject: [PATCH] #14848: rename samplerate variable in manager when loading a file for clarity --- daemon/src/managerimpl.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/daemon/src/managerimpl.cpp b/daemon/src/managerimpl.cpp index 050c59bf2c..31d8d3041c 100644 --- a/daemon/src/managerimpl.cpp +++ b/daemon/src/managerimpl.cpp @@ -1736,7 +1736,7 @@ void ManagerImpl::ringtone(const std::string& accountID) + RINGDIR + DIR_SEPARATOR_STR + ringchoice; } - int samplerate; + int audioLayerSmplr = 8000; { ost::MutexLock lock(audioLayerMutex_); @@ -1745,7 +1745,7 @@ void ManagerImpl::ringtone(const std::string& accountID) return; } - samplerate = audiodriver_->getSampleRate(); + audioLayerSmplr = audiodriver_->getSampleRate(); } { @@ -1758,7 +1758,7 @@ void ManagerImpl::ringtone(const std::string& accountID) try { if (ringchoice.find(".wav") != std::string::npos) - audiofile_.reset(new WaveFile(ringchoice, samplerate)); + audiofile_.reset(new WaveFile(ringchoice, audioLayerSmplr)); else { sfl::Codec *codec; if (ringchoice.find(".ul") != std::string::npos or ringchoice.find(".au") != std::string::npos) @@ -1766,7 +1766,7 @@ void ManagerImpl::ringtone(const std::string& accountID) else throw AudioFileException("Couldn't guess an appropriate decoder"); - audiofile_.reset(new RawFile(ringchoice, static_cast<sfl::AudioCodec *>(codec), samplerate)); + audiofile_.reset(new RawFile(ringchoice, static_cast<sfl::AudioCodec *>(codec), audioLayerSmplr)); } } catch (const AudioFileException &e) { ERROR("Exception: %s", e.what()); -- GitLab