mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
Fix SID crashes.
This commit is contained in:
parent
974da4d5b5
commit
7917a1a8a0
@ -90,13 +90,13 @@ sid6581_device::sid6581_device(const machine_config &mconfig, const char *tag, d
|
||||
: device_t(mconfig, SID6581, "SID6581", tag, owner, clock),
|
||||
device_sound_interface(mconfig, *this)
|
||||
{
|
||||
m_token = global_alloc_array_clear(UINT8, sizeof(SID6581));
|
||||
m_token = global_alloc_clear(SID6581_t);
|
||||
}
|
||||
sid6581_device::sid6581_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, type, name, tag, owner, clock),
|
||||
device_sound_interface(mconfig, *this)
|
||||
{
|
||||
m_token = global_alloc_array_clear(UINT8, sizeof(SID6581));
|
||||
m_token = global_alloc_clear(SID6581_t);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
|
@ -29,8 +29,10 @@ struct sid6581_interface
|
||||
devcb_read8 in_poty_cb;
|
||||
};
|
||||
|
||||
struct SID6581_t;
|
||||
|
||||
class sid6581_device : public device_t,
|
||||
public device_sound_interface
|
||||
public device_sound_interface
|
||||
{
|
||||
public:
|
||||
sid6581_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
@ -53,7 +55,7 @@ protected:
|
||||
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
|
||||
private:
|
||||
// internal state
|
||||
void *m_token;
|
||||
SID6581_t *m_token;
|
||||
};
|
||||
|
||||
extern const device_type SID6581;
|
||||
|
Loading…
Reference in New Issue
Block a user