# HG changeset patch # User Michael Pavone # Date 1713416130 25200 # Node ID 6c834c281fa23516cb8eecffea48848c114c76bd # Parent a0837ea61fdaa0e7796f2fa5e18476b646be9823 Some VGM player changes I forgot to commit diff -r a0837ea61fda -r 6c834c281fa2 mediaplayer.c --- a/mediaplayer.c Wed Apr 17 21:54:44 2024 -0700 +++ b/mediaplayer.c Wed Apr 17 21:55:30 2024 -0700 @@ -169,6 +169,15 @@ stream->next_sample_cycle += stream->cycles_per_sample; //TODO: deal with cycle adjustments keep_going = 1; + if (stream->length_mode == 1) { + //unclear how this is supposed to work + } else { + stream->remaining--; + if (!stream->remaining) { + //TODO: looping support + player->streams[i]->flags &= ~STREAM_FLAG_PLAY; + } + } } } } while (keep_going); @@ -615,6 +624,8 @@ cur_block = cur_block->next; } if (stream->cur_block) { + stream->remaining = 0xFFFFFFFF; + stream->length_mode = 3; stream->flags |= STREAM_FLAG_PLAY; stream->next_sample_cycle = samples_to_cycles(stream->chip->clock, stream->chip->samples); }