naomiaro / waveform-playlist

Multitrack Web Audio editor and player with canvas waveform preview. Set cues, fades and shift multiple tracks in time. Record audio tracks or provide audio annotations. Export your mix to AudioBuffer or WAV! Add effects from Tone.js. Project inspired by Audacity.
https://naomiaro.github.io/waveform-playlist/
MIT License
1.47k stars 287 forks source link

Trim event and Remove track event don't adjust the session duration #224

Closed lysdexic-audio closed 1 year ago

lysdexic-audio commented 2 years ago

Thanks for such a great project :)

I noticed today that when you trim a region in a track, or remove a track that contains audio that is longer than the remaining tracks - the duration isn't adjusted. This leaves a lot of silence when you render.

I added adjustDuration() to the event handler for trim and at the end of the function call to removeTrack() and it works great. PR coming shortly

Thanks again