Audio thread function variables



  • 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?


  • administrators

    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.



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


Log in to reply
 

0
Online

315
Users

919
Topics

6.0k
Posts

Looks like your connection to Forum was lost, please wait while we try to reconnect.