mirror of
https://github.com/holub/mame
synced 2025-07-07 02:50:50 +03:00
ymf278b.cpp : Allow scaling for FM DO2 output
ymf262.cpp : Add notes
This commit is contained in:
parent
5e01f764ad
commit
f858e1650f
@ -2615,16 +2615,15 @@ void ymf262_update_one(void *_chip, OPL3SAMPLE **buffers, int length)
|
||||
signed int *chanout = chip->chanout;
|
||||
uint8_t rhythm = chip->rhythm&0x20;
|
||||
|
||||
OPL3SAMPLE *ch_a = buffers[0];
|
||||
OPL3SAMPLE *ch_b = buffers[1];
|
||||
OPL3SAMPLE *ch_c = buffers[2];
|
||||
OPL3SAMPLE *ch_d = buffers[3];
|
||||
OPL3SAMPLE *ch_a = buffers[0]; // DO2 (mixed) left output for OPL4
|
||||
OPL3SAMPLE *ch_b = buffers[1]; // DO2 (mixed) right output for OPL4
|
||||
OPL3SAMPLE *ch_c = buffers[2]; // DO0 (FM only) left output for OPL4
|
||||
OPL3SAMPLE *ch_d = buffers[3]; // DO0 (FM only) right output for OPL4
|
||||
|
||||
for( i=0; i < length ; i++ )
|
||||
{
|
||||
int a,b,c,d;
|
||||
|
||||
|
||||
advance_lfo(chip);
|
||||
|
||||
/* clear channel outputs */
|
||||
|
@ -225,6 +225,14 @@ void ymf278b_device::sound_stream_update(sound_stream &stream, stream_sample_t *
|
||||
{
|
||||
// TODO : FM only output is DO0, DO2 is actually mixed FM+PCM outputs
|
||||
ymf262_update_one(m_ymf262, outputs, samples);
|
||||
vl = m_mix_level[m_fm_l];
|
||||
vr = m_mix_level[m_fm_r];
|
||||
for (i = 0; i < samples; i++)
|
||||
{
|
||||
// DO2 mixing
|
||||
outputs[0][i] = (outputs[0][i] * vl) >> 16;
|
||||
outputs[1][i] = (outputs[1][i] * vr) >> 16;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user