Previous 199869 Revisions Next

r17983 Tuesday 18th September, 2012 at 04:23:25 UTC by Aaron Giles
Fix SID crashes.
[src/emu/sound]sid6581.c sid6581.h

trunk/src/emu/sound/sid6581.c
r17982r17983
9090   : device_t(mconfig, SID6581, "SID6581", tag, owner, clock),
9191     device_sound_interface(mconfig, *this)
9292{
93   m_token = global_alloc_array_clear(UINT8, sizeof(SID6581));
93   m_token = global_alloc_clear(SID6581_t);
9494}
9595sid6581_device::sid6581_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock)
9696   : device_t(mconfig, type, name, tag, owner, clock),
9797     device_sound_interface(mconfig, *this)
9898{
99   m_token = global_alloc_array_clear(UINT8, sizeof(SID6581));
99   m_token = global_alloc_clear(SID6581_t);
100100}
101101
102102//-------------------------------------------------
trunk/src/emu/sound/sid6581.h
r17982r17983
2929   devcb_read8 in_poty_cb;
3030};
3131
32struct SID6581_t;
33
3234class sid6581_device : public device_t,
33                                  public device_sound_interface
35                       public device_sound_interface
3436{
3537public:
3638   sid6581_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
r17982r17983
5355   virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
5456private:
5557   // internal state
56   void *m_token;
58   SID6581_t *m_token;
5759};
5860
5961extern const device_type SID6581;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team