Skip to content

Commit

Permalink
Updated NoteBlockLib
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphiMC committed May 25, 2024
1 parent 858df40 commit 9112f65
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public AudioExporter(final SongView<?> songView, final AudioFormat format, final
}

public void render() throws InterruptedException {
for (int tick = 0; tick <= this.songView.getLength(); tick++) {
for (int tick = 0; tick < this.songView.getLength(); tick++) {
final List<? extends Note> notes = this.songView.getNotesAtTick(tick);
for (Note note : notes) {
if (Thread.currentThread().isInterrupted()) throw new InterruptedException();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public JavaxAudioExporter(final SongView<?> songView, final AudioFormat format,
super(songView, format, progressConsumer);
this.sounds = SoundMap.loadInstrumentSamples(format);
this.mutationCache = CacheBuilder.newBuilder().maximumSize(250).build();
this.merger = new AudioMerger(this.samplesPerTick * format.getChannels() * (songView.getLength() + 1));
this.merger = new AudioMerger(this.samplesPerTick * format.getChannels() * songView.getLength());
}

@Override
Expand Down

0 comments on commit 9112f65

Please sign in to comment.