Skip to main content
Version: 2.x

Class Utility

Assembly: cs.temp.dll.dll
Declaration
public static class Utility

Fields

MIN_DBFS

Declaration
public const float MIN_DBFS = -897.069

Methods

GetNativeBuffer(IntPtr, uint)

Get Odin native buffer IntPtr data

Declaration
public static byte[] GetNativeBuffer(IntPtr pointer, uint length)
Returns

System.Byte[]

Parameters
TypeName
Odin.IntPtrpointer
System.UInt32length

Test(bool, string)

Declaration
public static bool Test(bool condition, string message)
Returns

System.Boolean

Parameters
TypeName
System.Booleancondition
System.Stringmessage

IsOk(OdinError)

Checks the return code for errors

Declaration
public static bool IsOk(NativeBindings.OdinError error)
Returns

System.Boolean: false on error

Parameters
TypeNameDescription
OdinNative.Core.Imports.NativeBindings.OdinErrorerrorOdin error return code

IsOk(OdinCryptoPeerStatus)

Checks the return code for crypto status

Declaration
public static bool IsOk(NativeBindings.OdinCryptoPeerStatus status)
Returns

System.Boolean: false on error

Parameters
TypeNameDescription
OdinNative.Core.Imports.NativeBindings.OdinCryptoPeerStatusstatusOdin crypto return status

OdinErrorToString(OdinError)

Retrieves the name of the constant in the specified OdinNative.Core.Imports.NativeBindings.OdinError?text=error

Declaration
public static string OdinErrorToString(NativeBindings.OdinError error)
Returns

System.String: string representation of OdinNative.Core.Imports.NativeBindings.OdinError?text=OdinError

Parameters
TypeNameDescription
OdinNative.Core.Imports.NativeBindings.OdinErrorerrorOdin error return code

OdinLastErrorString()

Retrieves last native error message

Declaration
public static string OdinLastErrorString()
Returns

System.String: error message### RateToSamples(uint, int) Get sample size by samplerate and time

Declaration
public static int RateToSamples(uint sampleRate = 48000, int ms = 20)
Returns

System.Int32: sample size

Parameters
TypeNameDescription
System.UInt32sampleRatesamplerate in hz
System.Int32mstime in milliseconds