mirror of
https://github.com/holub/mame
synced 2025-05-23 14:19:01 +03:00
discrete_sound_r now can inquiry any node
- the return type is UINT8, consequently the designer needs to ensure that the node delivers adequately scaled data. - input nodes allow the input data to be scaled. The return value is the node value *after* scaling.
This commit is contained in:
parent
9c29925c5a
commit
24da866367
@ -63,18 +63,13 @@ READ8_DEVICE_HANDLER(discrete_sound_r)
|
|||||||
/* Read the node input value if allowed */
|
/* Read the node input value if allowed */
|
||||||
if (node)
|
if (node)
|
||||||
{
|
{
|
||||||
struct dss_input_context *context = (struct dss_input_context *)node->context;
|
|
||||||
|
|
||||||
/* Bring the system up to now */
|
/* Bring the system up to now */
|
||||||
stream_update(info->discrete_stream);
|
stream_update(info->discrete_stream);
|
||||||
|
|
||||||
if ((node->module->type >= DSS_INPUT_DATA) && (node->module->type <= DSS_INPUT_PULSE))
|
data = (UINT8) node->output[NODE_CHILD_NODE_NUM(offset)];
|
||||||
{
|
|
||||||
data = context->data;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
discrete_log(info, "discrete_sound_r read from non-existent NODE_%02d\n", offset-NODE_00);
|
fatalerror("discrete_sound_r read from non-existent NODE_%02d\n", offset-NODE_00);
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user