Get BufferSize and SampleRate at init...



  • I need to set some const var at init for SampleRate and BufferSize, but I encounter some issues and even crash.

    Engine.getSampleRate() and Settings.getCurrentSampleRate()throw -1 at init, but of course they work if you call them later.

    Settings.getCurrentBufferSize() 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.

    int getBlockSize() const noexcept        { return blockSize; }   "JUCE Message Thread (1): EXC_BAD_ACCESS (code=1, address=0x38)"
    
    • So is there a way to get them without resorting to a dirty timer and another variable type?

    • Is ther a way to get a method that returns true when init is done?


Log in to reply
 

11
Online

1.6k
Users

4.6k
Topics

42.5k
Posts