mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
1179 lines
46 KiB
C#
1179 lines
46 KiB
C#
// <auto-generated/>
|
|
// Generated by Brutal.Fmod.Generate; do not edit by hand.
|
|
#nullable enable
|
|
|
|
namespace Brutal.FmodApi
|
|
{
|
|
public static partial class Fmod
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// Releases a DSP unit, freeing the memory used by that object.
|
|
/// </para>
|
|
/// <para>
|
|
/// 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.
|
|
/// </para>
|
|
/// <para>
|
|
/// <b>See Also:</b> System::createDSP
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_release">DSP::release</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TryRelease(this Dsp dsp) => PInvoke.DspRelease(dsp);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Releases a DSP unit, freeing the memory used by that object.
|
|
/// </para>
|
|
/// <para>
|
|
/// 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.
|
|
/// </para>
|
|
/// <para>
|
|
/// <b>See Also:</b> System::createDSP
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_release">DSP::release</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void Release(this Dsp dsp) => TryRelease(dsp).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the parent System object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getsystemobject">DSP::getSystemObject</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetSystemObject(this Dsp dsp, out FmodSystem system)
|
|
{
|
|
fixed (FmodSystem* systemPtr = &system)
|
|
return PInvoke.DspGetSystemObject(dsp, systemPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the parent System object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getsystemobject">DSP::getSystemObject</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static FmodSystem GetSystemObject(this Dsp dsp)
|
|
{
|
|
TryGetSystemObject(dsp, out var system).Check();
|
|
return system;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Adds a DSP unit as an input to this object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_addinput">DSP::addInput</see>
|
|
/// </para>
|
|
/// </summary>
|
|
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);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Adds a DSP unit as an input to this object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_addinput">DSP::addInput</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static DspConnection AddInput(this Dsp dsp, Dsp input, DspConnectionType type)
|
|
{
|
|
TryAddInput(dsp, input, out var connection, type).Check();
|
|
return connection;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Disconnect the specified input DSP.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_disconnectfrom">DSP::disconnectFrom</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TryDisconnectFrom(this Dsp dsp, Dsp target, DspConnection connection) =>
|
|
PInvoke.DspDisconnectFrom(dsp, target, connection);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Disconnect the specified input DSP.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_disconnectfrom">DSP::disconnectFrom</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void DisconnectFrom(this Dsp dsp, Dsp target, DspConnection connection) =>
|
|
TryDisconnectFrom(dsp, target, connection).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Disconnects all inputs and/or outputs.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_disconnectall">DSP::disconnectAll</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TryDisconnectAll(this Dsp dsp, Bool32 inputS, Bool32 outputS) =>
|
|
PInvoke.DspDisconnectAll(dsp, inputS, outputS);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Disconnects all inputs and/or outputs.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_disconnectall">DSP::disconnectAll</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void DisconnectAll(this Dsp dsp, Bool32 inputS, Bool32 outputS) =>
|
|
TryDisconnectAll(dsp, inputS, outputS).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the number of DSP units in the input list.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getnuminputs">DSP::getNumInputs</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetNumInputs(this Dsp dsp, out int numInputS)
|
|
{
|
|
fixed (int* numInputSPtr = &numInputS)
|
|
return PInvoke.DspGetNumInputs(dsp, numInputSPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the number of DSP units in the input list.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getnuminputs">DSP::getNumInputs</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static int GetNumInputs(this Dsp dsp)
|
|
{
|
|
TryGetNumInputs(dsp, out var numInputS).Check();
|
|
return numInputS;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the number of DSP units in the output list.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getnumoutputs">DSP::getNumOutputs</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetNumOutputs(this Dsp dsp, out int numOutputS)
|
|
{
|
|
fixed (int* numOutputSPtr = &numOutputS)
|
|
return PInvoke.DspGetNumOutputs(dsp, numOutputSPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the number of DSP units in the output list.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getnumoutputs">DSP::getNumOutputs</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static int GetNumOutputs(this Dsp dsp)
|
|
{
|
|
TryGetNumOutputs(dsp, out var numOutputS).Check();
|
|
return numOutputS;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the DSP unit at the specified index in the input list.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getinput">DSP::getInput</see>
|
|
/// </para>
|
|
/// </summary>
|
|
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);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the DSP unit at the specified index in the input list.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getinput">DSP::getInput</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void GetInput(this Dsp dsp, int index, out Dsp input, out DspConnection inputConnection) =>
|
|
TryGetInput(dsp, index, out input, out inputConnection).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the DSP unit at the specified index in the output list.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getoutput">DSP::getOutput</see>
|
|
/// </para>
|
|
/// </summary>
|
|
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);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the DSP unit at the specified index in the output list.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getoutput">DSP::getOutput</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void GetOutput(this Dsp dsp, int index, out Dsp output, out DspConnection outputConnection) =>
|
|
TryGetOutput(dsp, index, out output, out outputConnection).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the processing active state.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_setactive">DSP::setActive</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetActive(this Dsp dsp, Bool32 active) => PInvoke.DspSetActive(dsp, active);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the processing active state.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_setactive">DSP::setActive</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetActive(this Dsp dsp, Bool32 active) => TrySetActive(dsp, active).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the processing active state.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getactive">DSP::getActive</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetActive(this Dsp dsp, out Bool32 active)
|
|
{
|
|
fixed (Bool32* activePtr = &active)
|
|
return PInvoke.DspGetActive(dsp, activePtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the processing active state.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getactive">DSP::getActive</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Bool32 GetActive(this Dsp dsp)
|
|
{
|
|
TryGetActive(dsp, out var active).Check();
|
|
return active;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the processing bypass state.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_setbypass">DSP::setBypass</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetBypass(this Dsp dsp, Bool32 bypass) => PInvoke.DspSetBypass(dsp, bypass);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the processing bypass state.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_setbypass">DSP::setBypass</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetBypass(this Dsp dsp, Bool32 bypass) => TrySetBypass(dsp, bypass).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the processing bypass state.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getbypass">DSP::getBypass</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetBypass(this Dsp dsp, out Bool32 bypass)
|
|
{
|
|
fixed (Bool32* bypassPtr = &bypass)
|
|
return PInvoke.DspGetBypass(dsp, bypassPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the processing bypass state.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getbypass">DSP::getBypass</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Bool32 GetBypass(this Dsp dsp)
|
|
{
|
|
TryGetBypass(dsp, out var bypass).Check();
|
|
return bypass;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the scale of the wet and dry signal components.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_setwetdrymix">DSP::setWetDryMix</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetWetDryMix(this Dsp dsp, float preWet, float postWet, float dry) =>
|
|
PInvoke.DspSetWetDryMix(dsp, preWet, postWet, dry);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the scale of the wet and dry signal components.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_setwetdrymix">DSP::setWetDryMix</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetWetDryMix(this Dsp dsp, float preWet, float postWet, float dry) =>
|
|
TrySetWetDryMix(dsp, preWet, postWet, dry).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the scale of the wet and dry signal components.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getwetdrymix">DSP::getWetDryMix</see>
|
|
/// </para>
|
|
/// </summary>
|
|
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);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the scale of the wet and dry signal components.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getwetdrymix">DSP::getWetDryMix</see>
|
|
/// </para>
|
|
/// </summary>
|
|
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();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the PCM input format this DSP is to receive when processing.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_setchannelformat">DSP::setChannelFormat</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetChannelFormat(
|
|
this Dsp dsp,
|
|
ChannelMask channelMask,
|
|
int numChannels,
|
|
SpeakerMode sourceSpeakerMode
|
|
) => PInvoke.DspSetChannelFormat(dsp, channelMask, numChannels, sourceSpeakerMode);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the PCM input format this DSP is to receive when processing.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_setchannelformat">DSP::setChannelFormat</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetChannelFormat(
|
|
this Dsp dsp,
|
|
ChannelMask channelMask,
|
|
int numChannels,
|
|
SpeakerMode sourceSpeakerMode
|
|
) => TrySetChannelFormat(dsp, channelMask, numChannels, sourceSpeakerMode).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the PCM input format this DSP will receive when processing.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getchannelformat">DSP::getChannelFormat</see>
|
|
/// </para>
|
|
/// </summary>
|
|
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);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the PCM input format this DSP will receive when processing.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getchannelformat">DSP::getChannelFormat</see>
|
|
/// </para>
|
|
/// </summary>
|
|
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();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the output format this DSP produces when processing based on the input specified.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getoutputchannelformat">DSP::getOutputChannelFormat</see>
|
|
/// </para>
|
|
/// </summary>
|
|
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
|
|
);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the output format this DSP produces when processing based on the input specified.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getoutputchannelformat">DSP::getOutputChannelFormat</see>
|
|
/// </para>
|
|
/// </summary>
|
|
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();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Reset a DSP's internal state, making it ready for a new input signal.
|
|
/// </para>
|
|
/// <para>
|
|
/// 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.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_reset">DSP::reset</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TryReset(this Dsp dsp) => PInvoke.DspReset(dsp);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Reset a DSP's internal state, making it ready for a new input signal.
|
|
/// </para>
|
|
/// <para>
|
|
/// 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.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_reset">DSP::reset</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void Reset(this Dsp dsp) => TryReset(dsp).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the callback for DSP notifications.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_setcallback">DSP::setCallback</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetCallback(this Dsp dsp, DspCallbackPtr callback) =>
|
|
PInvoke.DspSetCallback(dsp, callback);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the callback for DSP notifications.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_setcallback">DSP::setCallback</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetCallback(this Dsp dsp, DspCallbackPtr callback) => TrySetCallback(dsp, callback).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets a floating point parameter by index.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_setparameterfloat">DSP::setParameterFloat</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetParameterFloat(this Dsp dsp, int index, float value) =>
|
|
PInvoke.DspSetParameterFloat(dsp, index, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets a floating point parameter by index.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_setparameterfloat">DSP::setParameterFloat</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetParameterFloat(this Dsp dsp, int index, float value) =>
|
|
TrySetParameterFloat(dsp, index, value).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets an integer parameter by index.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_setparameterint">DSP::setParameterInt</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetParameterInt(this Dsp dsp, int index, int value) =>
|
|
PInvoke.DspSetParameterInt(dsp, index, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets an integer parameter by index.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_setparameterint">DSP::setParameterInt</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetParameterInt(this Dsp dsp, int index, int value) =>
|
|
TrySetParameterInt(dsp, index, value).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets a boolean parameter by index.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_setparameterbool">DSP::setParameterBool</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetParameterBool(this Dsp dsp, int index, Bool32 value) =>
|
|
PInvoke.DspSetParameterBool(dsp, index, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets a boolean parameter by index.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_setparameterbool">DSP::setParameterBool</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetParameterBool(this Dsp dsp, int index, Bool32 value) =>
|
|
TrySetParameterBool(dsp, index, value).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets a binary data parameter by index.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_setparameterdata">DSP::setParameterData</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetParameterData(this Dsp dsp, int index, nint data, uint length) =>
|
|
PInvoke.DspSetParameterData(dsp, index, data, length);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets a binary data parameter by index.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_setparameterdata">DSP::setParameterData</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetParameterData(this Dsp dsp, int index, nint data, uint length) =>
|
|
TrySetParameterData(dsp, index, data, length).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves a floating point parameter by index.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getparameterfloat">DSP::getParameterFloat</see>
|
|
/// </para>
|
|
/// </summary>
|
|
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);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves a floating point parameter by index.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getparameterfloat">DSP::getParameterFloat</see>
|
|
/// </para>
|
|
/// </summary>
|
|
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;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves an integer parameter by index.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getparameterint">DSP::getParameterInt</see>
|
|
/// </para>
|
|
/// </summary>
|
|
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);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves an integer parameter by index.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getparameterint">DSP::getParameterInt</see>
|
|
/// </para>
|
|
/// </summary>
|
|
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;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves a boolean parameter by index.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getparameterbool">DSP::getParameterBool</see>
|
|
/// </para>
|
|
/// </summary>
|
|
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);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves a boolean parameter by index.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getparameterbool">DSP::getParameterBool</see>
|
|
/// </para>
|
|
/// </summary>
|
|
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;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves a binary data parameter by index.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getparameterdata">DSP::getParameterData</see>
|
|
/// </para>
|
|
/// </summary>
|
|
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);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves a binary data parameter by index.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getparameterdata">DSP::getParameterData</see>
|
|
/// </para>
|
|
/// </summary>
|
|
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();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the number of parameters exposed by this unit.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getnumparameters">DSP::getNumParameters</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetNumParameters(this Dsp dsp, out int numParams)
|
|
{
|
|
fixed (int* numParamsPtr = &numParams)
|
|
return PInvoke.DspGetNumParameters(dsp, numParamsPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the number of parameters exposed by this unit.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getnumparameters">DSP::getNumParameters</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static int GetNumParameters(this Dsp dsp)
|
|
{
|
|
TryGetNumParameters(dsp, out var numParams).Check();
|
|
return numParams;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieve information about a specified parameter.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getparameterinfo">DSP::getParameterInfo</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetParameterInfo(this Dsp dsp, int index, out DspParameterDesc* desc)
|
|
{
|
|
fixed (DspParameterDesc** descPtr = &desc)
|
|
return PInvoke.DspGetParameterInfo(dsp, index, descPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieve information about a specified parameter.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getparameterinfo">DSP::getParameterInfo</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe DspParameterDesc* GetParameterInfo(this Dsp dsp, int index)
|
|
{
|
|
TryGetParameterInfo(dsp, index, out var desc).Check();
|
|
return desc;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieve the index of the first data parameter of a particular data type.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getdataparameterindex">DSP::getDataParameterIndex</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetDataParameterIndex(this Dsp dsp, int dataType, out int index)
|
|
{
|
|
fixed (int* indexPtr = &index)
|
|
return PInvoke.DspGetDataParameterIndex(dsp, dataType, indexPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieve the index of the first data parameter of a particular data type.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getdataparameterindex">DSP::getDataParameterIndex</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static int GetDataParameterIndex(this Dsp dsp, int dataType)
|
|
{
|
|
TryGetDataParameterIndex(dsp, dataType, out var index).Check();
|
|
return index;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Display or hide a DSP unit configuration dialog box inside the target window.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_showconfigdialog">DSP::showConfigDialog</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TryShowConfigDialog(this Dsp dsp, nint hwnd, Bool32 show) =>
|
|
PInvoke.DspShowConfigDialog(dsp, hwnd, show);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Display or hide a DSP unit configuration dialog box inside the target window.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_showconfigdialog">DSP::showConfigDialog</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void ShowConfigDialog(this Dsp dsp, nint hwnd, Bool32 show) =>
|
|
TryShowConfigDialog(dsp, hwnd, show).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves information about this DSP unit.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getinfo">DSP::getInfo</see>
|
|
/// </para>
|
|
/// </summary>
|
|
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);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves information about this DSP unit.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getinfo">DSP::getInfo</see>
|
|
/// </para>
|
|
/// </summary>
|
|
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();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the pre-defined type of a FMOD registered DSP unit.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_gettype">DSP::getType</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetType(this Dsp dsp, out DspType type)
|
|
{
|
|
fixed (DspType* typePtr = &type)
|
|
return PInvoke.DspGetType(dsp, typePtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the pre-defined type of a FMOD registered DSP unit.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_gettype">DSP::getType</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static DspType GetType(this Dsp dsp)
|
|
{
|
|
TryGetType(dsp, out var type).Check();
|
|
return type;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the idle state.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getidle">DSP::getIdle</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetIdle(this Dsp dsp, out Bool32 idle)
|
|
{
|
|
fixed (Bool32* idlePtr = &idle)
|
|
return PInvoke.DspGetIdle(dsp, idlePtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the idle state.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getidle">DSP::getIdle</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Bool32 GetIdle(this Dsp dsp)
|
|
{
|
|
TryGetIdle(dsp, out var idle).Check();
|
|
return idle;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets a user value associated with this object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_setuserdata">DSP::setUserData</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetUserData(this Dsp dsp, nint userData) => PInvoke.DspSetUserData(dsp, userData);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets a user value associated with this object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_setuserdata">DSP::setUserData</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetUserData(this Dsp dsp, nint userData) => TrySetUserData(dsp, userData).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves a user value associated with this object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getuserdata">DSP::getUserData</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetUserData(this Dsp dsp, out nint userData)
|
|
{
|
|
fixed (nint* userDataPtr = &userData)
|
|
return PInvoke.DspGetUserData(dsp, userDataPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves a user value associated with this object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getuserdata">DSP::getUserData</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static nint GetUserData(this Dsp dsp)
|
|
{
|
|
TryGetUserData(dsp, out var userData).Check();
|
|
return userData;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the input and output signal metering enabled states.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_setmeteringenabled">DSP::setMeteringEnabled</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetMeteringEnabled(this Dsp dsp, Bool32 inputEnabled, Bool32 outputEnabled) =>
|
|
PInvoke.DspSetMeteringEnabled(dsp, inputEnabled, outputEnabled);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the input and output signal metering enabled states.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_setmeteringenabled">DSP::setMeteringEnabled</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetMeteringEnabled(this Dsp dsp, Bool32 inputEnabled, Bool32 outputEnabled) =>
|
|
TrySetMeteringEnabled(dsp, inputEnabled, outputEnabled).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the input and output signal metering enabled states.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getmeteringenabled">DSP::getMeteringEnabled</see>
|
|
/// </para>
|
|
/// </summary>
|
|
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);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the input and output signal metering enabled states.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getmeteringenabled">DSP::getMeteringEnabled</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void GetMeteringEnabled(this Dsp dsp, out Bool32 inputEnabled, out Bool32 outputEnabled) =>
|
|
TryGetMeteringEnabled(dsp, out inputEnabled, out outputEnabled).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieve the signal metering enabled metering information.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getmeteringinfo">DSP::getMeteringInfo</see>
|
|
/// </para>
|
|
/// </summary>
|
|
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);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieve the signal metering enabled metering information.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getmeteringinfo">DSP::getMeteringInfo</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void GetMeteringInfo(
|
|
this Dsp dsp,
|
|
out DspMeteringInfo inputInfo,
|
|
out DspMeteringInfo outputInfo
|
|
) => TryGetMeteringInfo(dsp, out inputInfo, out outputInfo).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves statistics on the mixer thread CPU usage for this unit.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getcpuusage">DSP::getCPUUsage</see>
|
|
/// </para>
|
|
/// </summary>
|
|
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);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves statistics on the mixer thread CPU usage for this unit.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-dsp.html#dsp_getcpuusage">DSP::getCPUUsage</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void GetCpuUsage(this Dsp dsp, out uint exclusive, out uint inclusive) =>
|
|
TryGetCpuUsage(dsp, out exclusive, out inclusive).Check();
|
|
}
|
|
}
|