do not synthesize anything if frequency is above half of samplerate

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@909 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-04-12 15:09:14 +00:00
parent 2fcd8150d9
commit 6b7a47aa04

View File

@@ -55,6 +55,11 @@ oscillator::oscillator( const intModel & _wave_shape_model,
void oscillator::update( sampleFrame * _ab, const fpp_t _frames,
const ch_cnt_t _chnl )
{
if( m_freq >= engine::getMixer()->sampleRate()/2 )
{
mixer::clearAudioBuffer( _ab, _frames );
return;
}
if( m_subOsc != NULL )
{
switch( m_modulationAlgoModel.value() )