mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
549 lines
22 KiB
C#
549 lines
22 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 bank reference is valid.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_isvalid">Studio::Bank::isValid</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Bool32 IsValid(this Bank bank) => PInvoke.BankIsValid(bank);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the bank's GUID.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_getid">Studio::Bank::getID</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetId(this Bank bank, out Guid id)
|
|
{
|
|
fixed (Guid* idPtr = &id)
|
|
return PInvoke.BankGetId(bank, idPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the bank's GUID.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_getid">Studio::Bank::getID</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Guid GetId(this Bank bank)
|
|
{
|
|
TryGetId(bank, out var id).Check();
|
|
return id;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the path.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_getpath">Studio::Bank::getPath</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetPath(this Bank bank, byte* path, int size, out int retrieved)
|
|
{
|
|
fixed (int* retrievedPtr = &retrieved)
|
|
return PInvoke.BankGetPath(bank, path, size, retrievedPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the path.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_getpath">Studio::Bank::getPath</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe int GetPath(this Bank bank, byte* path, int size)
|
|
{
|
|
TryGetPath(bank, path, size, out var retrieved).Check();
|
|
return retrieved;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Unloads the bank.
|
|
/// </para>
|
|
/// <para>
|
|
/// This will destroy all objects created from the bank, unload all sample data inside the bank, and
|
|
/// invalidate all API handles referring to the bank.
|
|
/// </para>
|
|
/// <para>
|
|
/// If the bank was loaded from user-managed memory, e.g. by Studio::System::loadBankMemory with the
|
|
/// FMOD_STUDIO_LOAD_MEMORY_POINT mode, then the memory must not be freed until the unload has completed.
|
|
/// Poll the loading state using Studio::Bank::getLoadingState or use the
|
|
/// FMOD_STUDIO_SYSTEM_CALLBACK_BANK_UNLOAD system callback to determine when it is safe to free the memory.
|
|
/// </para>
|
|
/// <para>
|
|
/// <b>See Also:</b> Studio::System::loadBankFile, Studio::System::loadBankCustom,
|
|
/// Studio::System::setCallback
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_unload">Studio::Bank::unload</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TryUnload(this Bank bank) => PInvoke.BankUnload(bank);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Unloads the bank.
|
|
/// </para>
|
|
/// <para>
|
|
/// This will destroy all objects created from the bank, unload all sample data inside the bank, and
|
|
/// invalidate all API handles referring to the bank.
|
|
/// </para>
|
|
/// <para>
|
|
/// If the bank was loaded from user-managed memory, e.g. by Studio::System::loadBankMemory with the
|
|
/// FMOD_STUDIO_LOAD_MEMORY_POINT mode, then the memory must not be freed until the unload has completed.
|
|
/// Poll the loading state using Studio::Bank::getLoadingState or use the
|
|
/// FMOD_STUDIO_SYSTEM_CALLBACK_BANK_UNLOAD system callback to determine when it is safe to free the memory.
|
|
/// </para>
|
|
/// <para>
|
|
/// <b>See Also:</b> Studio::System::loadBankFile, Studio::System::loadBankCustom,
|
|
/// Studio::System::setCallback
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_unload">Studio::Bank::unload</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void Unload(this Bank bank) => TryUnload(bank).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Loads non-streaming sample data for all events in the bank.
|
|
/// </para>
|
|
/// <para>
|
|
/// Use this function to preload sample data ahead of time so that the events in the bank can play
|
|
/// immediately when started.
|
|
/// </para>
|
|
/// <para>
|
|
/// This function is equivalent to calling Studio::EventDescription::loadSampleData for all events in the
|
|
/// bank, including referenced events.
|
|
/// </para>
|
|
/// <para>
|
|
/// <b>See Also:</b> Studio::Bank::getSampleLoadingState, Studio::Bank::unloadSampleData, Sample Data
|
|
/// Loading
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_loadsampledata">Studio::Bank::loadSampleData</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TryLoadSampleData(this Bank bank) => PInvoke.BankLoadSampleData(bank);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Loads non-streaming sample data for all events in the bank.
|
|
/// </para>
|
|
/// <para>
|
|
/// Use this function to preload sample data ahead of time so that the events in the bank can play
|
|
/// immediately when started.
|
|
/// </para>
|
|
/// <para>
|
|
/// This function is equivalent to calling Studio::EventDescription::loadSampleData for all events in the
|
|
/// bank, including referenced events.
|
|
/// </para>
|
|
/// <para>
|
|
/// <b>See Also:</b> Studio::Bank::getSampleLoadingState, Studio::Bank::unloadSampleData, Sample Data
|
|
/// Loading
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_loadsampledata">Studio::Bank::loadSampleData</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void LoadSampleData(this Bank bank) => TryLoadSampleData(bank).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Unloads non-streaming sample data for all events in the bank.
|
|
/// </para>
|
|
/// <para>
|
|
/// Sample data loading is reference counted and the sample data will remain loaded until unload requests
|
|
/// corresponding to all load requests are made, or until the bank is unloaded. For more details see Sample
|
|
/// Data Loading.
|
|
/// </para>
|
|
/// <para>
|
|
/// <b>See Also:</b> Studio::Bank::loadSampleData
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_unloadsampledata">Studio::Bank::unloadSampleData</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TryUnloadSampleData(this Bank bank) => PInvoke.BankUnloadSampleData(bank);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Unloads non-streaming sample data for all events in the bank.
|
|
/// </para>
|
|
/// <para>
|
|
/// Sample data loading is reference counted and the sample data will remain loaded until unload requests
|
|
/// corresponding to all load requests are made, or until the bank is unloaded. For more details see Sample
|
|
/// Data Loading.
|
|
/// </para>
|
|
/// <para>
|
|
/// <b>See Also:</b> Studio::Bank::loadSampleData
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_unloadsampledata">Studio::Bank::unloadSampleData</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void UnloadSampleData(this Bank bank) => TryUnloadSampleData(bank).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the loading state.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_getloadingstate">Studio::Bank::getLoadingState</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetLoadingState(this Bank bank, out LoadingState state)
|
|
{
|
|
fixed (LoadingState* statePtr = &state)
|
|
return PInvoke.BankGetLoadingState(bank, statePtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the loading state.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_getloadingstate">Studio::Bank::getLoadingState</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static LoadingState GetLoadingState(this Bank bank)
|
|
{
|
|
TryGetLoadingState(bank, out var state).Check();
|
|
return state;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the loading state of the samples in the bank.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_getsampleloadingstate">Studio::Bank::getSampleLoadingState</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetSampleLoadingState(this Bank bank, out LoadingState state)
|
|
{
|
|
fixed (LoadingState* statePtr = &state)
|
|
return PInvoke.BankGetSampleLoadingState(bank, statePtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the loading state of the samples in the bank.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_getsampleloadingstate">Studio::Bank::getSampleLoadingState</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static LoadingState GetSampleLoadingState(this Bank bank)
|
|
{
|
|
TryGetSampleLoadingState(bank, out var state).Check();
|
|
return state;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the number of string table entries in the bank. This is only relevant for studio string banks,
|
|
/// as other banks do not contain string tables.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_getstringcount">Studio::Bank::getStringCount</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetStringCount(this Bank bank, out int count)
|
|
{
|
|
fixed (int* countPtr = &count)
|
|
return PInvoke.BankGetStringCount(bank, countPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the number of string table entries in the bank. This is only relevant for studio string banks,
|
|
/// as other banks do not contain string tables.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_getstringcount">Studio::Bank::getStringCount</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static int GetStringCount(this Bank bank)
|
|
{
|
|
TryGetStringCount(bank, out var count).Check();
|
|
return count;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves a string table entry. This is only relevant for studio string banks, as other banks do not
|
|
/// contain string tables.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_getstringinfo">Studio::Bank::getStringInfo</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetStringInfo(
|
|
this Bank bank,
|
|
int index,
|
|
out Guid id,
|
|
byte* path,
|
|
int size,
|
|
out int retrieved
|
|
)
|
|
{
|
|
fixed (Guid* idPtr = &id)
|
|
fixed (int* retrievedPtr = &retrieved)
|
|
return PInvoke.BankGetStringInfo(bank, index, idPtr, path, size, retrievedPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves a string table entry. This is only relevant for studio string banks, as other banks do not
|
|
/// contain string tables.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_getstringinfo">Studio::Bank::getStringInfo</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe void GetStringInfo(
|
|
this Bank bank,
|
|
int index,
|
|
out Guid id,
|
|
byte* path,
|
|
int size,
|
|
out int retrieved
|
|
) => TryGetStringInfo(bank, index, out id, path, size, out retrieved).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the number of event descriptions in the bank.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_geteventcount">Studio::Bank::getEventCount</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetEventCount(this Bank bank, out int count)
|
|
{
|
|
fixed (int* countPtr = &count)
|
|
return PInvoke.BankGetEventCount(bank, countPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the number of event descriptions in the bank.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_geteventcount">Studio::Bank::getEventCount</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static int GetEventCount(this Bank bank)
|
|
{
|
|
TryGetEventCount(bank, out var count).Check();
|
|
return count;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves a list of the event descriptions in the bank.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_geteventlist">Studio::Bank::getEventList</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetEventList(
|
|
this Bank bank,
|
|
out EventDescription array,
|
|
int capacity,
|
|
out int count
|
|
)
|
|
{
|
|
fixed (EventDescription* arrayPtr = &array)
|
|
fixed (int* countPtr = &count)
|
|
return PInvoke.BankGetEventList(bank, arrayPtr, capacity, countPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves a list of the event descriptions in the bank.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_geteventlist">Studio::Bank::getEventList</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void GetEventList(this Bank bank, out EventDescription array, int capacity, out int count) =>
|
|
TryGetEventList(bank, out array, capacity, out count).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the number of buses in the bank. This is only relevant for master banks, as other banks do not
|
|
/// contain buses.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_getbuscount">Studio::Bank::getBusCount</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetBusCount(this Bank bank, out int count)
|
|
{
|
|
fixed (int* countPtr = &count)
|
|
return PInvoke.BankGetBusCount(bank, countPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the number of buses in the bank. This is only relevant for master banks, as other banks do not
|
|
/// contain buses.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_getbuscount">Studio::Bank::getBusCount</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static int GetBusCount(this Bank bank)
|
|
{
|
|
TryGetBusCount(bank, out var count).Check();
|
|
return count;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves a list of the buses in the bank. This is only relevant for master banks, as other banks do not
|
|
/// contain buses.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_getbuslist">Studio::Bank::getBusList</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetBusList(this Bank bank, out Bus array, int capacity, out int count)
|
|
{
|
|
fixed (Bus* arrayPtr = &array)
|
|
fixed (int* countPtr = &count)
|
|
return PInvoke.BankGetBusList(bank, arrayPtr, capacity, countPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves a list of the buses in the bank. This is only relevant for master banks, as other banks do not
|
|
/// contain buses.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_getbuslist">Studio::Bank::getBusList</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void GetBusList(this Bank bank, out Bus array, int capacity, out int count) =>
|
|
TryGetBusList(bank, out array, capacity, out count).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the number of VCAs in the bank.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_getvcacount">Studio::Bank::getVCACount</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetVcaCount(this Bank bank, out int count)
|
|
{
|
|
fixed (int* countPtr = &count)
|
|
return PInvoke.BankGetVcaCount(bank, countPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the number of VCAs in the bank.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_getvcacount">Studio::Bank::getVCACount</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static int GetVcaCount(this Bank bank)
|
|
{
|
|
TryGetVcaCount(bank, out var count).Check();
|
|
return count;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves a list of the VCAs in the bank.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_getvcalist">Studio::Bank::getVCAList</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetVcaList(this Bank bank, out Vca array, int capacity, out int count)
|
|
{
|
|
fixed (Vca* arrayPtr = &array)
|
|
fixed (int* countPtr = &count)
|
|
return PInvoke.BankGetVcaList(bank, arrayPtr, capacity, countPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves a list of the VCAs in the bank.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_getvcalist">Studio::Bank::getVCAList</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void GetVcaList(this Bank bank, out Vca array, int capacity, out int count) =>
|
|
TryGetVcaList(bank, out array, capacity, out count).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the bank's user data.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_getuserdata">Studio::Bank::getUserData</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetUserData(this Bank bank, out nint userData)
|
|
{
|
|
fixed (nint* userDataPtr = &userData)
|
|
return PInvoke.BankGetUserData(bank, userDataPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the bank's user data.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_getuserdata">Studio::Bank::getUserData</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static nint GetUserData(this Bank bank)
|
|
{
|
|
TryGetUserData(bank, out var userData).Check();
|
|
return userData;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the bank's user data.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_setuserdata">Studio::Bank::setUserData</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetUserData(this Bank bank, nint userData) => PInvoke.BankSetUserData(bank, userData);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the bank's user data.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bank.html#studio_bank_setuserdata">Studio::Bank::setUserData</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetUserData(this Bank bank, nint userData) => TrySetUserData(bank, userData).Check();
|
|
}
|
|
}
|