summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/sound')
-rw-r--r--src/devices/sound/ymf262.cpp9
-rw-r--r--src/devices/sound/ymf278b.cpp8
2 files changed, 12 insertions, 5 deletions
diff --git a/src/devices/sound/ymf262.cpp b/src/devices/sound/ymf262.cpp
index 563f7016513..4fbf030cfb9 100644
--- a/src/devices/sound/ymf262.cpp
+++ b/src/devices/sound/ymf262.cpp
@@ -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 */
diff --git a/src/devices/sound/ymf278b.cpp b/src/devices/sound/ymf278b.cpp
index dc0c4693aab..ada4a5544c7 100644
--- a/src/devices/sound/ymf278b.cpp
+++ b/src/devices/sound/ymf278b.cpp
@@ -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;
}