Forum

    • Register
    • Login
    • Search
    • Categories

    Get BufferSize and SampleRate at init...

    Bug Reports
    1
    1
    57
    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.
    • ustk
      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?

      I can't help pressing F5 in the forum...

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

      2
      Online

      1.1k
      Users

      6.8k
      Topics

      62.7k
      Posts