Skip to content

Commit

Permalink
Fixed javax export being broken with stereo
Browse files Browse the repository at this point in the history
  • Loading branch information
Lenni0451 committed May 9, 2024
1 parent b5b9c6c commit 56e4552
Showing 1 changed file with 2 additions and 2 deletions.
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 = new HashMap<>();
this.merger = new AudioMerger(this.samplesPerTick * (songView.getLength() + 1));
this.merger = new AudioMerger(this.samplesPerTick * format.getChannels() * (songView.getLength() + 1));
}

@Override
Expand All @@ -50,7 +50,7 @@ protected void processNote(final Instrument instrument, final float volume, fina

@Override
protected void writeSamples() {
this.merger.pushSamples(this.samplesPerTick);
this.merger.pushSamples(this.samplesPerTick * this.format.getChannels());
}

@Override
Expand Down

0 comments on commit 56e4552

Please sign in to comment.