Move waveform generation away from main

This commit is contained in:
Vesa
2014-04-09 13:30:17 +03:00
parent d5fa2568ed
commit 2bfd19cc44
4 changed files with 12 additions and 5 deletions

View File

@@ -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;
}

View File

@@ -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 );