Skip to content

Commit

Permalink
SoftAE: Use resampling quality control from GUISettings
Browse files Browse the repository at this point in the history
  • Loading branch information
Karlson2k committed May 1, 2013
1 parent 3dafb60 commit 9b76009
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,8 @@ void CSoftAE::OnSettingsChange(const std::string& setting)
setting == "audiooutput.channels" ||
setting == "audiooutput.useexclusivemode" ||
setting == "audiooutput.multichannellpcm" ||
setting == "audiooutput.stereoupmix")
setting == "audiooutput.stereoupmix" ||
setting == "audiooutput.resamplequality")
{
OpenSink();
}
Expand All @@ -556,6 +557,8 @@ void CSoftAE::LoadSettings()
if (m_stereoUpmix)
CLog::Log(LOGINFO, "CSoftAE::LoadSettings - Stereo upmix is enabled");

m_resampleQuality = (enum AEQuality) g_guiSettings.GetInt("audiooutput.resamplequality");

/* load the configuration */
m_stdChLayout = AE_CH_LAYOUT_2_0;
switch (g_guiSettings.GetInt("audiooutput.channels"))
Expand Down Expand Up @@ -776,7 +779,7 @@ IAEStream *CSoftAE::MakeStream(enum AEDataFormat dataFormat, unsigned int sample
ASSERT(encodedSampleRate);

CSingleLock streamLock(m_streamLock);
CSoftAEStream *stream = new CSoftAEStream(dataFormat, sampleRate, encodedSampleRate, channelLayout, options);
CSoftAEStream *stream = new CSoftAEStream(dataFormat, sampleRate, encodedSampleRate, channelLayout, options, m_resampleQuality);
m_newStreams.push_back(stream);
streamLock.Leave();
// this is really needed here
Expand Down
1 change: 1 addition & 0 deletions xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ class CSoftAE : public IThreadedAE
std::string m_deviceFriendlyName;
bool m_audiophile;
bool m_stereoUpmix;
AEQuality m_resampleQuality;

/* internal vars */
bool m_running, m_reOpen;
Expand Down

0 comments on commit 9b76009

Please sign in to comment.