summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/k053260.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/sound/k053260.h')
-rw-r--r--src/devices/sound/k053260.h32
1 files changed, 18 insertions, 14 deletions
diff --git a/src/devices/sound/k053260.h b/src/devices/sound/k053260.h
index ad14244ceb9..9cf86b25653 100644
--- a/src/devices/sound/k053260.h
+++ b/src/devices/sound/k053260.h
@@ -39,13 +39,14 @@ protected:
virtual void device_start() override;
virtual void device_clock_changed() override;
virtual void device_reset() override;
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
// sound stream update overrides
virtual void sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) override;
// device_rom_interface overrides
- virtual void rom_bank_updated() override;
+ virtual void rom_bank_pre_change() override;
+
+ TIMER_CALLBACK_MEMBER(update_state_outputs);
private:
// Pan multipliers
@@ -74,7 +75,9 @@ private:
inline void voice_start(int index);
inline void voice_reset();
inline void set_register(offs_t offset, u8 data);
- inline void set_loop_kadpcm(u8 data);
+ inline void set_loop(int state);
+ inline void set_kadpcm(int state);
+ inline void set_reverse(int state);
inline void set_pan(u8 data);
inline void update_pan_volume();
inline void key_on();
@@ -88,22 +91,23 @@ private:
k053260_device &m_device;
// live state
- u32 m_position = 0;
+ u32 m_position;
int m_pan_volume[2];
- u16 m_counter = 0;
- s8 m_output = 0;
- bool m_playing = false;
+ u16 m_counter;
+ s8 m_output;
+ bool m_playing;
// per voice registers
- u32 m_start = 0;
- u16 m_length = 0;
- u16 m_pitch = 0;
- u8 m_volume = 0;
+ u32 m_start;
+ u16 m_length;
+ u16 m_pitch;
+ u8 m_volume;
// bit packed registers
- u8 m_pan = 0;
- bool m_loop = false;
- bool m_kadpcm = false;
+ u8 m_pan;
+ bool m_loop;
+ bool m_kadpcm;
+ bool m_reverse;
} m_voice[4];
};