Skip to main content
Version: 1.x

Class Utility

Declaration
public static class Utility

Fields

OK

Representative ErrorCode for Ok.

Declaration
public const uint OK = 0

Methods

RateToSamples(MediaSampleRate, int)

Get sample size by samplerate and time

Declaration
public static int RateToSamples(MediaSampleRate sampleRate = MediaSampleRate.Hz48000, int ms = 20)
Returns

System.Int32: sample size

Parameters
TypeNameDescription
OdinNative.Core.MediaSampleRatesampleRatesamplerate in hz
System.Int32mstime in milliseconds

IsError(uint)

Determines if the specified error code identifies an actual error.

Declaration
public static bool IsError(uint error)
Returns

System.Boolean: true if error

Parameters
TypeNameDescription
System.UInt32errorerror code