summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/sound/dmadac.h
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2010-01-18 09:34:43 +0000
committer Aaron Giles <aaron@aarongiles.com>2010-01-18 09:34:43 +0000
commite738b79785852050ce8b83e369a7fc4dd46a071b (patch)
tree1ac39e9f40790b375c57fea4e5d56ca8d132babc /src/emu/sound/dmadac.h
parent3f87f47a2ecdccb9d9627d0d52b76f262becb949 (diff)
Correct a long-standing design flaw: device configuration state
is now separate from runtime device state. I have larger plans for devices, so there is some temporary scaffolding to hold everything together, but this first step does separate things out. There is a new class 'running_device' which represents the state of a live device. A list of these running_devices sits in machine->devicelist and is created when a running_machine is instantiated. To access the configuration state, use device->baseconfig() which returns a reference to the configuration. The list of running_devices in machine->devicelist has a 1:1 correspondance with the list of device configurations in machine->config->devicelist, and most navigation options work equally on either (scanning by class, type, etc.) For the most part, drivers will now deal with running_device objects instead of const device_config objects. In fact, in order to do this patch, I did the following global search & replace: const device_config -> running_device device->static_config -> device->baseconfig().static_config device->inline_config -> device->baseconfig().inline_config and then fixed up the compiler errors that fell out. Some specifics: Removed device_get_info_* functions and replaced them with methods called get_config_*. Added methods for get_runtime_* to access runtime state from the running_device. DEVICE_GET_INFO callbacks are only passed a device_config *. This means they have no access to the token or runtime state at all. For most cases this is fine. Added new DEVICE_GET_RUNTIME_INFO callback that is passed the running_device for accessing data that is live at runtime. In the future this will go away to make room for a cleaner mechanism. Cleaned up the handoff of memory regions from the memory subsystem to the devices.
Diffstat (limited to 'src/emu/sound/dmadac.h')
-rw-r--r--src/emu/sound/dmadac.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/emu/sound/dmadac.h b/src/emu/sound/dmadac.h
index 0f2e8f339be..651a52eabfc 100644
--- a/src/emu/sound/dmadac.h
+++ b/src/emu/sound/dmadac.h
@@ -10,10 +10,10 @@
#ifndef __DMADAC_H__
#define __DMADAC_H__
-void dmadac_transfer(const device_config **devlist, UINT8 num_channels, offs_t channel_spacing, offs_t frame_spacing, offs_t total_frames, INT16 *data);
-void dmadac_enable(const device_config **devlist, UINT8 num_channels, UINT8 enable);
-void dmadac_set_frequency(const device_config **devlist, UINT8 num_channels, double frequency);
-void dmadac_set_volume(const device_config **devlist, UINT8 num_channels, UINT16 volume);
+void dmadac_transfer(running_device **devlist, UINT8 num_channels, offs_t channel_spacing, offs_t frame_spacing, offs_t total_frames, INT16 *data);
+void dmadac_enable(running_device **devlist, UINT8 num_channels, UINT8 enable);
+void dmadac_set_frequency(running_device **devlist, UINT8 num_channels, double frequency);
+void dmadac_set_volume(running_device **devlist, UINT8 num_channels, UINT16 volume);
DEVICE_GET_INFO( dmadac );
#define SOUND_DMADAC DEVICE_GET_INFO_NAME( dmadac )