/// <summary>
 /// Sanitizes the given sample rate for the given encoder.
 /// </summary>
 /// <param name="encoder">The encoder.</param>
 /// <param name="sampleRate">The sample rate to sanitize.</param>
 /// <returns>The sanitized sample rate.</returns>
 public static int SanitizeSampleRate(HBAudioEncoder encoder, int sampleRate)
 {
     return(hbFunctions.hb_audio_samplerate_find_closest(sampleRate, (uint)encoder.Id));
 }