<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
                                        Hi Christoph.<div><br></div><div>> <span style="font-family: Calibri, Arial, Helvetica, sans-serif;font-size: 16px">Still, I'm confused about how starting a process can take more than 100 milliseconds, which looks suspicious to me ... :-)</span></div><div><span style="font-family: Calibri, Arial, Helvetica, sans-serif;font-size: 16px"><br></span></div><div><span style="font-family: Calibri, Arial, Helvetica, sans-serif;font-size: 16px">While it might be nice if we could somehow speed up "process" management in Squeak, creating OS threads (and similar control structures) is known to be a noticeable overhead for highly-async applications. There are "thread pools" to mitigate this, for example:</span></div><div><span style="font-family: Calibri, Arial, Helvetica, sans-serif"><span style="font-size: 16px"><br></span></span></div><div><a href="https://docs.microsoft.com/en-us/windows/win32/procthread/thread-pools"><span style="font-size: 12pt;font-family: Calibri, Arial, Helvetica, sans-serif">https://docs.microsoft.com/en-us/windows/win32/procthread/thread-pools</span></a><br></div><div><a href="https://refspecs.linuxbase.org/gtk/2.6/glib/glib-Thread-Pools.html"><span style="font-size: 12pt;font-family: Calibri, Arial, Helvetica, sans-serif">https://refspecs.linuxbase.org/gtk/2.6/glib/glib-Thread-Pools.html</span></a><span style="font-family: Calibri, Arial, Helvetica, sans-serif"><br></span></div><div><span style="font-family: Calibri, Arial, Helvetica, sans-serif"><span style="font-size: 16px"><br></span></span></div><div><span style="font-family: Calibri, Arial, Helvetica, sans-serif"><span style="font-size: 16px">Such a "process pool" for Squeak would be cool. :-)</span></span></div><div><span style="font-family: Calibri, Arial, Helvetica, sans-serif"><span style="font-size: 16px"><br></span></span></div><div><span style="font-family: Calibri, Arial, Helvetica, sans-serif"><span style="font-size: 16px">pool nextWorker value: [:process | process priority: 45. self doWork].</span><br></span></div><div><span style="font-family: Calibri, Arial, Helvetica, sans-serif"><span style="font-size: 16px"><br></span></span></div><div><span style="font-family: Calibri, Arial, Helvetica, sans-serif"><span style="font-size: 16px">Best,</span></span></div><div><span style="font-family: Calibri, Arial, Helvetica, sans-serif"><span style="font-size: 16px">Marcel</span></span></div><div class="mb_sig"></div>
                                        <blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 28.06.2021 12:30:35 schrieb Thiede, Christoph <christoph.thiede@student.hpi.uni-potsdam.de>:</p><div style="font-family:Arial,Helvetica,sans-serif">

<div id="divtagdefaultwrapper" style="font-size: 12pt;color: #000000;font-family: Calibri,Helvetica,sans-serif" dir="ltr">
<p>Hi Marcel,</p>
<p><br>
</p>
<p>> <span style="font-size: 12pt">If you want to play sounds in your application an rely on timing, the SoundPlayer process should never stop but always run. You can achieve this by always playing an "empty sound" while additional sounds will be mixed in.</span></p>
<div><br>
</div>
<p></p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt;color: rgb(0, 0, 0);font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols">
<div name="divtagdefaultwrapper" style="font-family: Calibri,Arial,Helvetica,sans-serif;font-size: ;margin: 0">
<div>
<div class="_rp_T4" id="Item.MessagePartBody">Yes, I have already considered such a kind of workaround. Still, I'm confused about how starting a process can take more than 100 milliseconds, which looks suspicious to me ... :-)
<div class="_rp_U4 ms-font-weight-regular ms-font-color-neutralDark rpHighlightAllClass rpHighlightBodyClass" id="Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="divtagdefaultwrapper"><span style="font-family: Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="Signature">
<div style="margin:0px"><span style="">
<div><font size="3" color="black"><span style="font-size: 12pt"><a href="http://www.hpi.de/" target="_blank" rel="noopener noreferrer" id="LPNoLP"><font size="2"><span id="LPlnk909538"><font color="#757B80"></font></span></font></a></span></font></div>
</span></div>
</div>
</span></div>
</div>
</div>
</div>
<div class="_rp_T4" id="Item.MessagePartBody"><br>
</div>
<div class="_rp_T4" id="Item.MessagePartBody">Best,</div>
<div class="_rp_T4" id="Item.MessagePartBody">Christoph</div>
</div>
<div><span style="font-size: 10pt;color: #808080"></span></div>
</div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><span style="font-family: Calibri, sans-serif;color: #000000"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel<br>
<b>Gesendet:</b> Montag, 28. Juni 2021 11:05:09<br>
<b>An:</b> squeak-dev<br>
<b>Betreff:</b> Re: [squeak-dev] Many questions about sounds :-)</span>
<div> </div>
</div>
<div>
<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
Hi Christoph.
<div><br>
</div>
<div>> <span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;font-size: 16px">Why does it take so much time to start the SoundPlayer?</span><span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;font-size: 16px"> </span></div>
<div><span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;font-size: 16px"><br>
</span></div>
<div><span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols"><span style="font-size: 16px">If you want to play sounds in your application an rely on
 timing, the SoundPlayer process should never stop but always run. You can achieve this by always playing an "empty sound" while additional sounds will be mixed in.</span></span></div>
<div><span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols"><span style="font-size: 16px"><br>
</span></span></div>
<div><span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols"><span style="font-size: 16px">Best,</span></span></div>
<div><span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols"><span style="font-size: 16px">Marcel</span></span></div>
<div class="mb_sig"></div>
<blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
<p style="color: #AAAAAA; margin-top: 10px;">Am 27.06.2021 20:22:20 schrieb Thiede, Christoph <christoph.thiede@student.hpi.uni-potsdam.de>:</p>
<div style="font-family:Arial,Helvetica,sans-serif">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt;color: rgb(0, 0, 0);font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols">
<p>Hi all!</p>
<p><br>
</p>
<p>As I'm currently developing a small project that uses sounds in Squeak, I have collected a number of questions about the Sound package and am hoping to find some answers here. Even if you are able to answer one or two questions only, I will appreciate your
 help! :-)</p>
<p><br>
</p>
<p></p>
<div>1. What is the difference between QueueSound and SequentialSound? Roughly speaking, they both appear to do the same. AbstractSound >> #, uses SequentialSound whereas QueueSound might be thread-safe. Is there any reason why the two are not unioned into
 a single class?<br>
</div>
<div><br>
</div>
<div><span style="font-size: 12pt">2. Why could</span><span style="font-size: 12pt"> my coffeeCupClink be broken? It's already the second image in which I, after playing around a bit with sounds, managed to break that sound by accident. In both affected images,
 Beeper beep just does not beep any more. However, all other SampledSounds still sound fine. <span>SampledSound initialize and VM restart didn't help. I even tried to find out what's going wrong with the help of comparative debugging of #play, but I did not
 discover any meaningful difference ...</span></span></div>
<div><span style="font-size: 12pt"><span><br>
</span></span></div>
<div><span style="font-size: 12pt"><span>3. SoundService/<span>SoundPlayer/SoundSystem are not thread-safe, are they?</span></span></span></div>
<div><span style="font-size: 12pt"><span><span><br>
</span></span></span></div>
<div>4. Why does it take so much time to start the SoundPlayer? I could reproduce this in two images using:
<span>[[PluckedSound default play] timeProfile] fork. In both cases, the image was busy for ~150ms. If another sound is already playing, #play is fast. According to the TimeProfileBrowser, #newProcess eats up all the time (see attachment), but can this really
 be true? Can you reproduce this on your machines or could this be a Windows-specific thing?</span></div>
<div><span><br>
</span></div>
<div><span>5. Is there any built-in way for loudness normalization (as opposed to "normal" volume)?</span></div>
<div><span><br>
</span></div>
<div>6. Can you recommend any further resources in Squeak for other sound concepts such as ring modulation, sawtooth/triangle/square waves, or also other musical instruments? For example, there are flutes and oboes, but I did not find a piano sound. Would it
 be possible to build one as a combination of FMSounds or are these instruments more sophisticated to program?</div>
<div></div>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt;color: rgb(0,0,0);font-family: Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<div name="divtagdefaultwrapper" style="font-family: Calibri,Arial,Helvetica,sans-serif;font-size: ;margin: 0">
<div>
<div class="_rp_T4" id="Item.MessagePartBody"><br>
</div>
<div class="_rp_T4" id="Item.MessagePartBody">Thanks in advance and have a happy weekend!</div>
<div class="_rp_T4" id="Item.MessagePartBody"><br>
</div>
<div class="_rp_T4" id="Item.MessagePartBody">Best,</div>
<div class="_rp_T4" id="Item.MessagePartBody">Christoph</div>
</div>
<div><span style="font-size: 10pt;color: #808080"></span></div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div></blockquote></div>