GME: Fix music playback with no fade from crashing
Only crashed with division by zero error on Intel, not on Apple Silicon. Funny that. Sending the fix upstream, too. Signed-off-by: Christopher Snowhill <kode54@gmail.com>CQTexperiment
parent
c5f9ffe87c
commit
326e9d5970
|
@ -311,6 +311,12 @@ static int int_log( blargg_long x, int step, int unit )
|
||||||
|
|
||||||
void Music_Emu::handle_fade( long out_count, sample_t* out )
|
void Music_Emu::handle_fade( long out_count, sample_t* out )
|
||||||
{
|
{
|
||||||
|
if (!fade_step)
|
||||||
|
{
|
||||||
|
track_ended_ = emu_track_ended_ = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for ( int i = 0; i < out_count; i += fade_block_size )
|
for ( int i = 0; i < out_count; i += fade_block_size )
|
||||||
{
|
{
|
||||||
int const shift = 14;
|
int const shift = 14;
|
||||||
|
|
Loading…
Reference in New Issue