[squeak-dev] Many questions about sounds :-)

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Mon Jun 28 23:08:19 UTC 2021

Hi Tim, thanks for the background! So most likely, I will implement some kind of infinite NullSound to work around the issue.

But then my profiler stack must be wrong? Is this an issue with MessageTally?



Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von tim Rowledge <tim at rowledge.org>
Gesendet: Montag, 28. Juni 2021 20:26:56
An: The general-purpose Squeak developers list
Betreff: Re: [squeak-dev] Many questions about sounds :-)

> On 2021-06-28, at 4:12 AM, Thiede, Christoph <Christoph.Thiede at student.hpi.uni-potsdam.de> wrote:
> Ah, that's interesting. :-) But why is "[] newProcess" blazing fast whereas the invocation in the SoundPlayer is so expensive? Is this somehow related to the resources (closure vector) that need to be shared in this case?

This almost nothing at all to do with the costs of starting a Squeak Process - which are quite close to 0 - and almost entirely the costs of starting the platform sound system, getting the samples into the platform sound system buffers, and said sound system actually getting around to making speakers wobble back and forth. Another layer of possible time-spending is the fairly complex code in SoundPlayer class>>#playLoop and its friends.

I'm not certain, but I also suspect that only Mac has actually functional quick-start code in the sound plugin.

It might be instructive to insert some time tagging to measure how long it takes from sending the sound buffer to the OS until the actual sound comes out. And indeed how long from asking Squeak to start playing until it gets to the OS buffer.

tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Old programmers never die; they just branch to a new address.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210628/9da4148a/attachment.html>

More information about the Squeak-dev mailing list