Forum

    • Register
    • Login
    • Search
    • Categories

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

    Scripting Forum
    mic position mixer channel
    1
    1
    32
    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

      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

      14
      Online

      985
      Users

      6.6k
      Topics

      60.8k
      Posts