Skip to content

Commit

Permalink
beta32
Browse files Browse the repository at this point in the history
  • Loading branch information
asiekierka committed Mar 6, 2021
1 parent da120d2 commit f9d2723
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/audio_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,11 @@ void audio_stream_generate(long time, u8 *stream, int len) {
if (audio_from < audio_last_to) audio_from = audio_last_to;
if (audio_to < (audio_from + MINIMUM_NOTE_DELAY)) audio_to = audio_from + MINIMUM_NOTE_DELAY;

// If first note and above 0, memset.
if (i == 0 && audio_from > 0) {
audio_stream_clear(stream, audio_smp_center, 0, audio_from < len ? audio_from : len);
}

// Clamp; if out of bounds, skip note.
if (audio_from < 0) audio_from = 0;
else if (audio_from >= len) break;
Expand Down

0 comments on commit f9d2723

Please sign in to comment.