mirror of
https://github.com/holub/mame
synced 2025-06-17 17:59:05 +03:00
fixed usage of initialized members in dave_device() (nw)
also fixes signed integer overflow in dave_device::sound_stream_update() with ep128 and others
This commit is contained in:
parent
24228220bc
commit
58ee4eb6c1
@ -96,12 +96,23 @@ void dave_device::device_start()
|
|||||||
save_item(NAME(m_level_and));
|
save_item(NAME(m_level_and));
|
||||||
save_item(NAME(m_mame_volumes));
|
save_item(NAME(m_mame_volumes));
|
||||||
|
|
||||||
for (int i = 0; i < 3; i++)
|
for (int i = 0; i < ARRAY_LENGTH(m_period); i++)
|
||||||
{
|
|
||||||
m_period[i] = (STEP * machine().sample_rate()) / 125000;
|
m_period[i] = (STEP * machine().sample_rate()) / 125000;
|
||||||
|
|
||||||
|
for (int i = 0; i < ARRAY_LENGTH(m_count); i++)
|
||||||
m_count[i] = (STEP * machine().sample_rate()) / 125000;
|
m_count[i] = (STEP * machine().sample_rate()) / 125000;
|
||||||
|
|
||||||
|
for (int i = 0; i < ARRAY_LENGTH(m_level); i++)
|
||||||
m_level[i] = 0;
|
m_level[i] = 0;
|
||||||
}
|
|
||||||
|
for (int i = 0; i < ARRAY_LENGTH(m_level_or); i++)
|
||||||
|
m_level_or[i] = 0;
|
||||||
|
|
||||||
|
for (int i = 0; i < ARRAY_LENGTH(m_level_and); i++)
|
||||||
|
m_level_and[i] = 0;
|
||||||
|
|
||||||
|
for (int i = 0; i < ARRAY_LENGTH(m_mame_volumes); i++)
|
||||||
|
m_mame_volumes[i] = 0;
|
||||||
|
|
||||||
/* dave has 3 tone channels and 1 noise channel.
|
/* dave has 3 tone channels and 1 noise channel.
|
||||||
the volumes are mixed internally and output as left and right volume */
|
the volumes are mixed internally and output as left and right volume */
|
||||||
|
Loading…
Reference in New Issue
Block a user