Nes: fix sweep
This commit is contained in:
@@ -155,12 +155,23 @@ void NesObject::renderOutput( sampleFrame * buf, fpp_t frames )
|
||||
int ch2Sweep = static_cast<int>( m_parent->m_ch2SweepAmt.value() * -1.0 );
|
||||
|
||||
// the amounts are inverted so we correct them here
|
||||
ch1Sweep = ch1Sweep > 0
|
||||
? 7 - ch1Sweep
|
||||
: -7 - ch1Sweep;
|
||||
ch2Sweep = ch2Sweep > 0
|
||||
? 7 - ch2Sweep
|
||||
: -7 - ch2Sweep;
|
||||
if( ch1Sweep > 0 )
|
||||
{
|
||||
ch1Sweep = 8 - ch1Sweep;
|
||||
}
|
||||
if( ch1Sweep < 0 )
|
||||
{
|
||||
ch1Sweep = -8 - ch1Sweep;
|
||||
}
|
||||
|
||||
if( ch2Sweep > 0 )
|
||||
{
|
||||
ch2Sweep = 8 - ch2Sweep;
|
||||
}
|
||||
if( ch2Sweep < 0 )
|
||||
{
|
||||
ch2Sweep = -8 - ch2Sweep;
|
||||
}
|
||||
|
||||
|
||||
// start framebuffer loop
|
||||
|
||||
@@ -63,7 +63,7 @@ const float NOISE_FREQS[16] =
|
||||
const uint16_t LFSR_INIT = 1;
|
||||
const float DUTY_CYCLE[4] = { 0.125, 0.25, 0.5, 0.75 };
|
||||
const float DITHER_AMP = 1.0 / 60.0;
|
||||
const float MIN_FREQ = 20.0;
|
||||
const float MIN_FREQ = 10.0;
|
||||
const int TRIANGLE_WAVETABLE[32] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
||||
15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
|
||||
|
||||
@@ -194,7 +194,7 @@ public:
|
||||
|
||||
virtual f_cnt_t desiredReleaseFrames() const
|
||||
{
|
||||
return( 64 );
|
||||
return( 8 );
|
||||
}
|
||||
|
||||
virtual PluginView * instantiateView( QWidget * parent );
|
||||
|
||||
Reference in New Issue
Block a user