All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.mediaconvert.model.AudioNormalizationSettings.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.mediaconvert.model



/**
 * Advanced audio normalization settings. Ignore these settings unless you need to comply with a loudness standard.
 */
public class AudioNormalizationSettings private constructor(builder: Builder) {
    /**
     * Choose one of the following audio normalization algorithms: ITU-R BS.1770-1: Ungated loudness. A measurement of ungated average loudness for an entire piece of content, suitable for measurement of short-form content under ATSC recommendation A/85. Supports up to 5.1 audio channels. ITU-R BS.1770-2: Gated loudness. A measurement of gated average loudness compliant with the requirements of EBU-R128. Supports up to 5.1 audio channels. ITU-R BS.1770-3: Modified peak. The same loudness measurement algorithm as 1770-2, with an updated true peak measurement. ITU-R BS.1770-4: Higher channel count. Allows for more audio channels than the other algorithms, including configurations such as 7.1.
     */
    public val algorithm: aws.sdk.kotlin.services.mediaconvert.model.AudioNormalizationAlgorithm? = builder.algorithm
    /**
     * When enabled the output audio is corrected using the chosen algorithm. If disabled, the audio will be measured but not adjusted.
     */
    public val algorithmControl: aws.sdk.kotlin.services.mediaconvert.model.AudioNormalizationAlgorithmControl? = builder.algorithmControl
    /**
     * Content measuring above this level will be corrected to the target level. Content measuring below this level will not be corrected.
     */
    public val correctionGateLevel: kotlin.Int? = builder.correctionGateLevel
    /**
     * If set to LOG, log each output's audio track loudness to a CSV file.
     */
    public val loudnessLogging: aws.sdk.kotlin.services.mediaconvert.model.AudioNormalizationLoudnessLogging? = builder.loudnessLogging
    /**
     * If set to TRUE_PEAK, calculate and log the TruePeak for each output's audio track loudness.
     */
    public val peakCalculation: aws.sdk.kotlin.services.mediaconvert.model.AudioNormalizationPeakCalculation? = builder.peakCalculation
    /**
     * When you use Audio normalization, optionally use this setting to specify a target loudness. If you don't specify a value here, the encoder chooses a value for you, based on the algorithm that you choose for Algorithm. If you choose algorithm 1770-1, the encoder will choose -24 LKFS; otherwise, the encoder will choose -23 LKFS.
     */
    public val targetLkfs: kotlin.Double? = builder.targetLkfs
    /**
     * Specify the True-peak limiter threshold in decibels relative to full scale (dBFS). The peak inter-audio sample loudness in your output will be limited to the value that you specify, without affecting the overall target LKFS. Enter a value from 0 to -8. Leave blank to use the default value 0.
     */
    public val truePeakLimiterThreshold: kotlin.Double? = builder.truePeakLimiterThreshold

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.mediaconvert.model.AudioNormalizationSettings = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("AudioNormalizationSettings(")
        append("algorithm=$algorithm,")
        append("algorithmControl=$algorithmControl,")
        append("correctionGateLevel=$correctionGateLevel,")
        append("loudnessLogging=$loudnessLogging,")
        append("peakCalculation=$peakCalculation,")
        append("targetLkfs=$targetLkfs,")
        append("truePeakLimiterThreshold=$truePeakLimiterThreshold")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = algorithm?.hashCode() ?: 0
        result = 31 * result + (algorithmControl?.hashCode() ?: 0)
        result = 31 * result + (correctionGateLevel ?: 0)
        result = 31 * result + (loudnessLogging?.hashCode() ?: 0)
        result = 31 * result + (peakCalculation?.hashCode() ?: 0)
        result = 31 * result + (targetLkfs?.hashCode() ?: 0)
        result = 31 * result + (truePeakLimiterThreshold?.hashCode() ?: 0)
        return result
    }

    override fun equals(other: kotlin.Any?): kotlin.Boolean {
        if (this === other) return true
        if (other == null || this::class != other::class) return false

        other as AudioNormalizationSettings

        if (algorithm != other.algorithm) return false
        if (algorithmControl != other.algorithmControl) return false
        if (correctionGateLevel != other.correctionGateLevel) return false
        if (loudnessLogging != other.loudnessLogging) return false
        if (peakCalculation != other.peakCalculation) return false
        if (targetLkfs != other.targetLkfs) return false
        if (truePeakLimiterThreshold != other.truePeakLimiterThreshold) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.mediaconvert.model.AudioNormalizationSettings = Builder(this).apply(block).build()

    public class Builder {
        /**
         * Choose one of the following audio normalization algorithms: ITU-R BS.1770-1: Ungated loudness. A measurement of ungated average loudness for an entire piece of content, suitable for measurement of short-form content under ATSC recommendation A/85. Supports up to 5.1 audio channels. ITU-R BS.1770-2: Gated loudness. A measurement of gated average loudness compliant with the requirements of EBU-R128. Supports up to 5.1 audio channels. ITU-R BS.1770-3: Modified peak. The same loudness measurement algorithm as 1770-2, with an updated true peak measurement. ITU-R BS.1770-4: Higher channel count. Allows for more audio channels than the other algorithms, including configurations such as 7.1.
         */
        public var algorithm: aws.sdk.kotlin.services.mediaconvert.model.AudioNormalizationAlgorithm? = null
        /**
         * When enabled the output audio is corrected using the chosen algorithm. If disabled, the audio will be measured but not adjusted.
         */
        public var algorithmControl: aws.sdk.kotlin.services.mediaconvert.model.AudioNormalizationAlgorithmControl? = null
        /**
         * Content measuring above this level will be corrected to the target level. Content measuring below this level will not be corrected.
         */
        public var correctionGateLevel: kotlin.Int? = null
        /**
         * If set to LOG, log each output's audio track loudness to a CSV file.
         */
        public var loudnessLogging: aws.sdk.kotlin.services.mediaconvert.model.AudioNormalizationLoudnessLogging? = null
        /**
         * If set to TRUE_PEAK, calculate and log the TruePeak for each output's audio track loudness.
         */
        public var peakCalculation: aws.sdk.kotlin.services.mediaconvert.model.AudioNormalizationPeakCalculation? = null
        /**
         * When you use Audio normalization, optionally use this setting to specify a target loudness. If you don't specify a value here, the encoder chooses a value for you, based on the algorithm that you choose for Algorithm. If you choose algorithm 1770-1, the encoder will choose -24 LKFS; otherwise, the encoder will choose -23 LKFS.
         */
        public var targetLkfs: kotlin.Double? = null
        /**
         * Specify the True-peak limiter threshold in decibels relative to full scale (dBFS). The peak inter-audio sample loudness in your output will be limited to the value that you specify, without affecting the overall target LKFS. Enter a value from 0 to -8. Leave blank to use the default value 0.
         */
        public var truePeakLimiterThreshold: kotlin.Double? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.mediaconvert.model.AudioNormalizationSettings) : this() {
            this.algorithm = x.algorithm
            this.algorithmControl = x.algorithmControl
            this.correctionGateLevel = x.correctionGateLevel
            this.loudnessLogging = x.loudnessLogging
            this.peakCalculation = x.peakCalculation
            this.targetLkfs = x.targetLkfs
            this.truePeakLimiterThreshold = x.truePeakLimiterThreshold
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.mediaconvert.model.AudioNormalizationSettings = AudioNormalizationSettings(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy