Core/burn/snd/burn_ym2612.cpp
// ----------------------------------------------------------------------------
// Execute YM2612 for part of a frame
Execute YM2612 for part of a frame
Execute YM2612 for part of a frame
static void YM2612Render(INT32 nSegmentLength)
{
#if defined FBA_DEBUG
	if (!DebugSnd_YM2612Initted) bprintf(PRINT_ERROR, _T("YM2612Render called without init\n"));
#endif
	if (nYM2612Position >= nSegmentLength) {
		return;
	}
	nSegmentLength -= nYM2612Position;
	pYM2612Buffer[0] = pBuffer + 0 * 4096 + 4 + nYM2612Position;
	pYM2612Buffer[1] = pBuffer + 1 * 4096 + 4 + nYM2612Position;
	YM2612UpdateOne(0, &pYM2612Buffer[0], nSegmentLength);
	if (nNumChips > 1) {
		pYM2612Buffer[2] = pBuffer + 2 * 4096 + 4 + nYM2612Position;
		pYM2612Buffer[3] = pBuffer + 3 * 4096 + 4 + nYM2612Position;
		YM2612UpdateOne(1, &pYM2612Buffer[2], nSegmentLength);
	}
	nYM2612Position += nSegmentLength;
}
static void YM2612Render ( INT32 nSegmentLength ) { #if defined FBA_DEBUG if ( ! DebugSnd_YM2612Initted ) bprintf ( PRINT_ERROR , _T ( " \n " ) ) ; #endif if ( nYM2612Position >= nSegmentLength ) { return ; } nSegmentLength -= nYM2612Position ; pYM2612Buffer [ 0 ] = pBuffer + 0 * 4096 + 4 + nYM2612Position ; pYM2612Buffer [ 1 ] = pBuffer + 1 * 4096 + 4 + nYM2612Position ; YM2612UpdateOne ( 0 , & pYM2612Buffer [ 0 ] , nSegmentLength ) ; if ( nNumChips > 1 ) { pYM2612Buffer [ 2 ] = pBuffer + 2 * 4096 + 4 + nYM2612Position ; pYM2612Buffer [ 3 ] = pBuffer + 3 * 4096 + 4 + nYM2612Position ; YM2612UpdateOne ( 1 , & pYM2612Buffer [ 2 ] , nSegmentLength ) ; } nYM2612Position += nSegmentLength ; }
Execute YM2612 for part of a frame
Execute YM2612 for part of a frame