create RageSoundReader_Resample_Good directly
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user