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(int nSegmentLength) { if (nYM2612Position >= nSegmentLength) { return; } // bprintf(PRINT_NORMAL, _T(" YM2612 render %6i -> %6i\n", nYM2612Position, nSegmentLength)); 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 ym2612_stream_update(void *param, stream_sample_t **inputs, stream_sample_t **buffers, int length) { struct ym2612_info *info = param; YM2612UpdateOne(info->chip, buffers, length); }