diff --git a/BassBoom.Basolia/Format/FormatTools.cs b/BassBoom.Basolia/Format/FormatTools.cs index 530d5af..17a2be1 100644 --- a/BassBoom.Basolia/Format/FormatTools.cs +++ b/BassBoom.Basolia/Format/FormatTools.cs @@ -40,6 +40,7 @@ public static class FormatTools /// /// Gets the format information /// + /// Basolia instance that contains a valid handle public static (long rate, int channels, int encoding) GetFormatInfo(BasoliaMedia? basolia) { if (basolia is null) @@ -123,7 +124,7 @@ public static string GetEncodingName(int encoding) // We're now entering the dangerous zone unsafe { - // Get the encodings + // Get the encoding name var @delegate = MpgNative.GetDelegate(MpgNative.libManagerOut, nameof(NativeOutputLib.out123_enc_name)); IntPtr namePtr = @delegate.Invoke(encoding); encodingName = Marshal.PtrToStringAnsi(namePtr); @@ -151,7 +152,7 @@ public static string GetEncodingDescription(int encoding) // We're now entering the dangerous zone unsafe { - // Get the encodings + // Get the encoding description var @delegate = MpgNative.GetDelegate(MpgNative.libManagerOut, nameof(NativeOutputLib.out123_enc_longname)); IntPtr descriptionPtr = @delegate.Invoke(encoding); encodingDescription = Marshal.PtrToStringAnsi(descriptionPtr); @@ -164,8 +165,10 @@ public static string GetEncodingDescription(int encoding) /// /// Gets the supported formats /// + /// Basolia instance that contains a valid handle public static FormatInfo[] GetFormats(BasoliaMedia? basolia) { + InitBasolia.CheckInited(); if (basolia is null) throw new BasoliaException("Basolia instance is not provided", mpg123_errors.MPG123_BAD_HANDLE); var formats = new List();