Move waveform generation away from main
This commit is contained in:
@@ -27,10 +27,13 @@
|
||||
|
||||
|
||||
WaveMipMap BandLimitedWave::s_waveforms[4] = { };
|
||||
|
||||
bool BandLimitedWave::s_wavesGenerated = false;
|
||||
|
||||
void BandLimitedWave::generateWaves()
|
||||
{
|
||||
// don't generate if they already exist
|
||||
if( s_wavesGenerated ) return;
|
||||
|
||||
int i;
|
||||
|
||||
// saw wave - BLSaw
|
||||
@@ -144,4 +147,6 @@ void BandLimitedWave::generateWaves()
|
||||
}
|
||||
}
|
||||
|
||||
s_wavesGenerated = true;
|
||||
|
||||
}
|
||||
|
||||
@@ -65,7 +65,6 @@
|
||||
#include "ProjectRenderer.h"
|
||||
#include "DataFile.h"
|
||||
#include "song.h"
|
||||
#include "BandLimitedWave.h"
|
||||
|
||||
static inline QString baseName( const QString & _file )
|
||||
{
|
||||
@@ -120,9 +119,6 @@ int main( int argc, char * * argv )
|
||||
new QCoreApplication( argc, argv ) :
|
||||
new QApplication( argc, argv ) ;
|
||||
|
||||
// generate bandlimited wavetables for instruments to use
|
||||
BandLimitedWave::generateWaves();
|
||||
|
||||
Mixer::qualitySettings qs( Mixer::qualitySettings::Mode_HighQuality );
|
||||
ProjectRenderer::OutputSettings os( 44100, false, 160,
|
||||
ProjectRenderer::Depth_16Bit );
|
||||
|
||||
Reference in New Issue
Block a user