HISE Logo Forum
    • Categories
    • Register
    • Login

    What's the deal with this assert? isMonophonicOrInsideVoiceRendering()

    Scheduled Pinned Locked Moved C++ Development
    3 Posts 2 Posters 84 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.
    • griffinboyG
      griffinboy
      last edited by

      /** If you know that you're inside a rendering context, you can
          use this function instead of the for-loop syntax. Be aware that
      	the performance will be the same, it's just a bit less to type. 
      */
      T& get() const
      {
      	jassert(isMonophonicOrInsideVoiceRendering());
      	return *begin();
      }
      

      My Hise project trips this assert every time I run it now. It never did before. Even reverting to old versions of my nodes and Hise scripts does not remove the behaviour.

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

        @griffinboy yeah that's overly verbose, you can just get rid of that line.

        griffinboyG 1 Reply Last reply Reply Quote 1
        • griffinboyG
          griffinboy @Christoph Hart
          last edited by

          @Christoph-Hart

          Good to know that it wasn't anything bad. It didn't seem to be breaking anything.

          Is it okay for me to use this function then? It says that I shouldn't here unless I'm rendering. But I couldn't really see why, so I've been using it

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

          26

          Online

          1.7k

          Users

          11.8k

          Topics

          102.8k

          Posts