Hi all,
for a test, I am storing sounds into a ByteArray and read them again. This works well for PluckedSounds, for example, but I found some strange behavior when doing the same with SampledSounds:
After running this script, I would expect outputSound to have the same samples as sound. But actually, every byte in the SoundBuffer appears twice! Still, playing the sound does not sound differently in my ears. I traced the issue down and found out that #mixSampleCount:into:startingAt:leftVol:rightVol: is writing every byte four times on the stream - two would be okay for left and right channel, but I do not understand the four. I reproduced the issue both on Windows and Ubuntu (WSL). Disabling the primitive did not help either.
So I am wondering: Is this a bug or totally fine (because you cannot hear a difference anyway)? If the latter is the case, how can I compare the sounds else in a reliable way? If I store outputSound again, the number of bytes is doubled again, so if you do certain operations, your image will blow up exponentially ... For the context of this question, see also: http://forum.world.st/Overriding-in-Graphics-and-Sounds-td5122783.html
Best,
Christoph
Carpe Squeak!
|
As a workaround, in my test I compare the ByteArray representations of my
sounds rather than their samples, so there is no urgency from my side. Still, this behavior looks suspicious to me ... -- Sent from: http://forum.world.st/Squeak-Dev-f45488.html
Carpe Squeak!
|
In reply to this post by Christoph Thiede
Hi Christoph,
maybe you hit upon a stereo representation with interleaved channels? But then it should be 16 bit words, so not sure. Cheers, Herbert storeWAVSamplesOn: aBinaryStream "Store this sound as a 16-bit Windows WAV file at the current SoundPlayer sampling rate. Store both channels if self isStereo is true; otherwise, store the left channel only as a mono sound." Am 09.10.2020 um 18:19 schrieb Thiede,
Christoph:
|
In reply to this post by Christoph Thiede
Eliot did some rework on the sound plugin a few months back. How new is your VM ? Best, Karl On Fri, Oct 9, 2020 at 6:19 PM Thiede, Christoph <[hidden email]> wrote:
|
In reply to this post by Herbert König
Hi Herbert, Hi Christoph, On Oct 9, 2020, at 12:33 PM, Herbert König <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |