mirror of
https://github.com/holub/mame
synced 2025-07-01 08:18:59 +03:00
sound/mp3_audio: Implement save states for MP3 decoder (#11232)
This commit is contained in:
parent
fb2b5745d1
commit
a411b9fac1
@ -35,9 +35,13 @@ void lc82310_device::device_start()
|
||||
save_item(NAME(m_ckctl));
|
||||
save_item(NAME(m_dictl));
|
||||
save_item(NAME(m_doctl));
|
||||
save_item(NAME(m_ctl_state));
|
||||
save_item(NAME(m_ctl_cmd));
|
||||
save_item(NAME(m_ctl_bits));
|
||||
save_item(NAME(m_ctl_byte));
|
||||
save_item(NAME(m_ctl_out_byte));
|
||||
|
||||
mp3dec->register_save(*this);
|
||||
}
|
||||
|
||||
void lc82310_device::device_reset()
|
||||
|
@ -87,6 +87,8 @@ void mas3507d_device::device_start()
|
||||
save_item(NAME(playback_status));
|
||||
|
||||
save_item(NAME(frame_channels));
|
||||
|
||||
mp3dec->register_save(*this);
|
||||
}
|
||||
|
||||
void mas3507d_device::device_reset()
|
||||
|
@ -29,6 +29,17 @@ mp3_audio::~mp3_audio()
|
||||
{
|
||||
}
|
||||
|
||||
void mp3_audio::register_save(device_t &host)
|
||||
{
|
||||
host.save_item(NAME(m_found_stream));
|
||||
host.save_item(NAME(dec->header));
|
||||
host.save_item(NAME(dec->reserv_buf));
|
||||
host.save_item(NAME(dec->mdct_overlap));
|
||||
host.save_item(NAME(dec->qmf_state));
|
||||
host.save_item(NAME(dec->reserv));
|
||||
host.save_item(NAME(dec->free_format_bytes));
|
||||
}
|
||||
|
||||
void mp3_audio::clear()
|
||||
{
|
||||
mp3dec_init(dec.get());
|
||||
|
@ -19,6 +19,8 @@ public:
|
||||
mp3_audio(const void *base);
|
||||
~mp3_audio();
|
||||
|
||||
void register_save(device_t &host);
|
||||
|
||||
bool decode_buffer(int &pos, int limit, short *output, int &output_samples, int &sample_rate, int &channels);
|
||||
|
||||
void clear();
|
||||
|
Loading…
Reference in New Issue
Block a user