summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/sound/gaelco.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2011-01-27 08:06:43 +0000
committer Aaron Giles <aaron@aarongiles.com>2011-01-27 08:06:43 +0000
commitc94b8c94901066b9f44a1b13d7448502fa147974 (patch)
tree9787f6d7088152dab9c1a509700d1afa75074062 /src/emu/sound/gaelco.c
parente214465d3578e0c713f4a686916e40c2e9461050 (diff)
C++-ified the sound and streams interfaces. Combined sound.c and streams.c
into one file, and separated the speaker device into its own file. Generalized the concept of dynamically assigned inputs and re-wired the speaker to work this way, so it is now treated just like any other sound device. Added methods to the device_sound_interface for controlling output gain and mapping device inputs/outputs to stream inputs/outputs. Also made the sound_stream_update() method pure virtual, so all modern sound devices must use the new mechanism for stream updates. Primary changes outside of the core are: stream_update(stream) == stream->update() stream_create(device,...) == machine->sound().stream_alloc(*device,...) sound_global_enable(machine,enable) == machine->sound().system_enable(enable) Beyond this, the patterns are relatively obvious for the remaining calls.
Diffstat (limited to 'src/emu/sound/gaelco.c')
-rw-r--r--src/emu/sound/gaelco.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/emu/sound/gaelco.c b/src/emu/sound/gaelco.c
index 2f37da528d7..959047a6d89 100644
--- a/src/emu/sound/gaelco.c
+++ b/src/emu/sound/gaelco.c
@@ -34,7 +34,6 @@ Registers per channel:
***************************************************************************/
#include "emu.h"
-#include "streams.h"
#include "gaelco.h"
#include "wavwrite.h"
@@ -213,7 +212,7 @@ WRITE16_DEVICE_HANDLER( gaelcosnd_w )
LOG_READ_WRITES(("%s: (GAE1): write %04x to %04x\n", cpuexec_describe_context(device->machine), data, offset));
/* first update the stream to this point in time */
- stream_update(info->stream);
+ info->stream->update();
COMBINE_DATA(&info->sndregs[offset]);
@@ -260,7 +259,7 @@ static DEVICE_START( gaelco )
for (j = 0; j < 4; j++){
info->banks[j] = intf->banks[j];
}
- info->stream = stream_create(device, 0, 2, 8000, info, gaelco_update);
+ info->stream = device->machine->sound().stream_alloc(*device, 0, 2, 8000, info, gaelco_update);
info->snd_data = (UINT8 *)device->machine->region(intf->gfxregion)->base();
if (info->snd_data == NULL)
info->snd_data = *device->region();