HISE Logo Forum
    • Categories
    • Register
    • Login

    Get BufferSize and SampleRate at init...

    Scheduled Pinned Locked Moved Bug Reports
    1 Posts 1 Posters 117 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ustkU
      ustk
      last edited by ustk

      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?

      Can't help pressing F5 in the forum...

      1 Reply Last reply Reply Quote 0
      • First post
        Last post

      42

      Online

      1.7k

      Users

      11.7k

      Topics

      102.2k

      Posts