HISE Logo Forum
    • Categories
    • Register
    • Login

    getMicPositionName defaults to channel 0 when index is greater than the number of channels

    Scheduled Pinned Locked Moved Scripting
    mic positionmixerchannel
    1 Posts 1 Posters 188 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.
    • d.healeyD
      d.healey
      last edited by

      If I have a sample map with 3 mic positions; close, decca, hall.

      When I call getMicPositionName() and pass 3 as the index (a channel that is not present in this sample map) the function returns close.

      This is very annoying because I end up purging/loading the wrong channel.

      I think it would be better if the function returns undefined. Then I can just check with isDefined() and ignore it.

      The problem line is here

      @Christoph-Hart Should I make a pull request?

      As an alternative I can of course run a check with getNumMicPositions().

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

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

      29

      Online

      1.7k

      Users

      11.7k

      Topics

      102.0k

      Posts