summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/sound/gaelco.c
diff options
context:
space:
mode:
author Alex W. Jackson <alex.w.jackson@gmail.com>2014-11-17 17:03:54 -0500
committer Alex W. Jackson <alex.w.jackson@gmail.com>2014-11-17 17:03:54 -0500
commitd68a3a45b3dfc13f92096c0b7d58a49a2ef75f68 (patch)
tree056e3d80e0d9c2b018909468a7ace963e231e707 /src/emu/sound/gaelco.c
parenta6d9826322d00e9f55c02d6ee378c0f9bbbf5aed (diff)
Touching all the candy again: [Alex Jackson]
Fixed an annoying inconsistency between memory_share and memory_region: the width() method of the former returned the width in bits (8, 16, 32 or 64) while the width() method of the latter returned the width in bytes (1, 2, 4 or 8). Now both classes have a bitwidth() method and a bytewidth() method. Updated all callers to use whichever one was more appropriate. Removed the implicit-cast-to-any-integer-pointer ability of memory_regions, which was rather unsafe (if you weren't careful with your * operators and casts it was easy to accidentally get a pointer to the memory_region object itself instead of to the data, with no warning from the compiler... or at least I kept doing it) Updated all devices and drivers that were accessing regions that way to use a region_ptr_finder when possible, and otherwise to call base() explicitly.
Diffstat (limited to 'src/emu/sound/gaelco.c')
-rw-r--r--src/emu/sound/gaelco.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/emu/sound/gaelco.c b/src/emu/sound/gaelco.c
index 6e073b91c9a..09aff0416ca 100644
--- a/src/emu/sound/gaelco.c
+++ b/src/emu/sound/gaelco.c
@@ -240,9 +240,7 @@ void gaelco_gae1_device::device_start()
{
m_stream = stream_alloc(0, 2, 8000);
- m_snd_data = (UINT8 *)machine().root_device().memregion(m_data_tag)->base();
- if (m_snd_data == NULL)
- m_snd_data = *region();
+ m_snd_data = owner()->memregion(m_data_tag)->base();
/* init volume table */
for (int vol = 0; vol < GAELCO_VOLUME_LEVELS; vol++){