[squeak-dev] MixedSound (& consequently stereo) is badly broken in both 32-bit and 64-bit versions

Stéphane Rollandin lecteur at zogotounga.net
Sat Sep 19 08:17:53 UTC 2020


>      if you play the example you’ll see that the first version works fine.  The second version, which adds MixedSound yo create stereo doesn’t.  That proves that the issue is in MixedSound.  Please just try the two examples.

Right. What I can see If I do

| samples sineTable sound |
"1 second of A below middle C (220Hz). 16000 / 220 is 72.72 recurring"
sineTable := SoundPlayer sineTable: 73.
sineTable doWithIndex:
	[:sample :index| sineTable at: index put: sample // 4].
samples := SoundBuffer new: 16000.
1 to: samples size by: sineTable size do:
	[:i| samples replaceFrom: i to: (i + sineTable size - 1 min: 16000) 
with: sineTable startingAt: 1].
1 to: 146 do:
	[:i|
	samples at: i put: ((samples at: i) * i / 146) asInteger.
	samples at: 16001 - i put: ((samples at: 16001 - i) * i / 146) asInteger].
sound := SampledSound samples: samples samplingRate: 16000.
sound := MixedSound new
			add: sound pan: 0.25;
			add: sound pan: 0.75;
			yourself.
(SampledSound samples: sound monoSamples samplingRate: sound 
originalSamplingRate) edit

in the muO image I pointed to in my previous message, is a phasing 
problem leading to periodic glitches (the attached image is directly 
taken from the muO editor)

I'm looking at this..

Stef
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SoundElementEditor.png
Type: image/png
Size: 11682 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200919/ac0cffed/attachment.png>


More information about the Squeak-dev mailing list