/// <summary>
 /// Sanitizes an audio bitrate given the output codec, sample rate and mixdown.
 /// </summary>
 /// <param name="audioBitrate">
 /// The desired audio bitrate.
 /// </param>
 /// <param name="encoder">
 /// The output encoder to be used.
 /// </param>
 /// <param name="sampleRate">
 /// The output sample rate to be used.
 /// </param>
 /// <param name="mixdown">
 /// The mixdown to be used.
 /// </param>
 /// <returns>
 /// A sanitized audio bitrate.
 /// </returns>
 public static int SanitizeAudioBitrate(int audioBitrate, HBAudioEncoder encoder, int sampleRate, HBMixdown mixdown)
 {
     return(hbFunctions.hb_audio_bitrate_get_best((uint)encoder.Id, audioBitrate, sampleRate, mixdown.Id));
 }