<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Get BufferSize and SampleRate at init...]]></title><description><![CDATA[<p dir="auto">I need to set some <code>const var</code> at init for SampleRate and BufferSize, but I encounter some issues and even crash.</p>
<p dir="auto"><code>Engine.getSampleRate()</code> and <code>Settings.getCurrentSampleRate()</code>throw -1 at init, but of course they work if you call them later.</p>
<p dir="auto"><code>Settings.getCurrentBufferSize()</code> make an instant crash of exported plugin when placed in the onInit (despite that it works in Hise), but works normally if you use it after init like the ones above.</p>
<pre><code>int getBlockSize() const noexcept        { return blockSize; }   "JUCE Message Thread (1): EXC_BAD_ACCESS (code=1, address=0x38)"
</code></pre>
<ul>
<li>
<p dir="auto">So is there a way to get them without resorting to a dirty timer and another variable type?</p>
</li>
<li>
<p dir="auto">Is ther a way to get a method that returns <code>true</code> when init is done?</p>
</li>
</ul>
]]></description><link>https://forum.hise.audio/topic/4523/get-buffersize-and-samplerate-at-init</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Mar 2026 20:51:22 GMT</lastBuildDate><atom:link href="https://forum.hise.audio/topic/4523.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 13 Aug 2021 18:29:56 GMT</pubDate><ttl>60</ttl></channel></rss>