Currently audio files cut off slightly early, and single channel audio files fail to play.
This adjusts the logic so that extraction returns the full numFrames and the cutoff logic is instead handled by isNaN checks on the samples. It also simply duplicates the left channel if there is only one channel available.
Currently audio files cut off slightly early, and single channel audio files fail to play.
This adjusts the logic so that extraction returns the full
numFrames
and the cutoff logic is instead handled byisNaN
checks on the samples. It also simply duplicates the left channel if there is only one channel available.Test file for comparison: https://github.com/onnowhere/soundtouchjs-audio-worklet/releases/download/test/test.mp3