Open ekrebs5 opened 5 years ago
This defect can be reproduced when the audio file has two channels. In this case, a MixedSound instead a SampledSound is returned
This can be found in SampledSound >> fromWaveStream: fileStream
:
channels = 2 ifTrue: [
leftAndRight := data splitStereo.
^ MixedSound new
add: (self samples: leftAndRight first samplingRate: samplingRate) pan: 0.0;
add: (self samples: leftAndRight last samplingRate: samplingRate) pan: 1.0;
yourself].
Sometimes a MixedSound is created instead of a SampledSound, causing the method to fail. In this case, all sounds in the MixedSound should be serialized and a method created that combines them.