Fix GA20 mute

This commit is contained in:
cam900 2023-02-09 10:20:36 +09:00
parent 2343cdecc5
commit ffe5ced7b9
3 changed files with 13 additions and 4 deletions

View file

@ -104,7 +104,7 @@ void iremga20_device::sound_stream_update(short** outputs, int len)
ch.play = false;
else
{
sampleout = (sample - 0x80) * (s32)ch.volume;
sampleout = ch.mute ? 0 : (sample - 0x80) * (s32)ch.volume;
ch.counter--;
if (ch.counter <= ch.rate)
{

View file

@ -38,6 +38,8 @@ public:
void write(u32 offset, u8 data);
u8 read(u32 offset);
inline void set_mute(const int ch, const bool mute) { m_channel[ch & 3].mute = mute; }
// device-level overrides
void device_reset();
@ -53,7 +55,8 @@ private:
counter(0),
end(0),
volume(0),
play(0)
play(0),
mute(false)
{
}
@ -63,6 +66,7 @@ private:
u32 end;
u32 volume;
bool play;
bool mute;
};
u8 m_regs[0x20];