'From Squeak5.1 of 5 September 2016 [latest update: #16549] on 8 December 2019 at 3:59:31 pm'! !MixedSound methodsFor: '*MuO-override' stamp: 'spfa 8/18/2019 12:09'! mixSampleCount: n into: aSoundBuffer startingAt: startIndex leftVol: leftVol rightVol: rightVol "Play a number of sounds concurrently. The level of each sound can be set independently for the left and right channels." | snd left right | 1 to: sounds size do: [:i | (soundDone at: i) ifFalse: [ snd := sounds at: i. left := (leftVol * (leftVols at: i) * scaledVol / ScaleFactor) // ScaleFactor. right := (rightVol * (rightVols at: i) * scaledVol / ScaleFactor) // ScaleFactor. snd samplesRemaining > 0 ifTrue: [ snd mixSampleCount: n into: aSoundBuffer startingAt: startIndex leftVol: left rightVol: right] ifFalse: [soundDone at: i put: true]]]. ! !