Forum

    • Register
    • Login
    • Search
    • Categories

    Audio thread function variables

    Scripting Forum
    2
    3
    2496
    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.
    • d.healey
      d.healey last edited by

      I feel like I've asked this before but I can't find it anywhere so apologies if I'm repeating myself. I was re-reading the scripting best practices blog post and at the part where it talks about using inline functions rather than normal function in the audio thread it also mentions local variables.

      Does creating local variables inside an inline function called by an audio thread callback impact efficiency? or are local variables magically handled by the pre-compiler?

      Libre Wave - Freedom respecting instruments and effects
      My Patreon - HISE tutorials
      YouTube Channel - Public HISE tutorials

      1 Reply Last reply Reply Quote 0
      • Christoph Hart
        Christoph Hart last edited by

        local variables are fine as long as they are simple data types, bool or numbers. Arrays, Objects and Strings are not supposed to be created there though.

        1 Reply Last reply Reply Quote 1
        • d.healey
          d.healey last edited by

          Excellent, I'm at the trimming the fat stage of my project, trying to make it as lean as possible 🙂

          Libre Wave - Freedom respecting instruments and effects
          My Patreon - HISE tutorials
          YouTube Channel - Public HISE tutorials

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

          12
          Online

          855
          Users

          5.7k
          Topics

          53.0k
          Posts