k054321: make it work on all speaker inputs, not just the first (nw)

This commit is contained in:
hap 2018-10-22 23:40:29 +02:00
parent 932b9ad71e
commit 317a597236

View File

@ -134,6 +134,9 @@ WRITE8_MEMBER(k054321_device::dummy_w)
void k054321_device::propagate_volume()
{
double vol = pow(2, (m_volume - 40)/10.0);
m_left->set_input_gain(0, m_active & 2 ? vol : 0.0);
m_right->set_input_gain(0, m_active & 1 ? vol : 0.0);
for (int i = 0; i < m_left->inputs(); i++)
m_left->set_input_gain(i, m_active & 2 ? vol : 0.0);
for (int i = 0; i < m_right->inputs(); i++)
m_right->set_input_gain(0, m_active & 1 ? vol : 0.0);
}