mirror of
https://github.com/holub/mame
synced 2025-04-22 08:22:15 +03:00
r26603 update
This commit is contained in:
parent
7b9f1f31d3
commit
a0ef0e4ce9
@ -14,12 +14,16 @@ mpeg_audio::mpeg_audio(const void *_base, unsigned int _accepted, bool lsb_first
|
||||
do_gb = lsb_first ? do_gb_lsb : do_gb_msb;
|
||||
position_align = _position_align ? _position_align - 1 : 0;
|
||||
|
||||
clear();
|
||||
}
|
||||
|
||||
void mpeg_audio::clear()
|
||||
{
|
||||
memset(audio_buffer, 0, sizeof(audio_buffer));
|
||||
audio_buffer_pos[0] = 16*32;
|
||||
audio_buffer_pos[1] = 16*32;
|
||||
}
|
||||
|
||||
|
||||
bool mpeg_audio::decode_buffer(int &pos, int limit, short *output,
|
||||
int &output_samples, int &sample_rate, int &channels)
|
||||
{
|
||||
|
@ -49,6 +49,9 @@ public:
|
||||
int &output_samples, int &sample_rate, int &channels);
|
||||
|
||||
|
||||
// Clear audio buffer
|
||||
void clear();
|
||||
|
||||
// Change the base pointer
|
||||
void set_base(const void *base);
|
||||
|
||||
|
@ -106,7 +106,7 @@ void ymz770_device::device_reset()
|
||||
m_channels[ch].is_playing = false;
|
||||
m_channels[ch].is_seq_playing = false;
|
||||
m_channels[ch].output_remaining = 0;
|
||||
//m_channels[ch].decoder->clear();
|
||||
m_channels[ch].decoder->clear();
|
||||
}
|
||||
}
|
||||
|
||||
@ -175,8 +175,8 @@ void ymz770_device::sound_stream_update(sound_stream &stream, stream_sample_t **
|
||||
mix += (m_channels[ch].output_data[m_channels[ch].output_ptr++]*m_channels[ch].volume);
|
||||
m_channels[ch].output_remaining--;
|
||||
|
||||
//if (m_channels[ch].output_remaining == 0 && !m_channels[ch].is_playing)
|
||||
//m_channels[ch].decoder->clear();
|
||||
if (m_channels[ch].output_remaining == 0 && !m_channels[ch].is_playing)
|
||||
m_channels[ch].decoder->clear();
|
||||
}
|
||||
|
||||
else if (m_channels[ch].is_playing)
|
||||
@ -195,7 +195,7 @@ retry:
|
||||
{
|
||||
m_channels[ch].is_playing = false;
|
||||
m_channels[ch].output_remaining = 0;
|
||||
//m_channels[ch].decoder->clear();
|
||||
m_channels[ch].decoder->clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user