create RageSoundReader_Resample_Good directly

This commit is contained in:
Glenn Maynard
2006-11-29 02:20:42 +00:00
parent f2b893939d
commit 3e11c3ca8e
2 changed files with 4 additions and 5 deletions
+2 -2
View File
@@ -30,7 +30,7 @@
#include "RageSoundUtil.h"
#include "RageSoundReader_Preload.h"
#include "RageSoundReader_Resample.h"
#include "RageSoundReader_Resample_Good.h"
#include "RageSoundReader_FileReader.h"
static const int channels = 2;
@@ -223,7 +223,7 @@ void RageSound::LoadSoundReader( RageSoundReader *pSound )
const int iNeededRate = SOUNDMAN->GetDriverSampleRate( pSound->GetSampleRate() );
if( iNeededRate != pSound->GetSampleRate() )
{
RageSoundReader_Resample *Resample = RageSoundReader_Resample::MakeResampler();
RageSoundReader_Resample_Good *Resample = new RageSoundReader_Resample_Good;
Resample->Open( pSound );
Resample->SetSampleRate( iNeededRate );
pSound = Resample;
+2 -3
View File
@@ -1,7 +1,7 @@
#include "global.h"
#include "RageSoundReader_Chain.h"
#include "RageSoundReader_FileReader.h"
#include "RageSoundReader_Resample.h"
#include "RageSoundReader_Resample_Good.h"
#include "RageSoundReader_Preload.h"
#include "RageLog.h"
#include "RageUtil.h"
@@ -133,8 +133,7 @@ void RageSoundReader_Chain::Finish()
{
SoundReader *&pSound = it->second;
/* We're preprocessing this; let's just use high quality resampling. */
RageSoundReader_Resample *pResample = RageSoundReader_Resample::MakeResampler( RageSoundReader_Resample::RESAMP_HIGHQUALITY );
RageSoundReader_Resample *pResample = new RageSoundReader_Resample_Good;
pResample->Open( pSound );
pResample->SetSampleRate( m_iPreferredSampleRate );
pSound = pResample;