Esempio n. 1
0
        public static void GetAmplitudeFactors(
            double dbSPLL,
            double dbSPLR,
            out double factorL,
            out double factorR,
            Calibration.Source source = Calibration.Source.Custom,
            bool safetyLimit          = true)
        {
            if (safetyLimit && (dbSPLL > dbSafetyLimit || dbSPLR > dbSafetyLimit))
            {
                throw new StreamCompositionException(
                          $"Tried to exceed safety limit of 90dB without disengaging safety. " +
                          $"Requested Level: {Math.Max(dbSPLL, dbSPLR)} dB");
            }

            (factorL, factorR) = Calibration.GetLevelFactors(
                levelL: dbSPLL,
                levelR: dbSPLR,
                source: source);
        }