// // Generated by Brutal.Fmod.Generate; do not edit by hand. #nullable enable namespace Brutal.FmodApi { public static partial class Fmod { /// /// /// Releases a DSP unit, freeing the memory used by that object. /// /// /// If DSP is not removed from the graph with ChannelControl::removeDSP after being added with /// ChannelControl::addDSP, it will not release and will instead return FMOD_ERR_DSP_INUSE. /// /// /// See Also: System::createDSP /// /// /// DSP::release /// /// public static Result TryRelease(this Dsp dsp) => PInvoke.DspRelease(dsp); /// /// /// Releases a DSP unit, freeing the memory used by that object. /// /// /// If DSP is not removed from the graph with ChannelControl::removeDSP after being added with /// ChannelControl::addDSP, it will not release and will instead return FMOD_ERR_DSP_INUSE. /// /// /// See Also: System::createDSP /// /// /// DSP::release /// /// public static void Release(this Dsp dsp) => TryRelease(dsp).Check(); /// /// /// Retrieves the parent System object. /// /// /// DSP::getSystemObject /// /// public static unsafe Result TryGetSystemObject(this Dsp dsp, out FmodSystem system) { fixed (FmodSystem* systemPtr = &system) return PInvoke.DspGetSystemObject(dsp, systemPtr); } /// /// /// Retrieves the parent System object. /// /// /// DSP::getSystemObject /// /// public static FmodSystem GetSystemObject(this Dsp dsp) { TryGetSystemObject(dsp, out var system).Check(); return system; } /// /// /// Adds a DSP unit as an input to this object. /// /// /// DSP::addInput /// /// public static unsafe Result TryAddInput( this Dsp dsp, Dsp input, out DspConnection connection, DspConnectionType type ) { fixed (DspConnection* connectionPtr = &connection) return PInvoke.DspAddInput(dsp, input, connectionPtr, type); } /// /// /// Adds a DSP unit as an input to this object. /// /// /// DSP::addInput /// /// public static DspConnection AddInput(this Dsp dsp, Dsp input, DspConnectionType type) { TryAddInput(dsp, input, out var connection, type).Check(); return connection; } /// /// /// Disconnect the specified input DSP. /// /// /// DSP::disconnectFrom /// /// public static Result TryDisconnectFrom(this Dsp dsp, Dsp target, DspConnection connection) => PInvoke.DspDisconnectFrom(dsp, target, connection); /// /// /// Disconnect the specified input DSP. /// /// /// DSP::disconnectFrom /// /// public static void DisconnectFrom(this Dsp dsp, Dsp target, DspConnection connection) => TryDisconnectFrom(dsp, target, connection).Check(); /// /// /// Disconnects all inputs and/or outputs. /// /// /// DSP::disconnectAll /// /// public static Result TryDisconnectAll(this Dsp dsp, Bool32 inputS, Bool32 outputS) => PInvoke.DspDisconnectAll(dsp, inputS, outputS); /// /// /// Disconnects all inputs and/or outputs. /// /// /// DSP::disconnectAll /// /// public static void DisconnectAll(this Dsp dsp, Bool32 inputS, Bool32 outputS) => TryDisconnectAll(dsp, inputS, outputS).Check(); /// /// /// Retrieves the number of DSP units in the input list. /// /// /// DSP::getNumInputs /// /// public static unsafe Result TryGetNumInputs(this Dsp dsp, out int numInputS) { fixed (int* numInputSPtr = &numInputS) return PInvoke.DspGetNumInputs(dsp, numInputSPtr); } /// /// /// Retrieves the number of DSP units in the input list. /// /// /// DSP::getNumInputs /// /// public static int GetNumInputs(this Dsp dsp) { TryGetNumInputs(dsp, out var numInputS).Check(); return numInputS; } /// /// /// Retrieves the number of DSP units in the output list. /// /// /// DSP::getNumOutputs /// /// public static unsafe Result TryGetNumOutputs(this Dsp dsp, out int numOutputS) { fixed (int* numOutputSPtr = &numOutputS) return PInvoke.DspGetNumOutputs(dsp, numOutputSPtr); } /// /// /// Retrieves the number of DSP units in the output list. /// /// /// DSP::getNumOutputs /// /// public static int GetNumOutputs(this Dsp dsp) { TryGetNumOutputs(dsp, out var numOutputS).Check(); return numOutputS; } /// /// /// Retrieves the DSP unit at the specified index in the input list. /// /// /// DSP::getInput /// /// public static unsafe Result TryGetInput( this Dsp dsp, int index, out Dsp input, out DspConnection inputConnection ) { fixed (Dsp* inputPtr = &input) fixed (DspConnection* inputConnectionPtr = &inputConnection) return PInvoke.DspGetInput(dsp, index, inputPtr, inputConnectionPtr); } /// /// /// Retrieves the DSP unit at the specified index in the input list. /// /// /// DSP::getInput /// /// public static void GetInput(this Dsp dsp, int index, out Dsp input, out DspConnection inputConnection) => TryGetInput(dsp, index, out input, out inputConnection).Check(); /// /// /// Retrieves the DSP unit at the specified index in the output list. /// /// /// DSP::getOutput /// /// public static unsafe Result TryGetOutput( this Dsp dsp, int index, out Dsp output, out DspConnection outputConnection ) { fixed (Dsp* outputPtr = &output) fixed (DspConnection* outputConnectionPtr = &outputConnection) return PInvoke.DspGetOutput(dsp, index, outputPtr, outputConnectionPtr); } /// /// /// Retrieves the DSP unit at the specified index in the output list. /// /// /// DSP::getOutput /// /// public static void GetOutput(this Dsp dsp, int index, out Dsp output, out DspConnection outputConnection) => TryGetOutput(dsp, index, out output, out outputConnection).Check(); /// /// /// Sets the processing active state. /// /// /// DSP::setActive /// /// public static Result TrySetActive(this Dsp dsp, Bool32 active) => PInvoke.DspSetActive(dsp, active); /// /// /// Sets the processing active state. /// /// /// DSP::setActive /// /// public static void SetActive(this Dsp dsp, Bool32 active) => TrySetActive(dsp, active).Check(); /// /// /// Retrieves the processing active state. /// /// /// DSP::getActive /// /// public static unsafe Result TryGetActive(this Dsp dsp, out Bool32 active) { fixed (Bool32* activePtr = &active) return PInvoke.DspGetActive(dsp, activePtr); } /// /// /// Retrieves the processing active state. /// /// /// DSP::getActive /// /// public static Bool32 GetActive(this Dsp dsp) { TryGetActive(dsp, out var active).Check(); return active; } /// /// /// Sets the processing bypass state. /// /// /// DSP::setBypass /// /// public static Result TrySetBypass(this Dsp dsp, Bool32 bypass) => PInvoke.DspSetBypass(dsp, bypass); /// /// /// Sets the processing bypass state. /// /// /// DSP::setBypass /// /// public static void SetBypass(this Dsp dsp, Bool32 bypass) => TrySetBypass(dsp, bypass).Check(); /// /// /// Retrieves the processing bypass state. /// /// /// DSP::getBypass /// /// public static unsafe Result TryGetBypass(this Dsp dsp, out Bool32 bypass) { fixed (Bool32* bypassPtr = &bypass) return PInvoke.DspGetBypass(dsp, bypassPtr); } /// /// /// Retrieves the processing bypass state. /// /// /// DSP::getBypass /// /// public static Bool32 GetBypass(this Dsp dsp) { TryGetBypass(dsp, out var bypass).Check(); return bypass; } /// /// /// Sets the scale of the wet and dry signal components. /// /// /// DSP::setWetDryMix /// /// public static Result TrySetWetDryMix(this Dsp dsp, float preWet, float postWet, float dry) => PInvoke.DspSetWetDryMix(dsp, preWet, postWet, dry); /// /// /// Sets the scale of the wet and dry signal components. /// /// /// DSP::setWetDryMix /// /// public static void SetWetDryMix(this Dsp dsp, float preWet, float postWet, float dry) => TrySetWetDryMix(dsp, preWet, postWet, dry).Check(); /// /// /// Retrieves the scale of the wet and dry signal components. /// /// /// DSP::getWetDryMix /// /// public static unsafe Result TryGetWetDryMix(this Dsp dsp, out float preWet, out float postWet, out float dry) { fixed (float* preWetPtr = &preWet) fixed (float* postWetPtr = &postWet) fixed (float* dryPtr = &dry) return PInvoke.DspGetWetDryMix(dsp, preWetPtr, postWetPtr, dryPtr); } /// /// /// Retrieves the scale of the wet and dry signal components. /// /// /// DSP::getWetDryMix /// /// public static void GetWetDryMix(this Dsp dsp, out float preWet, out float postWet, out float dry) => TryGetWetDryMix(dsp, out preWet, out postWet, out dry).Check(); /// /// /// Sets the PCM input format this DSP is to receive when processing. /// /// /// DSP::setChannelFormat /// /// public static Result TrySetChannelFormat( this Dsp dsp, ChannelMask channelMask, int numChannels, SpeakerMode sourceSpeakerMode ) => PInvoke.DspSetChannelFormat(dsp, channelMask, numChannels, sourceSpeakerMode); /// /// /// Sets the PCM input format this DSP is to receive when processing. /// /// /// DSP::setChannelFormat /// /// public static void SetChannelFormat( this Dsp dsp, ChannelMask channelMask, int numChannels, SpeakerMode sourceSpeakerMode ) => TrySetChannelFormat(dsp, channelMask, numChannels, sourceSpeakerMode).Check(); /// /// /// Retrieves the PCM input format this DSP will receive when processing. /// /// /// DSP::getChannelFormat /// /// public static unsafe Result TryGetChannelFormat( this Dsp dsp, out ChannelMask channelMask, out int numChannels, out SpeakerMode sourceSpeakerMode ) { fixed (ChannelMask* channelMaskPtr = &channelMask) fixed (int* numChannelsPtr = &numChannels) fixed (SpeakerMode* sourceSpeakerModePtr = &sourceSpeakerMode) return PInvoke.DspGetChannelFormat(dsp, channelMaskPtr, numChannelsPtr, sourceSpeakerModePtr); } /// /// /// Retrieves the PCM input format this DSP will receive when processing. /// /// /// DSP::getChannelFormat /// /// public static void GetChannelFormat( this Dsp dsp, out ChannelMask channelMask, out int numChannels, out SpeakerMode sourceSpeakerMode ) => TryGetChannelFormat(dsp, out channelMask, out numChannels, out sourceSpeakerMode).Check(); /// /// /// Retrieves the output format this DSP produces when processing based on the input specified. /// /// /// DSP::getOutputChannelFormat /// /// public static unsafe Result TryGetOutputChannelFormat( this Dsp dsp, ChannelMask inMask, int inChannels, SpeakerMode inSpeakerMode, out ChannelMask outMask, out int outChannels, out SpeakerMode outSpeakerMode ) { fixed (ChannelMask* outMaskPtr = &outMask) fixed (int* outChannelsPtr = &outChannels) fixed (SpeakerMode* outSpeakerModePtr = &outSpeakerMode) return PInvoke.DspGetOutputChannelFormat( dsp, inMask, inChannels, inSpeakerMode, outMaskPtr, outChannelsPtr, outSpeakerModePtr ); } /// /// /// Retrieves the output format this DSP produces when processing based on the input specified. /// /// /// DSP::getOutputChannelFormat /// /// public static void GetOutputChannelFormat( this Dsp dsp, ChannelMask inMask, int inChannels, SpeakerMode inSpeakerMode, out ChannelMask outMask, out int outChannels, out SpeakerMode outSpeakerMode ) => TryGetOutputChannelFormat( dsp, inMask, inChannels, inSpeakerMode, out outMask, out outChannels, out outSpeakerMode ) .Check(); /// /// /// Reset a DSP's internal state, making it ready for a new input signal. /// /// /// This will clear all internal state derived from input signal while retaining any set parameter values. /// The intended use of the function is to avoid audible artifacts if moving the DSP from one part of the /// DSP graph to another. /// /// /// DSP::reset /// /// public static Result TryReset(this Dsp dsp) => PInvoke.DspReset(dsp); /// /// /// Reset a DSP's internal state, making it ready for a new input signal. /// /// /// This will clear all internal state derived from input signal while retaining any set parameter values. /// The intended use of the function is to avoid audible artifacts if moving the DSP from one part of the /// DSP graph to another. /// /// /// DSP::reset /// /// public static void Reset(this Dsp dsp) => TryReset(dsp).Check(); /// /// /// Sets the callback for DSP notifications. /// /// /// DSP::setCallback /// /// public static Result TrySetCallback(this Dsp dsp, DspCallbackPtr callback) => PInvoke.DspSetCallback(dsp, callback); /// /// /// Sets the callback for DSP notifications. /// /// /// DSP::setCallback /// /// public static void SetCallback(this Dsp dsp, DspCallbackPtr callback) => TrySetCallback(dsp, callback).Check(); /// /// /// Sets a floating point parameter by index. /// /// /// DSP::setParameterFloat /// /// public static Result TrySetParameterFloat(this Dsp dsp, int index, float value) => PInvoke.DspSetParameterFloat(dsp, index, value); /// /// /// Sets a floating point parameter by index. /// /// /// DSP::setParameterFloat /// /// public static void SetParameterFloat(this Dsp dsp, int index, float value) => TrySetParameterFloat(dsp, index, value).Check(); /// /// /// Sets an integer parameter by index. /// /// /// DSP::setParameterInt /// /// public static Result TrySetParameterInt(this Dsp dsp, int index, int value) => PInvoke.DspSetParameterInt(dsp, index, value); /// /// /// Sets an integer parameter by index. /// /// /// DSP::setParameterInt /// /// public static void SetParameterInt(this Dsp dsp, int index, int value) => TrySetParameterInt(dsp, index, value).Check(); /// /// /// Sets a boolean parameter by index. /// /// /// DSP::setParameterBool /// /// public static Result TrySetParameterBool(this Dsp dsp, int index, Bool32 value) => PInvoke.DspSetParameterBool(dsp, index, value); /// /// /// Sets a boolean parameter by index. /// /// /// DSP::setParameterBool /// /// public static void SetParameterBool(this Dsp dsp, int index, Bool32 value) => TrySetParameterBool(dsp, index, value).Check(); /// /// /// Sets a binary data parameter by index. /// /// /// DSP::setParameterData /// /// public static Result TrySetParameterData(this Dsp dsp, int index, nint data, uint length) => PInvoke.DspSetParameterData(dsp, index, data, length); /// /// /// Sets a binary data parameter by index. /// /// /// DSP::setParameterData /// /// public static void SetParameterData(this Dsp dsp, int index, nint data, uint length) => TrySetParameterData(dsp, index, data, length).Check(); /// /// /// Retrieves a floating point parameter by index. /// /// /// DSP::getParameterFloat /// /// public static unsafe Result TryGetParameterFloat( this Dsp dsp, int index, out float value, byte* valuesTr, int valuesTrlen ) { fixed (float* valuePtr = &value) return PInvoke.DspGetParameterFloat(dsp, index, valuePtr, valuesTr, valuesTrlen); } /// /// /// Retrieves a floating point parameter by index. /// /// /// DSP::getParameterFloat /// /// public static unsafe float GetParameterFloat(this Dsp dsp, int index, byte* valuesTr, int valuesTrlen) { TryGetParameterFloat(dsp, index, out var value, valuesTr, valuesTrlen).Check(); return value; } /// /// /// Retrieves an integer parameter by index. /// /// /// DSP::getParameterInt /// /// public static unsafe Result TryGetParameterInt( this Dsp dsp, int index, out int value, byte* valuesTr, int valuesTrlen ) { fixed (int* valuePtr = &value) return PInvoke.DspGetParameterInt(dsp, index, valuePtr, valuesTr, valuesTrlen); } /// /// /// Retrieves an integer parameter by index. /// /// /// DSP::getParameterInt /// /// public static unsafe int GetParameterInt(this Dsp dsp, int index, byte* valuesTr, int valuesTrlen) { TryGetParameterInt(dsp, index, out var value, valuesTr, valuesTrlen).Check(); return value; } /// /// /// Retrieves a boolean parameter by index. /// /// /// DSP::getParameterBool /// /// public static unsafe Result TryGetParameterBool( this Dsp dsp, int index, out Bool32 value, byte* valuesTr, int valuesTrlen ) { fixed (Bool32* valuePtr = &value) return PInvoke.DspGetParameterBool(dsp, index, valuePtr, valuesTr, valuesTrlen); } /// /// /// Retrieves a boolean parameter by index. /// /// /// DSP::getParameterBool /// /// public static unsafe Bool32 GetParameterBool(this Dsp dsp, int index, byte* valuesTr, int valuesTrlen) { TryGetParameterBool(dsp, index, out var value, valuesTr, valuesTrlen).Check(); return value; } /// /// /// Retrieves a binary data parameter by index. /// /// /// DSP::getParameterData /// /// public static unsafe Result TryGetParameterData( this Dsp dsp, int index, out nint data, out uint length, byte* valuesTr, int valuesTrlen ) { fixed (nint* dataPtr = &data) fixed (uint* lengthPtr = &length) return PInvoke.DspGetParameterData(dsp, index, dataPtr, lengthPtr, valuesTr, valuesTrlen); } /// /// /// Retrieves a binary data parameter by index. /// /// /// DSP::getParameterData /// /// public static unsafe void GetParameterData( this Dsp dsp, int index, out nint data, out uint length, byte* valuesTr, int valuesTrlen ) => TryGetParameterData(dsp, index, out data, out length, valuesTr, valuesTrlen).Check(); /// /// /// Retrieves the number of parameters exposed by this unit. /// /// /// DSP::getNumParameters /// /// public static unsafe Result TryGetNumParameters(this Dsp dsp, out int numParams) { fixed (int* numParamsPtr = &numParams) return PInvoke.DspGetNumParameters(dsp, numParamsPtr); } /// /// /// Retrieves the number of parameters exposed by this unit. /// /// /// DSP::getNumParameters /// /// public static int GetNumParameters(this Dsp dsp) { TryGetNumParameters(dsp, out var numParams).Check(); return numParams; } /// /// /// Retrieve information about a specified parameter. /// /// /// DSP::getParameterInfo /// /// public static unsafe Result TryGetParameterInfo(this Dsp dsp, int index, out DspParameterDesc* desc) { fixed (DspParameterDesc** descPtr = &desc) return PInvoke.DspGetParameterInfo(dsp, index, descPtr); } /// /// /// Retrieve information about a specified parameter. /// /// /// DSP::getParameterInfo /// /// public static unsafe DspParameterDesc* GetParameterInfo(this Dsp dsp, int index) { TryGetParameterInfo(dsp, index, out var desc).Check(); return desc; } /// /// /// Retrieve the index of the first data parameter of a particular data type. /// /// /// DSP::getDataParameterIndex /// /// public static unsafe Result TryGetDataParameterIndex(this Dsp dsp, int dataType, out int index) { fixed (int* indexPtr = &index) return PInvoke.DspGetDataParameterIndex(dsp, dataType, indexPtr); } /// /// /// Retrieve the index of the first data parameter of a particular data type. /// /// /// DSP::getDataParameterIndex /// /// public static int GetDataParameterIndex(this Dsp dsp, int dataType) { TryGetDataParameterIndex(dsp, dataType, out var index).Check(); return index; } /// /// /// Display or hide a DSP unit configuration dialog box inside the target window. /// /// /// DSP::showConfigDialog /// /// public static Result TryShowConfigDialog(this Dsp dsp, nint hwnd, Bool32 show) => PInvoke.DspShowConfigDialog(dsp, hwnd, show); /// /// /// Display or hide a DSP unit configuration dialog box inside the target window. /// /// /// DSP::showConfigDialog /// /// public static void ShowConfigDialog(this Dsp dsp, nint hwnd, Bool32 show) => TryShowConfigDialog(dsp, hwnd, show).Check(); /// /// /// Retrieves information about this DSP unit. /// /// /// DSP::getInfo /// /// public static unsafe Result TryGetInfo( this Dsp dsp, byte* name, out uint version, out int channels, out int configWidth, out int configHeight ) { fixed (uint* versionPtr = &version) fixed (int* channelsPtr = &channels) fixed (int* configWidthPtr = &configWidth) fixed (int* configHeightPtr = &configHeight) return PInvoke.DspGetInfo(dsp, name, versionPtr, channelsPtr, configWidthPtr, configHeightPtr); } /// /// /// Retrieves information about this DSP unit. /// /// /// DSP::getInfo /// /// public static unsafe void GetInfo( this Dsp dsp, byte* name, out uint version, out int channels, out int configWidth, out int configHeight ) => TryGetInfo(dsp, name, out version, out channels, out configWidth, out configHeight).Check(); /// /// /// Retrieves the pre-defined type of a FMOD registered DSP unit. /// /// /// DSP::getType /// /// public static unsafe Result TryGetType(this Dsp dsp, out DspType type) { fixed (DspType* typePtr = &type) return PInvoke.DspGetType(dsp, typePtr); } /// /// /// Retrieves the pre-defined type of a FMOD registered DSP unit. /// /// /// DSP::getType /// /// public static DspType GetType(this Dsp dsp) { TryGetType(dsp, out var type).Check(); return type; } /// /// /// Retrieves the idle state. /// /// /// DSP::getIdle /// /// public static unsafe Result TryGetIdle(this Dsp dsp, out Bool32 idle) { fixed (Bool32* idlePtr = &idle) return PInvoke.DspGetIdle(dsp, idlePtr); } /// /// /// Retrieves the idle state. /// /// /// DSP::getIdle /// /// public static Bool32 GetIdle(this Dsp dsp) { TryGetIdle(dsp, out var idle).Check(); return idle; } /// /// /// Sets a user value associated with this object. /// /// /// DSP::setUserData /// /// public static Result TrySetUserData(this Dsp dsp, nint userData) => PInvoke.DspSetUserData(dsp, userData); /// /// /// Sets a user value associated with this object. /// /// /// DSP::setUserData /// /// public static void SetUserData(this Dsp dsp, nint userData) => TrySetUserData(dsp, userData).Check(); /// /// /// Retrieves a user value associated with this object. /// /// /// DSP::getUserData /// /// public static unsafe Result TryGetUserData(this Dsp dsp, out nint userData) { fixed (nint* userDataPtr = &userData) return PInvoke.DspGetUserData(dsp, userDataPtr); } /// /// /// Retrieves a user value associated with this object. /// /// /// DSP::getUserData /// /// public static nint GetUserData(this Dsp dsp) { TryGetUserData(dsp, out var userData).Check(); return userData; } /// /// /// Sets the input and output signal metering enabled states. /// /// /// DSP::setMeteringEnabled /// /// public static Result TrySetMeteringEnabled(this Dsp dsp, Bool32 inputEnabled, Bool32 outputEnabled) => PInvoke.DspSetMeteringEnabled(dsp, inputEnabled, outputEnabled); /// /// /// Sets the input and output signal metering enabled states. /// /// /// DSP::setMeteringEnabled /// /// public static void SetMeteringEnabled(this Dsp dsp, Bool32 inputEnabled, Bool32 outputEnabled) => TrySetMeteringEnabled(dsp, inputEnabled, outputEnabled).Check(); /// /// /// Retrieves the input and output signal metering enabled states. /// /// /// DSP::getMeteringEnabled /// /// public static unsafe Result TryGetMeteringEnabled( this Dsp dsp, out Bool32 inputEnabled, out Bool32 outputEnabled ) { fixed (Bool32* inputEnabledPtr = &inputEnabled) fixed (Bool32* outputEnabledPtr = &outputEnabled) return PInvoke.DspGetMeteringEnabled(dsp, inputEnabledPtr, outputEnabledPtr); } /// /// /// Retrieves the input and output signal metering enabled states. /// /// /// DSP::getMeteringEnabled /// /// public static void GetMeteringEnabled(this Dsp dsp, out Bool32 inputEnabled, out Bool32 outputEnabled) => TryGetMeteringEnabled(dsp, out inputEnabled, out outputEnabled).Check(); /// /// /// Retrieve the signal metering enabled metering information. /// /// /// DSP::getMeteringInfo /// /// public static unsafe Result TryGetMeteringInfo( this Dsp dsp, out DspMeteringInfo inputInfo, out DspMeteringInfo outputInfo ) { fixed (DspMeteringInfo* inputInfoPtr = &inputInfo) fixed (DspMeteringInfo* outputInfoPtr = &outputInfo) return PInvoke.DspGetMeteringInfo(dsp, inputInfoPtr, outputInfoPtr); } /// /// /// Retrieve the signal metering enabled metering information. /// /// /// DSP::getMeteringInfo /// /// public static void GetMeteringInfo( this Dsp dsp, out DspMeteringInfo inputInfo, out DspMeteringInfo outputInfo ) => TryGetMeteringInfo(dsp, out inputInfo, out outputInfo).Check(); /// /// /// Retrieves statistics on the mixer thread CPU usage for this unit. /// /// /// DSP::getCPUUsage /// /// public static unsafe Result TryGetCpuUsage(this Dsp dsp, out uint exclusive, out uint inclusive) { fixed (uint* exclusivePtr = &exclusive) fixed (uint* inclusivePtr = &inclusive) return PInvoke.DspGetCpuUsage(dsp, exclusivePtr, inclusivePtr); } /// /// /// Retrieves statistics on the mixer thread CPU usage for this unit. /// /// /// DSP::getCPUUsage /// /// public static void GetCpuUsage(this Dsp dsp, out uint exclusive, out uint inclusive) => TryGetCpuUsage(dsp, out exclusive, out inclusive).Check(); } }