Core/burn/snd/es5506.cpp
/**********************************************************************************************

     generate_dummy -- generate nothing, just apply envelopes

***********************************************************************************************/
- generate nothing, just apply envelopes
- generate nothing just apply envelopes
static void generate_dummy(es5506_voice *voice, UINT16 *, INT32 *, INT32 *, INT32 samples)
{
	UINT32 freqcount = voice->freqcount;
	UINT32 accum = voice->accum & voice->accum_mask;
	while (samples > 0 && !(voice->control & CONTROL_STOPMASK))
	{
reverse:
		if (!(voice->control & CONTROL_DIR))
		{
			while (samples--)
			{
				accum = (accum + freqcount) & voice->accum_mask;
				if (voice->ecount != 0)
					update_envelopes(voice, 1);
				check_for_end_forward(voice, accum);
			}
		}
		else
		{
			while (samples--)
			{
				accum = (accum - freqcount) & voice->accum_mask;
				if (voice->ecount != 0)
					update_envelopes(voice, 1);
				check_for_end_reverse(voice, accum);
			}
		}
	}
alldone:
	voice->accum = accum;
	if (samples > 0)
		update_envelopes(voice, samples);
}
static void generate_dummy ( es5506_voice * voice , UINT16 * , INT32 * , INT32 * , INT32 samples ) { UINT32 freqcount = voice -> freqcount ; UINT32 accum = voice -> accum & voice -> accum_mask ; while ( samples > 0 && ! ( voice -> control & CONTROL_STOPMASK ) ) { reverse : if ( ! ( voice -> control & CONTROL_DIR ) ) { while ( samples -- ) { accum = ( accum + freqcount ) & voice -> accum_mask ; if ( voice -> ecount != 0 ) update_envelopes ( voice , 1 ) ; check_for_end_forward ( voice , accum ) ; } } else { while ( samples -- ) { accum = ( accum - freqcount ) & voice -> accum_mask ; if ( voice -> ecount != 0 ) update_envelopes ( voice , 1 ) ; check_for_end_reverse ( voice , accum ) ; } } } alldone : voice -> accum = accum ; if ( samples > 0 ) update_envelopes ( voice , samples ) ; }
generate_dummy -- generate nothing, just apply envelopes
generate_dummy -- generate nothing just apply envelopes
/* outer loop, in case we switch directions */ /* two cases: first case is forward direction */ /* loop while we still have samples to generate */ /* fetch two samples */ /* update filters/volumes */ /* check for loop end */ /* two cases: second case is backward direction */ /* loop while we still have samples to generate */ /* fetch two samples */ /* update filters/volumes */ /* check for loop end */ /* if we stopped, process any additional envelope */