Skip to main content

isMasterLimiterEnabled

Added in 5.8.0

Check whether the master limiter is in the output chain right now. Handy for keeping a toggle in your UI in step with the real state.

isMasterLimiterEnabled(): boolean;

Parameters​

This method takes no parameters.

Returns​

boolean: true when the limiter is in the chain, false when it is not.

Example​

import { SoundHub } from 'soundhub';

const soundHub = new SoundHub({ masterLimiter: true });

soundHub.isMasterLimiterEnabled(); // true

soundHub.setMasterLimiter(false);
soundHub.isMasterLimiterEnabled(); // false

// Keep a checkbox in step
checkbox.checked = soundHub.isMasterLimiterEnabled();

Good to know​

  • It checks whether the limiter node exists, so the answer is right whether the limiter was enabled through the config or later with setMasterLimiter.
  • When it returns true, getMasterLimiterNode returns the node. When it returns false, that method returns null.

See also​