brutal/brutal.fmod/Brutal.Fmod/FmodStudioApi/Generated/Libraries/FmodStudio.FmodStudioSystem.gen.cs
2026-10-15 14:12:02 +13:00

1813 lines
75 KiB
C#

// <auto-generated/>
// Generated by Brutal.Fmod.Generate; do not edit by hand.
#nullable enable
namespace Brutal.FmodApi.Studio
{
public static partial class FmodStudio
{
/// <summary>
/// <para>
/// Checks that the System reference is valid and has been initialized.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_isvalid">Studio::System::isValid</see>
/// </para>
/// </summary>
public static Bool32 IsValid(this FmodStudioSystem system) => PInvoke.SystemIsValid(system);
/// <summary>
/// <para>
/// Sets advanced settings.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_setadvancedsettings">Studio::System::setAdvancedSettings</see>
/// </para>
/// </summary>
public static unsafe Result TrySetAdvancedSettings(
this FmodStudioSystem system,
in StudioAdvancedSettings settings
)
{
fixed (StudioAdvancedSettings* settingsPtr = &settings)
return PInvoke.SystemSetAdvancedSettings(system, settingsPtr);
}
/// <summary>
/// <para>
/// Sets advanced settings.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_setadvancedsettings">Studio::System::setAdvancedSettings</see>
/// </para>
/// </summary>
public static void SetAdvancedSettings(this FmodStudioSystem system, in StudioAdvancedSettings settings) =>
TrySetAdvancedSettings(system, settings).Check();
/// <summary>
/// <para>
/// Retrieves advanced settings.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getadvancedsettings">Studio::System::getAdvancedSettings</see>
/// </para>
/// </summary>
public static unsafe Result TryGetAdvancedSettings(
this FmodStudioSystem system,
out StudioAdvancedSettings settings
)
{
fixed (StudioAdvancedSettings* settingsPtr = &settings)
return PInvoke.SystemGetAdvancedSettings(system, settingsPtr);
}
/// <summary>
/// <para>
/// Retrieves advanced settings.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getadvancedsettings">Studio::System::getAdvancedSettings</see>
/// </para>
/// </summary>
public static StudioAdvancedSettings GetAdvancedSettings(this FmodStudioSystem system)
{
TryGetAdvancedSettings(system, out var settings).Check();
return settings;
}
/// <summary>
/// <para>
/// Initializes the Studio System.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_initialize">Studio::System::initialize</see>
/// </para>
/// </summary>
public static Result TryInitialize(
this FmodStudioSystem system,
int maxChannels,
StudioInitFlags studioFlags,
InitFlags flags,
nint extraDriverData
) => PInvoke.SystemInitialize(system, maxChannels, studioFlags, flags, extraDriverData);
/// <summary>
/// <para>
/// Initializes the Studio System.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_initialize">Studio::System::initialize</see>
/// </para>
/// </summary>
public static void Initialize(
this FmodStudioSystem system,
int maxChannels,
StudioInitFlags studioFlags,
InitFlags flags,
nint extraDriverData
) => TryInitialize(system, maxChannels, studioFlags, flags, extraDriverData).Check();
/// <summary>
/// <para>
/// Shut down and free the Studio System object.
/// </para>
/// <para>
/// This function will free the memory used by the Studio System object and everything created under it.
/// </para>
/// <para>
/// Studio::System::create and Studio::System::release are not thread-safe. Calling either of these
/// functions concurrently with any Studio API function (including these two functions) may cause undefined
/// behavior. External synchronization must be used if calls to Studio::System::create or
/// Studio::System::release could overlap other Studio API calls. All other Studio API functions are thread
/// safe and may be called freely from any thread unless otherwise documented.
/// </para>
/// <para>
/// All handles or pointers to objects associated with a Studio System object become invalid when the Studio
/// System object is released. The Studio API attempts to protect against stale handles and pointers being
/// used with a different Studio System object but this protection cannot be guaranteed and attempting to
/// use stale handles or pointers may cause undefined behavior.
/// </para>
/// <para>
/// <b>See Also:</b> Creating the Studio System
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_release">Studio::System::release</see>
/// </para>
/// </summary>
public static Result TryRelease(this FmodStudioSystem system) => PInvoke.SystemRelease(system);
/// <summary>
/// <para>
/// Shut down and free the Studio System object.
/// </para>
/// <para>
/// This function will free the memory used by the Studio System object and everything created under it.
/// </para>
/// <para>
/// Studio::System::create and Studio::System::release are not thread-safe. Calling either of these
/// functions concurrently with any Studio API function (including these two functions) may cause undefined
/// behavior. External synchronization must be used if calls to Studio::System::create or
/// Studio::System::release could overlap other Studio API calls. All other Studio API functions are thread
/// safe and may be called freely from any thread unless otherwise documented.
/// </para>
/// <para>
/// All handles or pointers to objects associated with a Studio System object become invalid when the Studio
/// System object is released. The Studio API attempts to protect against stale handles and pointers being
/// used with a different Studio System object but this protection cannot be guaranteed and attempting to
/// use stale handles or pointers may cause undefined behavior.
/// </para>
/// <para>
/// <b>See Also:</b> Creating the Studio System
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_release">Studio::System::release</see>
/// </para>
/// </summary>
public static void Release(this FmodStudioSystem system) => TryRelease(system).Check();
/// <summary>
/// <para>
/// Update the studio system.
/// </para>
/// <para>
/// When Studio is initialized in the default asynchronous processing mode this function submits all
/// buffered commands for execution on the Studio Update thread for asynchronous processing. This is a fast
/// operation since the commands are not processed on the calling thread. If Studio is initialized with
/// FMOD_STUDIO_INIT_DEFERRED_CALLBACKS then any deferred callbacks fired during any asynchronous updates
/// since the last call to this function will be called. If an error occurred during any asynchronous
/// updates since the last call to this function then this function will return the error result.
/// </para>
/// <para>
/// When Studio is initialized with FMOD_STUDIO_INIT_SYNCHRONOUS_UPDATE queued commands will be processed
/// immediately when calling this function, the scheduling and update logic for the Studio system are
/// executed and all callbacks are fired. This may block the calling thread for a substantial amount of
/// time.
/// </para>
/// <para>
/// <b>See Also:</b> Studio System Processing
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_update">Studio::System::update</see>
/// </para>
/// </summary>
public static Result TryUpdate(this FmodStudioSystem system) => PInvoke.SystemUpdate(system);
/// <summary>
/// <para>
/// Update the studio system.
/// </para>
/// <para>
/// When Studio is initialized in the default asynchronous processing mode this function submits all
/// buffered commands for execution on the Studio Update thread for asynchronous processing. This is a fast
/// operation since the commands are not processed on the calling thread. If Studio is initialized with
/// FMOD_STUDIO_INIT_DEFERRED_CALLBACKS then any deferred callbacks fired during any asynchronous updates
/// since the last call to this function will be called. If an error occurred during any asynchronous
/// updates since the last call to this function then this function will return the error result.
/// </para>
/// <para>
/// When Studio is initialized with FMOD_STUDIO_INIT_SYNCHRONOUS_UPDATE queued commands will be processed
/// immediately when calling this function, the scheduling and update logic for the Studio system are
/// executed and all callbacks are fired. This may block the calling thread for a substantial amount of
/// time.
/// </para>
/// <para>
/// <b>See Also:</b> Studio System Processing
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_update">Studio::System::update</see>
/// </para>
/// </summary>
public static void Update(this FmodStudioSystem system) => TryUpdate(system).Check();
/// <summary>
/// <para>
/// Retrieves the Core System.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getcoresystem">Studio::System::getCoreSystem</see>
/// </para>
/// </summary>
public static unsafe Result TryGetCoreSystem(this FmodStudioSystem system, out FmodSystem coreSystem)
{
fixed (FmodSystem* coreSystemPtr = &coreSystem)
return PInvoke.SystemGetCoreSystem(system, coreSystemPtr);
}
/// <summary>
/// <para>
/// Retrieves the Core System.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getcoresystem">Studio::System::getCoreSystem</see>
/// </para>
/// </summary>
public static FmodSystem GetCoreSystem(this FmodStudioSystem system)
{
TryGetCoreSystem(system, out var coreSystem).Check();
return coreSystem;
}
/// <summary>
/// <para>
/// Retrieves an EventDescription of an event or snapshot with the specified file path.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getevent">Studio::System::getEvent</see>
/// </para>
/// </summary>
public static unsafe Result TryGetEvent(
this FmodStudioSystem system,
RefString8 pathOrId,
out EventDescription eventDescription
)
{
fixed (byte* pathOrIdPtr = pathOrId)
fixed (EventDescription* eventDescriptionPtr = &eventDescription)
return PInvoke.SystemGetEvent(system, pathOrIdPtr, eventDescriptionPtr);
}
/// <summary>
/// <para>
/// Retrieves an EventDescription of an event or snapshot with the specified file path.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getevent">Studio::System::getEvent</see>
/// </para>
/// </summary>
public static EventDescription GetEvent(this FmodStudioSystem system, RefString8 pathOrId)
{
TryGetEvent(system, pathOrId, out var eventDescription).Check();
return eventDescription;
}
/// <summary>
/// <para>
/// Retrieves a loaded bus.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getbus">Studio::System::getBus</see>
/// </para>
/// </summary>
public static unsafe Result TryGetBus(this FmodStudioSystem system, RefString8 pathOrId, out Bus bus)
{
fixed (byte* pathOrIdPtr = pathOrId)
fixed (Bus* busPtr = &bus)
return PInvoke.SystemGetBus(system, pathOrIdPtr, busPtr);
}
/// <summary>
/// <para>
/// Retrieves a loaded bus.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getbus">Studio::System::getBus</see>
/// </para>
/// </summary>
public static Bus GetBus(this FmodStudioSystem system, RefString8 pathOrId)
{
TryGetBus(system, pathOrId, out var bus).Check();
return bus;
}
/// <summary>
/// <para>
/// Retrieves a loaded VCA.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getvca">Studio::System::getVCA</see>
/// </para>
/// </summary>
public static unsafe Result TryGetVca(this FmodStudioSystem system, RefString8 pathOrId, out Vca vca)
{
fixed (byte* pathOrIdPtr = pathOrId)
fixed (Vca* vcaPtr = &vca)
return PInvoke.SystemGetVca(system, pathOrIdPtr, vcaPtr);
}
/// <summary>
/// <para>
/// Retrieves a loaded VCA.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getvca">Studio::System::getVCA</see>
/// </para>
/// </summary>
public static Vca GetVca(this FmodStudioSystem system, RefString8 pathOrId)
{
TryGetVca(system, pathOrId, out var vca).Check();
return vca;
}
/// <summary>
/// <para>
/// Retrieves a loaded bank with the specified file path.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getbank">Studio::System::getBank</see>
/// </para>
/// </summary>
public static unsafe Result TryGetBank(this FmodStudioSystem system, RefString8 pathOrId, out Bank bank)
{
fixed (byte* pathOrIdPtr = pathOrId)
fixed (Bank* bankPtr = &bank)
return PInvoke.SystemGetBank(system, pathOrIdPtr, bankPtr);
}
/// <summary>
/// <para>
/// Retrieves a loaded bank with the specified file path.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getbank">Studio::System::getBank</see>
/// </para>
/// </summary>
public static Bank GetBank(this FmodStudioSystem system, RefString8 pathOrId)
{
TryGetBank(system, pathOrId, out var bank).Check();
return bank;
}
/// <summary>
/// <para>
/// Retrieves an EventDescription.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_geteventbyid">Studio::System::getEventByID</see>
/// </para>
/// </summary>
public static unsafe Result TryGetEventById(
this FmodStudioSystem system,
in Guid id,
out EventDescription eventDescription
)
{
fixed (Guid* idPtr = &id)
fixed (EventDescription* eventDescriptionPtr = &eventDescription)
return PInvoke.SystemGetEventById(system, idPtr, eventDescriptionPtr);
}
/// <summary>
/// <para>
/// Retrieves an EventDescription.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_geteventbyid">Studio::System::getEventByID</see>
/// </para>
/// </summary>
public static EventDescription GetEventById(this FmodStudioSystem system, in Guid id)
{
TryGetEventById(system, id, out var eventDescription).Check();
return eventDescription;
}
/// <summary>
/// <para>
/// Retrieves a loaded bus.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getbusbyid">Studio::System::getBusByID</see>
/// </para>
/// </summary>
public static unsafe Result TryGetBusById(this FmodStudioSystem system, in Guid id, out Bus bus)
{
fixed (Guid* idPtr = &id)
fixed (Bus* busPtr = &bus)
return PInvoke.SystemGetBusById(system, idPtr, busPtr);
}
/// <summary>
/// <para>
/// Retrieves a loaded bus.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getbusbyid">Studio::System::getBusByID</see>
/// </para>
/// </summary>
public static Bus GetBusById(this FmodStudioSystem system, in Guid id)
{
TryGetBusById(system, id, out var bus).Check();
return bus;
}
/// <summary>
/// <para>
/// Retrieves a loaded VCA.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getvcabyid">Studio::System::getVCAByID</see>
/// </para>
/// </summary>
public static unsafe Result TryGetVcaById(this FmodStudioSystem system, in Guid id, out Vca vca)
{
fixed (Guid* idPtr = &id)
fixed (Vca* vcaPtr = &vca)
return PInvoke.SystemGetVcaById(system, idPtr, vcaPtr);
}
/// <summary>
/// <para>
/// Retrieves a loaded VCA.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getvcabyid">Studio::System::getVCAByID</see>
/// </para>
/// </summary>
public static Vca GetVcaById(this FmodStudioSystem system, in Guid id)
{
TryGetVcaById(system, id, out var vca).Check();
return vca;
}
/// <summary>
/// <para>
/// Retrieves a loaded bank with the specified ID.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getbankbyid">Studio::System::getBankByID</see>
/// </para>
/// </summary>
public static unsafe Result TryGetBankById(this FmodStudioSystem system, in Guid id, out Bank bank)
{
fixed (Guid* idPtr = &id)
fixed (Bank* bankPtr = &bank)
return PInvoke.SystemGetBankById(system, idPtr, bankPtr);
}
/// <summary>
/// <para>
/// Retrieves a loaded bank with the specified ID.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getbankbyid">Studio::System::getBankByID</see>
/// </para>
/// </summary>
public static Bank GetBankById(this FmodStudioSystem system, in Guid id)
{
TryGetBankById(system, id, out var bank).Check();
return bank;
}
/// <summary>
/// <para>
/// Retrieves information for loading a sound from the audio table.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getsoundinfo">Studio::System::getSoundInfo</see>
/// </para>
/// </summary>
public static unsafe Result TryGetSoundInfo(this FmodStudioSystem system, RefString8 key, out SoundInfo info)
{
fixed (byte* keyPtr = key)
fixed (SoundInfo* infoPtr = &info)
return PInvoke.SystemGetSoundInfo(system, keyPtr, infoPtr);
}
/// <summary>
/// <para>
/// Retrieves information for loading a sound from the audio table.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getsoundinfo">Studio::System::getSoundInfo</see>
/// </para>
/// </summary>
public static SoundInfo GetSoundInfo(this FmodStudioSystem system, RefString8 key)
{
TryGetSoundInfo(system, key, out var info).Check();
return info;
}
/// <summary>
/// <para>
/// Retrieves a global parameter by name, including the path if needed.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getparameterdescriptionbyname">Studio::System::getParameterDescriptionByName</see>
/// </para>
/// </summary>
public static unsafe Result TryGetParameterDescriptionByName(
this FmodStudioSystem system,
RefString8 name,
out ParameterDescription parameter
)
{
fixed (byte* namePtr = name)
fixed (ParameterDescription* parameterPtr = &parameter)
return PInvoke.SystemGetParameterDescriptionByName(system, namePtr, parameterPtr);
}
/// <summary>
/// <para>
/// Retrieves a global parameter by name, including the path if needed.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getparameterdescriptionbyname">Studio::System::getParameterDescriptionByName</see>
/// </para>
/// </summary>
public static ParameterDescription GetParameterDescriptionByName(this FmodStudioSystem system, RefString8 name)
{
TryGetParameterDescriptionByName(system, name, out var parameter).Check();
return parameter;
}
/// <summary>
/// <para>
/// Retrieves a global parameter by ID.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getparameterdescriptionbyid">Studio::System::getParameterDescriptionByID</see>
/// </para>
/// </summary>
public static unsafe Result TryGetParameterDescriptionById(
this FmodStudioSystem system,
ParameterId id,
out ParameterDescription parameter
)
{
fixed (ParameterDescription* parameterPtr = &parameter)
return PInvoke.SystemGetParameterDescriptionById(system, id, parameterPtr);
}
/// <summary>
/// <para>
/// Retrieves a global parameter by ID.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getparameterdescriptionbyid">Studio::System::getParameterDescriptionByID</see>
/// </para>
/// </summary>
public static ParameterDescription GetParameterDescriptionById(this FmodStudioSystem system, ParameterId id)
{
TryGetParameterDescriptionById(system, id, out var parameter).Check();
return parameter;
}
/// <summary>
/// <para>
/// Retrieves a global parameter label by name, including the path if needed.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getparameterlabelbyname">Studio::System::getParameterLabelByName</see>
/// </para>
/// </summary>
public static unsafe Result TryGetParameterLabelByName(
this FmodStudioSystem system,
RefString8 name,
int labelIndex,
byte* label,
int size,
out int retrieved
)
{
fixed (byte* namePtr = name)
fixed (int* retrievedPtr = &retrieved)
return PInvoke.SystemGetParameterLabelByName(system, namePtr, labelIndex, label, size, retrievedPtr);
}
/// <summary>
/// <para>
/// Retrieves a global parameter label by name, including the path if needed.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getparameterlabelbyname">Studio::System::getParameterLabelByName</see>
/// </para>
/// </summary>
public static unsafe int GetParameterLabelByName(
this FmodStudioSystem system,
RefString8 name,
int labelIndex,
byte* label,
int size
)
{
TryGetParameterLabelByName(system, name, labelIndex, label, size, out var retrieved).Check();
return retrieved;
}
/// <summary>
/// <para>
/// Retrieves a global parameter label by ID.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getparameterlabelbyid">Studio::System::getParameterLabelByID</see>
/// </para>
/// </summary>
public static unsafe Result TryGetParameterLabelById(
this FmodStudioSystem system,
ParameterId id,
int labelIndex,
byte* label,
int size,
out int retrieved
)
{
fixed (int* retrievedPtr = &retrieved)
return PInvoke.SystemGetParameterLabelById(system, id, labelIndex, label, size, retrievedPtr);
}
/// <summary>
/// <para>
/// Retrieves a global parameter label by ID.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getparameterlabelbyid">Studio::System::getParameterLabelByID</see>
/// </para>
/// </summary>
public static unsafe int GetParameterLabelById(
this FmodStudioSystem system,
ParameterId id,
int labelIndex,
byte* label,
int size
)
{
TryGetParameterLabelById(system, id, labelIndex, label, size, out var retrieved).Check();
return retrieved;
}
/// <summary>
/// <para>
/// Retrieves a global parameter value by unique identifier.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getparameterbyid">Studio::System::getParameterByID</see>
/// </para>
/// </summary>
public static unsafe Result TryGetParameterById(
this FmodStudioSystem system,
ParameterId id,
out float value,
out float finalValue
)
{
fixed (float* valuePtr = &value)
fixed (float* finalValuePtr = &finalValue)
return PInvoke.SystemGetParameterById(system, id, valuePtr, finalValuePtr);
}
/// <summary>
/// <para>
/// Retrieves a global parameter value by unique identifier.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getparameterbyid">Studio::System::getParameterByID</see>
/// </para>
/// </summary>
public static void GetParameterById(
this FmodStudioSystem system,
ParameterId id,
out float value,
out float finalValue
) => TryGetParameterById(system, id, out value, out finalValue).Check();
/// <summary>
/// <para>
/// Sets a global parameter value by unique identifier.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_setparameterbyid">Studio::System::setParameterByID</see>
/// </para>
/// </summary>
public static Result TrySetParameterById(
this FmodStudioSystem system,
ParameterId id,
float value,
Bool32 ignoreSeekSpeed
) => PInvoke.SystemSetParameterById(system, id, value, ignoreSeekSpeed);
/// <summary>
/// <para>
/// Sets a global parameter value by unique identifier.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_setparameterbyid">Studio::System::setParameterByID</see>
/// </para>
/// </summary>
public static void SetParameterById(
this FmodStudioSystem system,
ParameterId id,
float value,
Bool32 ignoreSeekSpeed
) => TrySetParameterById(system, id, value, ignoreSeekSpeed).Check();
/// <summary>
/// <para>
/// Sets a global parameter value by unique identifier, looking up the value label.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_setparameterbyidwithlabel">Studio::System::setParameterByIDWithLabel</see>
/// </para>
/// </summary>
public static unsafe Result TrySetParameterByIdWithLabel(
this FmodStudioSystem system,
ParameterId id,
RefString8 label,
Bool32 ignoreSeekSpeed
)
{
fixed (byte* labelPtr = label)
return PInvoke.SystemSetParameterByIdWithLabel(system, id, labelPtr, ignoreSeekSpeed);
}
/// <summary>
/// <para>
/// Sets a global parameter value by unique identifier, looking up the value label.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_setparameterbyidwithlabel">Studio::System::setParameterByIDWithLabel</see>
/// </para>
/// </summary>
public static void SetParameterByIdWithLabel(
this FmodStudioSystem system,
ParameterId id,
RefString8 label,
Bool32 ignoreSeekSpeed
) => TrySetParameterByIdWithLabel(system, id, label, ignoreSeekSpeed).Check();
/// <summary>
/// <para>
/// Sets multiple global parameter values by unique identifier.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_setparametersbyids">Studio::System::setParametersByIDs</see>
/// </para>
/// </summary>
public static unsafe Result TrySetParametersByIDs(
this FmodStudioSystem system,
ParameterId* ids,
float* values,
int count,
Bool32 ignoreSeekSpeed
) => PInvoke.SystemSetParametersByIDs(system, ids, values, count, ignoreSeekSpeed);
/// <summary>
/// <para>
/// Sets multiple global parameter values by unique identifier.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_setparametersbyids">Studio::System::setParametersByIDs</see>
/// </para>
/// </summary>
public static unsafe void SetParametersByIDs(
this FmodStudioSystem system,
ParameterId* ids,
float* values,
int count,
Bool32 ignoreSeekSpeed
) => TrySetParametersByIDs(system, ids, values, count, ignoreSeekSpeed).Check();
/// <summary>
/// <para>
/// Retrieves a global parameter value by name, including the path if needed.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getparameterbyname">Studio::System::getParameterByName</see>
/// </para>
/// </summary>
public static unsafe Result TryGetParameterByName(
this FmodStudioSystem system,
RefString8 name,
out float value,
out float finalValue
)
{
fixed (byte* namePtr = name)
fixed (float* valuePtr = &value)
fixed (float* finalValuePtr = &finalValue)
return PInvoke.SystemGetParameterByName(system, namePtr, valuePtr, finalValuePtr);
}
/// <summary>
/// <para>
/// Retrieves a global parameter value by name, including the path if needed.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getparameterbyname">Studio::System::getParameterByName</see>
/// </para>
/// </summary>
public static void GetParameterByName(
this FmodStudioSystem system,
RefString8 name,
out float value,
out float finalValue
) => TryGetParameterByName(system, name, out value, out finalValue).Check();
/// <summary>
/// <para>
/// Sets a global parameter value by name, including the path if needed.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_setparameterbyname">Studio::System::setParameterByName</see>
/// </para>
/// </summary>
public static unsafe Result TrySetParameterByName(
this FmodStudioSystem system,
RefString8 name,
float value,
Bool32 ignoreSeekSpeed
)
{
fixed (byte* namePtr = name)
return PInvoke.SystemSetParameterByName(system, namePtr, value, ignoreSeekSpeed);
}
/// <summary>
/// <para>
/// Sets a global parameter value by name, including the path if needed.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_setparameterbyname">Studio::System::setParameterByName</see>
/// </para>
/// </summary>
public static void SetParameterByName(
this FmodStudioSystem system,
RefString8 name,
float value,
Bool32 ignoreSeekSpeed
) => TrySetParameterByName(system, name, value, ignoreSeekSpeed).Check();
/// <summary>
/// <para>
/// Sets a global parameter value by name, including the path if needed, looking up the value label.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_setparameterbynamewithlabel">Studio::System::setParameterByNameWithLabel</see>
/// </para>
/// </summary>
public static unsafe Result TrySetParameterByNameWithLabel(
this FmodStudioSystem system,
RefString8 name,
RefString8 label,
Bool32 ignoreSeekSpeed
)
{
fixed (byte* namePtr = name)
fixed (byte* labelPtr = label)
return PInvoke.SystemSetParameterByNameWithLabel(system, namePtr, labelPtr, ignoreSeekSpeed);
}
/// <summary>
/// <para>
/// Sets a global parameter value by name, including the path if needed, looking up the value label.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_setparameterbynamewithlabel">Studio::System::setParameterByNameWithLabel</see>
/// </para>
/// </summary>
public static void SetParameterByNameWithLabel(
this FmodStudioSystem system,
RefString8 name,
RefString8 label,
Bool32 ignoreSeekSpeed
) => TrySetParameterByNameWithLabel(system, name, label, ignoreSeekSpeed).Check();
/// <summary>
/// <para>
/// Retrieves the ID for a bank, event, snapshot, bus or VCA.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_lookupid">Studio::System::lookupID</see>
/// </para>
/// </summary>
public static unsafe Result TryLookupId(this FmodStudioSystem system, RefString8 path, out Guid id)
{
fixed (byte* pathPtr = path)
fixed (Guid* idPtr = &id)
return PInvoke.SystemLookupId(system, pathPtr, idPtr);
}
/// <summary>
/// <para>
/// Retrieves the ID for a bank, event, snapshot, bus or VCA.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_lookupid">Studio::System::lookupID</see>
/// </para>
/// </summary>
public static Guid LookupId(this FmodStudioSystem system, RefString8 path)
{
TryLookupId(system, path, out var id).Check();
return id;
}
/// <summary>
/// <para>
/// Retrieves the path for a bank, event, snapshot, bus or VCA.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_lookuppath">Studio::System::lookupPath</see>
/// </para>
/// </summary>
public static unsafe Result TryLookupPath(
this FmodStudioSystem system,
in Guid id,
byte* path,
int size,
out int retrieved
)
{
fixed (Guid* idPtr = &id)
fixed (int* retrievedPtr = &retrieved)
return PInvoke.SystemLookupPath(system, idPtr, path, size, retrievedPtr);
}
/// <summary>
/// <para>
/// Retrieves the path for a bank, event, snapshot, bus or VCA.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_lookuppath">Studio::System::lookupPath</see>
/// </para>
/// </summary>
public static unsafe int LookupPath(this FmodStudioSystem system, in Guid id, byte* path, int size)
{
TryLookupPath(system, id, path, size, out var retrieved).Check();
return retrieved;
}
/// <summary>
/// <para>
/// Retrieves the number of listeners.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getnumlisteners">Studio::System::getNumListeners</see>
/// </para>
/// </summary>
public static unsafe Result TryGetNumListeners(this FmodStudioSystem system, out int numListeners)
{
fixed (int* numListenersPtr = &numListeners)
return PInvoke.SystemGetNumListeners(system, numListenersPtr);
}
/// <summary>
/// <para>
/// Retrieves the number of listeners.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getnumlisteners">Studio::System::getNumListeners</see>
/// </para>
/// </summary>
public static int GetNumListeners(this FmodStudioSystem system)
{
TryGetNumListeners(system, out var numListeners).Check();
return numListeners;
}
/// <summary>
/// <para>
/// Sets the number of listeners in the 3D sound scene.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_setnumlisteners">Studio::System::setNumListeners</see>
/// </para>
/// </summary>
public static Result TrySetNumListeners(this FmodStudioSystem system, int numListeners) =>
PInvoke.SystemSetNumListeners(system, numListeners);
/// <summary>
/// <para>
/// Sets the number of listeners in the 3D sound scene.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_setnumlisteners">Studio::System::setNumListeners</see>
/// </para>
/// </summary>
public static void SetNumListeners(this FmodStudioSystem system, int numListeners) =>
TrySetNumListeners(system, numListeners).Check();
/// <summary>
/// <para>
/// Retrieves listener 3D attributes.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getlistenerattributes">Studio::System::getListenerAttributes</see>
/// </para>
/// </summary>
public static unsafe Result TryGetListenerAttributes(
this FmodStudioSystem system,
int index,
out Attributes3d attributes,
out float3 attenuationPosition
)
{
fixed (Attributes3d* attributesPtr = &attributes)
fixed (float3* attenuationPositionPtr = &attenuationPosition)
return PInvoke.SystemGetListenerAttributes(system, index, attributesPtr, attenuationPositionPtr);
}
/// <summary>
/// <para>
/// Retrieves listener 3D attributes.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getlistenerattributes">Studio::System::getListenerAttributes</see>
/// </para>
/// </summary>
public static void GetListenerAttributes(
this FmodStudioSystem system,
int index,
out Attributes3d attributes,
out float3 attenuationPosition
) => TryGetListenerAttributes(system, index, out attributes, out attenuationPosition).Check();
/// <summary>
/// <para>
/// Sets the 3D attributes of the listener.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_setlistenerattributes">Studio::System::setListenerAttributes</see>
/// </para>
/// </summary>
public static unsafe Result TrySetListenerAttributes(
this FmodStudioSystem system,
int index,
in Attributes3d attributes,
in float3 attenuationPosition
)
{
fixed (Attributes3d* attributesPtr = &attributes)
fixed (float3* attenuationPositionPtr = &attenuationPosition)
return PInvoke.SystemSetListenerAttributes(system, index, attributesPtr, attenuationPositionPtr);
}
/// <summary>
/// <para>
/// Sets the 3D attributes of the listener.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_setlistenerattributes">Studio::System::setListenerAttributes</see>
/// </para>
/// </summary>
public static void SetListenerAttributes(
this FmodStudioSystem system,
int index,
in Attributes3d attributes,
in float3 attenuationPosition
) => TrySetListenerAttributes(system, index, attributes, attenuationPosition).Check();
/// <summary>
/// <para>
/// Retrieves listener weighting.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getlistenerweight">Studio::System::getListenerWeight</see>
/// </para>
/// </summary>
public static unsafe Result TryGetListenerWeight(this FmodStudioSystem system, int index, out float weight)
{
fixed (float* weightPtr = &weight)
return PInvoke.SystemGetListenerWeight(system, index, weightPtr);
}
/// <summary>
/// <para>
/// Retrieves listener weighting.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getlistenerweight">Studio::System::getListenerWeight</see>
/// </para>
/// </summary>
public static float GetListenerWeight(this FmodStudioSystem system, int index)
{
TryGetListenerWeight(system, index, out var weight).Check();
return weight;
}
/// <summary>
/// <para>
/// Sets the listener weighting.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_setlistenerweight">Studio::System::setListenerWeight</see>
/// </para>
/// </summary>
public static Result TrySetListenerWeight(this FmodStudioSystem system, int index, float weight) =>
PInvoke.SystemSetListenerWeight(system, index, weight);
/// <summary>
/// <para>
/// Sets the listener weighting.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_setlistenerweight">Studio::System::setListenerWeight</see>
/// </para>
/// </summary>
public static void SetListenerWeight(this FmodStudioSystem system, int index, float weight) =>
TrySetListenerWeight(system, index, weight).Check();
/// <summary>
/// <para>
/// Loads the metadata of a bank. This does not load the bank's sample data.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_loadbankfile">Studio::System::loadBankFile</see>
/// </para>
/// </summary>
public static unsafe Result TryLoadBankFile(
this FmodStudioSystem system,
RefString8 fileName,
LoadBankFlags flags,
out Bank bank
)
{
fixed (byte* fileNamePtr = fileName)
fixed (Bank* bankPtr = &bank)
return PInvoke.SystemLoadBankFile(system, fileNamePtr, flags, bankPtr);
}
/// <summary>
/// <para>
/// Loads the metadata of a bank. This does not load the bank's sample data.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_loadbankfile">Studio::System::loadBankFile</see>
/// </para>
/// </summary>
public static Bank LoadBankFile(this FmodStudioSystem system, RefString8 fileName, LoadBankFlags flags)
{
TryLoadBankFile(system, fileName, flags, out var bank).Check();
return bank;
}
/// <summary>
/// <para>
/// Loads the metadata of a bank from memory. Does not load the bank's sample data.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_loadbankmemory">Studio::System::loadBankMemory</see>
/// </para>
/// </summary>
public static unsafe Result TryLoadBankMemory(
this FmodStudioSystem system,
RefString8 buffer,
int length,
LoadMemoryMode mode,
LoadBankFlags flags,
out Bank bank
)
{
fixed (byte* bufferPtr = buffer)
fixed (Bank* bankPtr = &bank)
return PInvoke.SystemLoadBankMemory(system, bufferPtr, length, mode, flags, bankPtr);
}
/// <summary>
/// <para>
/// Loads the metadata of a bank from memory. Does not load the bank's sample data.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_loadbankmemory">Studio::System::loadBankMemory</see>
/// </para>
/// </summary>
public static Bank LoadBankMemory(
this FmodStudioSystem system,
RefString8 buffer,
int length,
LoadMemoryMode mode,
LoadBankFlags flags
)
{
TryLoadBankMemory(system, buffer, length, mode, flags, out var bank).Check();
return bank;
}
/// <summary>
/// <para>
/// Loads the metadata of a bank using custom read callbacks.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_loadbankcustom">Studio::System::loadBankCustom</see>
/// </para>
/// </summary>
public static unsafe Result TryLoadBankCustom(
this FmodStudioSystem system,
in BankInfo info,
LoadBankFlags flags,
out Bank bank
)
{
fixed (BankInfo* infoPtr = &info)
fixed (Bank* bankPtr = &bank)
return PInvoke.SystemLoadBankCustom(system, infoPtr, flags, bankPtr);
}
/// <summary>
/// <para>
/// Loads the metadata of a bank using custom read callbacks.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_loadbankcustom">Studio::System::loadBankCustom</see>
/// </para>
/// </summary>
public static Bank LoadBankCustom(this FmodStudioSystem system, in BankInfo info, LoadBankFlags flags)
{
TryLoadBankCustom(system, info, flags, out var bank).Check();
return bank;
}
/// <summary>
/// <para>
/// Registers a DSP plug-in.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_registerplugin">Studio::System::registerPlugin</see>
/// </para>
/// </summary>
public static unsafe Result TryRegisterPlugin(this FmodStudioSystem system, in DspDescription description)
{
fixed (DspDescription* descriptionPtr = &description)
return PInvoke.SystemRegisterPlugin(system, descriptionPtr);
}
/// <summary>
/// <para>
/// Registers a DSP plug-in.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_registerplugin">Studio::System::registerPlugin</see>
/// </para>
/// </summary>
public static void RegisterPlugin(this FmodStudioSystem system, in DspDescription description) =>
TryRegisterPlugin(system, description).Check();
/// <summary>
/// <para>
/// Unregisters a DSP plug-in.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_unregisterplugin">Studio::System::unregisterPlugin</see>
/// </para>
/// </summary>
public static unsafe Result TryUnregisterPlugin(this FmodStudioSystem system, RefString8 name)
{
fixed (byte* namePtr = name)
return PInvoke.SystemUnregisterPlugin(system, namePtr);
}
/// <summary>
/// <para>
/// Unregisters a DSP plug-in.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_unregisterplugin">Studio::System::unregisterPlugin</see>
/// </para>
/// </summary>
public static void UnregisterPlugin(this FmodStudioSystem system, RefString8 name) =>
TryUnregisterPlugin(system, name).Check();
/// <summary>
/// <para>
/// Unloads all currently loaded banks.
/// </para>
/// <para>
/// <b>See Also:</b> Studio::System::loadBankFile, Studio::System::loadBankMemory,
/// Studio::System::loadBankCustom
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_unloadall">Studio::System::unloadAll</see>
/// </para>
/// </summary>
public static Result TryUnloadAll(this FmodStudioSystem system) => PInvoke.SystemUnloadAll(system);
/// <summary>
/// <para>
/// Unloads all currently loaded banks.
/// </para>
/// <para>
/// <b>See Also:</b> Studio::System::loadBankFile, Studio::System::loadBankMemory,
/// Studio::System::loadBankCustom
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_unloadall">Studio::System::unloadAll</see>
/// </para>
/// </summary>
public static void UnloadAll(this FmodStudioSystem system) => TryUnloadAll(system).Check();
/// <summary>
/// <para>
/// Block until all pending commands have been executed.
/// </para>
/// <para>
/// This function blocks the calling thread until all pending commands have been executed and all
/// non-blocking bank loads have been completed.
/// </para>
/// <para>
/// This is equivalent to calling Studio::System::update and then sleeping until the asynchronous thread has
/// finished executing all pending commands.
/// </para>
/// <para>
/// <b>See Also:</b> Studio::System::initialize, Studio::System::update, Studio::System::flushSampleLoading
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_flushcommands">Studio::System::flushCommands</see>
/// </para>
/// </summary>
public static Result TryFlushCommands(this FmodStudioSystem system) => PInvoke.SystemFlushCommands(system);
/// <summary>
/// <para>
/// Block until all pending commands have been executed.
/// </para>
/// <para>
/// This function blocks the calling thread until all pending commands have been executed and all
/// non-blocking bank loads have been completed.
/// </para>
/// <para>
/// This is equivalent to calling Studio::System::update and then sleeping until the asynchronous thread has
/// finished executing all pending commands.
/// </para>
/// <para>
/// <b>See Also:</b> Studio::System::initialize, Studio::System::update, Studio::System::flushSampleLoading
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_flushcommands">Studio::System::flushCommands</see>
/// </para>
/// </summary>
public static void FlushCommands(this FmodStudioSystem system) => TryFlushCommands(system).Check();
/// <summary>
/// <para>
/// Block until all sample loading and unloading has completed.
/// </para>
/// <para>
/// <b>See Also:</b> Studio::System::flushCommands, Sample Data Loading
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_flushsampleloading">Studio::System::flushSampleLoading</see>
/// </para>
/// </summary>
public static Result TryFlushSampleLoading(this FmodStudioSystem system) =>
PInvoke.SystemFlushSampleLoading(system);
/// <summary>
/// <para>
/// Block until all sample loading and unloading has completed.
/// </para>
/// <para>
/// <b>See Also:</b> Studio::System::flushCommands, Sample Data Loading
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_flushsampleloading">Studio::System::flushSampleLoading</see>
/// </para>
/// </summary>
public static void FlushSampleLoading(this FmodStudioSystem system) => TryFlushSampleLoading(system).Check();
/// <summary>
/// <para>
/// Start recording Studio API commands to a file.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_startcommandcapture">Studio::System::startCommandCapture</see>
/// </para>
/// </summary>
public static unsafe Result TryStartCommandCapture(
this FmodStudioSystem system,
RefString8 fileName,
CommandCaptureFlags flags
)
{
fixed (byte* fileNamePtr = fileName)
return PInvoke.SystemStartCommandCapture(system, fileNamePtr, flags);
}
/// <summary>
/// <para>
/// Start recording Studio API commands to a file.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_startcommandcapture">Studio::System::startCommandCapture</see>
/// </para>
/// </summary>
public static void StartCommandCapture(
this FmodStudioSystem system,
RefString8 fileName,
CommandCaptureFlags flags
) => TryStartCommandCapture(system, fileName, flags).Check();
/// <summary>
/// <para>
/// Stop recording Studio API commands.
/// </para>
/// <para>
/// <b>See Also:</b> Studio::System::startCommandCapture, Studio::System::loadCommandReplay
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_stopcommandcapture">Studio::System::stopCommandCapture</see>
/// </para>
/// </summary>
public static Result TryStopCommandCapture(this FmodStudioSystem system) =>
PInvoke.SystemStopCommandCapture(system);
/// <summary>
/// <para>
/// Stop recording Studio API commands.
/// </para>
/// <para>
/// <b>See Also:</b> Studio::System::startCommandCapture, Studio::System::loadCommandReplay
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_stopcommandcapture">Studio::System::stopCommandCapture</see>
/// </para>
/// </summary>
public static void StopCommandCapture(this FmodStudioSystem system) => TryStopCommandCapture(system).Check();
/// <summary>
/// <para>
/// Load a command replay.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_loadcommandreplay">Studio::System::loadCommandReplay</see>
/// </para>
/// </summary>
public static unsafe Result TryLoadCommandReplay(
this FmodStudioSystem system,
RefString8 fileName,
CommandReplayFlags flags,
out CommandReplay replay
)
{
fixed (byte* fileNamePtr = fileName)
fixed (CommandReplay* replayPtr = &replay)
return PInvoke.SystemLoadCommandReplay(system, fileNamePtr, flags, replayPtr);
}
/// <summary>
/// <para>
/// Load a command replay.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_loadcommandreplay">Studio::System::loadCommandReplay</see>
/// </para>
/// </summary>
public static CommandReplay LoadCommandReplay(
this FmodStudioSystem system,
RefString8 fileName,
CommandReplayFlags flags
)
{
TryLoadCommandReplay(system, fileName, flags, out var replay).Check();
return replay;
}
/// <summary>
/// <para>
/// Retrieves the number of currently-loaded banks.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getbankcount">Studio::System::getBankCount</see>
/// </para>
/// </summary>
public static unsafe Result TryGetBankCount(this FmodStudioSystem system, out int count)
{
fixed (int* countPtr = &count)
return PInvoke.SystemGetBankCount(system, countPtr);
}
/// <summary>
/// <para>
/// Retrieves the number of currently-loaded banks.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getbankcount">Studio::System::getBankCount</see>
/// </para>
/// </summary>
public static int GetBankCount(this FmodStudioSystem system)
{
TryGetBankCount(system, out var count).Check();
return count;
}
/// <summary>
/// <para>
/// Retrieves a list of the currently-loaded banks.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getbanklist">Studio::System::getBankList</see>
/// </para>
/// </summary>
public static unsafe Result TryGetBankList(
this FmodStudioSystem system,
out Bank array,
int capacity,
out int count
)
{
fixed (Bank* arrayPtr = &array)
fixed (int* countPtr = &count)
return PInvoke.SystemGetBankList(system, arrayPtr, capacity, countPtr);
}
/// <summary>
/// <para>
/// Retrieves a list of the currently-loaded banks.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getbanklist">Studio::System::getBankList</see>
/// </para>
/// </summary>
public static void GetBankList(this FmodStudioSystem system, out Bank array, int capacity, out int count) =>
TryGetBankList(system, out array, capacity, out count).Check();
/// <summary>
/// <para>
/// Retrieves the number of global parameters.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getparameterdescriptioncount">Studio::System::getParameterDescriptionCount</see>
/// </para>
/// </summary>
public static unsafe Result TryGetParameterDescriptionCount(this FmodStudioSystem system, out int count)
{
fixed (int* countPtr = &count)
return PInvoke.SystemGetParameterDescriptionCount(system, countPtr);
}
/// <summary>
/// <para>
/// Retrieves the number of global parameters.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getparameterdescriptioncount">Studio::System::getParameterDescriptionCount</see>
/// </para>
/// </summary>
public static int GetParameterDescriptionCount(this FmodStudioSystem system)
{
TryGetParameterDescriptionCount(system, out var count).Check();
return count;
}
/// <summary>
/// <para>
/// Retrieves a list of global parameters.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getparameterdescriptionlist">Studio::System::getParameterDescriptionList</see>
/// </para>
/// </summary>
public static unsafe Result TryGetParameterDescriptionList(
this FmodStudioSystem system,
out ParameterDescription array,
int capacity,
out int count
)
{
fixed (ParameterDescription* arrayPtr = &array)
fixed (int* countPtr = &count)
return PInvoke.SystemGetParameterDescriptionList(system, arrayPtr, capacity, countPtr);
}
/// <summary>
/// <para>
/// Retrieves a list of global parameters.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getparameterdescriptionlist">Studio::System::getParameterDescriptionList</see>
/// </para>
/// </summary>
public static void GetParameterDescriptionList(
this FmodStudioSystem system,
out ParameterDescription array,
int capacity,
out int count
) => TryGetParameterDescriptionList(system, out array, capacity, out count).Check();
/// <summary>
/// <para>
/// Retrieves the amount of CPU used for different parts of the FMOD Engine.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getcpuusage">Studio::System::getCPUUsage</see>
/// </para>
/// </summary>
public static unsafe Result TryGetCpuUsage(
this FmodStudioSystem system,
out StudioCpuUsage usage,
out CpuUsage usageCore
)
{
fixed (StudioCpuUsage* usagePtr = &usage)
fixed (CpuUsage* usageCorePtr = &usageCore)
return PInvoke.SystemGetCpuUsage(system, usagePtr, usageCorePtr);
}
/// <summary>
/// <para>
/// Retrieves the amount of CPU used for different parts of the FMOD Engine.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getcpuusage">Studio::System::getCPUUsage</see>
/// </para>
/// </summary>
public static void GetCpuUsage(
this FmodStudioSystem system,
out StudioCpuUsage usage,
out CpuUsage usageCore
) => TryGetCpuUsage(system, out usage, out usageCore).Check();
/// <summary>
/// <para>
/// Retrieves buffer usage information.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getbufferusage">Studio::System::getBufferUsage</see>
/// </para>
/// </summary>
public static unsafe Result TryGetBufferUsage(this FmodStudioSystem system, out BufferUsage usage)
{
fixed (BufferUsage* usagePtr = &usage)
return PInvoke.SystemGetBufferUsage(system, usagePtr);
}
/// <summary>
/// <para>
/// Retrieves buffer usage information.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getbufferusage">Studio::System::getBufferUsage</see>
/// </para>
/// </summary>
public static BufferUsage GetBufferUsage(this FmodStudioSystem system)
{
TryGetBufferUsage(system, out var usage).Check();
return usage;
}
/// <summary>
/// <para>
/// Resets memory buffer usage statistics.
/// </para>
/// <para>
/// This function resets the buffer usage data tracked by the Studio system.
/// </para>
/// <para>
/// <b>See Also:</b> FMOD_STUDIO_BUFFER_USAGE, Studio::System::getBufferUsage
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_resetbufferusage">Studio::System::resetBufferUsage</see>
/// </para>
/// </summary>
public static Result TryResetBufferUsage(this FmodStudioSystem system) =>
PInvoke.SystemResetBufferUsage(system);
/// <summary>
/// <para>
/// Resets memory buffer usage statistics.
/// </para>
/// <para>
/// This function resets the buffer usage data tracked by the Studio system.
/// </para>
/// <para>
/// <b>See Also:</b> FMOD_STUDIO_BUFFER_USAGE, Studio::System::getBufferUsage
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_resetbufferusage">Studio::System::resetBufferUsage</see>
/// </para>
/// </summary>
public static void ResetBufferUsage(this FmodStudioSystem system) => TryResetBufferUsage(system).Check();
/// <summary>
/// <para>
/// Sets a callback for the Studio System.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_setcallback">Studio::System::setCallback</see>
/// </para>
/// </summary>
public static Result TrySetCallback(
this FmodStudioSystem system,
StudioSystemCallbackPtr callback,
StudioSystemCallbackType callbackMask
) => PInvoke.SystemSetCallback(system, callback, callbackMask);
/// <summary>
/// <para>
/// Sets a callback for the Studio System.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_setcallback">Studio::System::setCallback</see>
/// </para>
/// </summary>
public static void SetCallback(
this FmodStudioSystem system,
StudioSystemCallbackPtr callback,
StudioSystemCallbackType callbackMask
) => TrySetCallback(system, callback, callbackMask).Check();
/// <summary>
/// <para>
/// Sets the user data.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_setuserdata">Studio::System::setUserData</see>
/// </para>
/// </summary>
public static Result TrySetUserData(this FmodStudioSystem system, nint userData) =>
PInvoke.SystemSetUserData(system, userData);
/// <summary>
/// <para>
/// Sets the user data.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_setuserdata">Studio::System::setUserData</see>
/// </para>
/// </summary>
public static void SetUserData(this FmodStudioSystem system, nint userData) =>
TrySetUserData(system, userData).Check();
/// <summary>
/// <para>
/// Retrieves the user data.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getuserdata">Studio::System::getUserData</see>
/// </para>
/// </summary>
public static unsafe Result TryGetUserData(this FmodStudioSystem system, out nint userData)
{
fixed (nint* userDataPtr = &userData)
return PInvoke.SystemGetUserData(system, userDataPtr);
}
/// <summary>
/// <para>
/// Retrieves the user data.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getuserdata">Studio::System::getUserData</see>
/// </para>
/// </summary>
public static nint GetUserData(this FmodStudioSystem system)
{
TryGetUserData(system, out var userData).Check();
return userData;
}
/// <summary>
/// <para>
/// Retrieves memory usage statistics.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getmemoryusage">Studio::System::getMemoryUsage</see>
/// </para>
/// </summary>
public static unsafe Result TryGetMemoryUsage(this FmodStudioSystem system, out MemoryUsage memoryUsage)
{
fixed (MemoryUsage* memoryUsagePtr = &memoryUsage)
return PInvoke.SystemGetMemoryUsage(system, memoryUsagePtr);
}
/// <summary>
/// <para>
/// Retrieves memory usage statistics.
/// </para>
/// <para>
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_getmemoryusage">Studio::System::getMemoryUsage</see>
/// </para>
/// </summary>
public static MemoryUsage GetMemoryUsage(this FmodStudioSystem system)
{
TryGetMemoryUsage(system, out var memoryUsage).Check();
return memoryUsage;
}
}
}