//
// Generated by Brutal.Fmod.Generate; do not edit by hand.
#nullable enable
namespace Brutal.FmodApi.Studio
{
public static partial class FmodStudio
{
///
///
/// Checks that the bank reference is valid.
///
///
/// Studio::Bank::isValid
///
///
public static Bool32 IsValid(this Bank bank) => PInvoke.BankIsValid(bank);
///
///
/// Retrieves the bank's GUID.
///
///
/// Studio::Bank::getID
///
///
public static unsafe Result TryGetId(this Bank bank, out Guid id)
{
fixed (Guid* idPtr = &id)
return PInvoke.BankGetId(bank, idPtr);
}
///
///
/// Retrieves the bank's GUID.
///
///
/// Studio::Bank::getID
///
///
public static Guid GetId(this Bank bank)
{
TryGetId(bank, out var id).Check();
return id;
}
///
///
/// Retrieves the path.
///
///
/// Studio::Bank::getPath
///
///
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);
}
///
///
/// Retrieves the path.
///
///
/// Studio::Bank::getPath
///
///
public static unsafe int GetPath(this Bank bank, byte* path, int size)
{
TryGetPath(bank, path, size, out var retrieved).Check();
return retrieved;
}
///
///
/// Unloads the bank.
///
///
/// 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.
///
///
/// 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.
///
///
/// See Also: Studio::System::loadBankFile, Studio::System::loadBankCustom,
/// Studio::System::setCallback
///
///
/// Studio::Bank::unload
///
///
public static Result TryUnload(this Bank bank) => PInvoke.BankUnload(bank);
///
///
/// Unloads the bank.
///
///
/// 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.
///
///
/// 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.
///
///
/// See Also: Studio::System::loadBankFile, Studio::System::loadBankCustom,
/// Studio::System::setCallback
///
///
/// Studio::Bank::unload
///
///
public static void Unload(this Bank bank) => TryUnload(bank).Check();
///
///
/// Loads non-streaming sample data for all events in the bank.
///
///
/// Use this function to preload sample data ahead of time so that the events in the bank can play
/// immediately when started.
///
///
/// This function is equivalent to calling Studio::EventDescription::loadSampleData for all events in the
/// bank, including referenced events.
///
///
/// See Also: Studio::Bank::getSampleLoadingState, Studio::Bank::unloadSampleData, Sample Data
/// Loading
///
///
/// Studio::Bank::loadSampleData
///
///
public static Result TryLoadSampleData(this Bank bank) => PInvoke.BankLoadSampleData(bank);
///
///
/// Loads non-streaming sample data for all events in the bank.
///
///
/// Use this function to preload sample data ahead of time so that the events in the bank can play
/// immediately when started.
///
///
/// This function is equivalent to calling Studio::EventDescription::loadSampleData for all events in the
/// bank, including referenced events.
///
///
/// See Also: Studio::Bank::getSampleLoadingState, Studio::Bank::unloadSampleData, Sample Data
/// Loading
///
///
/// Studio::Bank::loadSampleData
///
///
public static void LoadSampleData(this Bank bank) => TryLoadSampleData(bank).Check();
///
///
/// Unloads non-streaming sample data for all events in the bank.
///
///
/// 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.
///
///
/// See Also: Studio::Bank::loadSampleData
///
///
/// Studio::Bank::unloadSampleData
///
///
public static Result TryUnloadSampleData(this Bank bank) => PInvoke.BankUnloadSampleData(bank);
///
///
/// Unloads non-streaming sample data for all events in the bank.
///
///
/// 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.
///
///
/// See Also: Studio::Bank::loadSampleData
///
///
/// Studio::Bank::unloadSampleData
///
///
public static void UnloadSampleData(this Bank bank) => TryUnloadSampleData(bank).Check();
///
///
/// Retrieves the loading state.
///
///
/// Studio::Bank::getLoadingState
///
///
public static unsafe Result TryGetLoadingState(this Bank bank, out LoadingState state)
{
fixed (LoadingState* statePtr = &state)
return PInvoke.BankGetLoadingState(bank, statePtr);
}
///
///
/// Retrieves the loading state.
///
///
/// Studio::Bank::getLoadingState
///
///
public static LoadingState GetLoadingState(this Bank bank)
{
TryGetLoadingState(bank, out var state).Check();
return state;
}
///
///
/// Retrieves the loading state of the samples in the bank.
///
///
/// Studio::Bank::getSampleLoadingState
///
///
public static unsafe Result TryGetSampleLoadingState(this Bank bank, out LoadingState state)
{
fixed (LoadingState* statePtr = &state)
return PInvoke.BankGetSampleLoadingState(bank, statePtr);
}
///
///
/// Retrieves the loading state of the samples in the bank.
///
///
/// Studio::Bank::getSampleLoadingState
///
///
public static LoadingState GetSampleLoadingState(this Bank bank)
{
TryGetSampleLoadingState(bank, out var state).Check();
return state;
}
///
///
/// 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.
///
///
/// Studio::Bank::getStringCount
///
///
public static unsafe Result TryGetStringCount(this Bank bank, out int count)
{
fixed (int* countPtr = &count)
return PInvoke.BankGetStringCount(bank, countPtr);
}
///
///
/// 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.
///
///
/// Studio::Bank::getStringCount
///
///
public static int GetStringCount(this Bank bank)
{
TryGetStringCount(bank, out var count).Check();
return count;
}
///
///
/// Retrieves a string table entry. This is only relevant for studio string banks, as other banks do not
/// contain string tables.
///
///
/// Studio::Bank::getStringInfo
///
///
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);
}
///
///
/// Retrieves a string table entry. This is only relevant for studio string banks, as other banks do not
/// contain string tables.
///
///
/// Studio::Bank::getStringInfo
///
///
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();
///
///
/// Retrieves the number of event descriptions in the bank.
///
///
/// Studio::Bank::getEventCount
///
///
public static unsafe Result TryGetEventCount(this Bank bank, out int count)
{
fixed (int* countPtr = &count)
return PInvoke.BankGetEventCount(bank, countPtr);
}
///
///
/// Retrieves the number of event descriptions in the bank.
///
///
/// Studio::Bank::getEventCount
///
///
public static int GetEventCount(this Bank bank)
{
TryGetEventCount(bank, out var count).Check();
return count;
}
///
///
/// Retrieves a list of the event descriptions in the bank.
///
///
/// Studio::Bank::getEventList
///
///
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);
}
///
///
/// Retrieves a list of the event descriptions in the bank.
///
///
/// Studio::Bank::getEventList
///
///
public static void GetEventList(this Bank bank, out EventDescription array, int capacity, out int count) =>
TryGetEventList(bank, out array, capacity, out count).Check();
///
///
/// Retrieves the number of buses in the bank. This is only relevant for master banks, as other banks do not
/// contain buses.
///
///
/// Studio::Bank::getBusCount
///
///
public static unsafe Result TryGetBusCount(this Bank bank, out int count)
{
fixed (int* countPtr = &count)
return PInvoke.BankGetBusCount(bank, countPtr);
}
///
///
/// Retrieves the number of buses in the bank. This is only relevant for master banks, as other banks do not
/// contain buses.
///
///
/// Studio::Bank::getBusCount
///
///
public static int GetBusCount(this Bank bank)
{
TryGetBusCount(bank, out var count).Check();
return count;
}
///
///
/// Retrieves a list of the buses in the bank. This is only relevant for master banks, as other banks do not
/// contain buses.
///
///
/// Studio::Bank::getBusList
///
///
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);
}
///
///
/// Retrieves a list of the buses in the bank. This is only relevant for master banks, as other banks do not
/// contain buses.
///
///
/// Studio::Bank::getBusList
///
///
public static void GetBusList(this Bank bank, out Bus array, int capacity, out int count) =>
TryGetBusList(bank, out array, capacity, out count).Check();
///
///
/// Retrieves the number of VCAs in the bank.
///
///
/// Studio::Bank::getVCACount
///
///
public static unsafe Result TryGetVcaCount(this Bank bank, out int count)
{
fixed (int* countPtr = &count)
return PInvoke.BankGetVcaCount(bank, countPtr);
}
///
///
/// Retrieves the number of VCAs in the bank.
///
///
/// Studio::Bank::getVCACount
///
///
public static int GetVcaCount(this Bank bank)
{
TryGetVcaCount(bank, out var count).Check();
return count;
}
///
///
/// Retrieves a list of the VCAs in the bank.
///
///
/// Studio::Bank::getVCAList
///
///
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);
}
///
///
/// Retrieves a list of the VCAs in the bank.
///
///
/// Studio::Bank::getVCAList
///
///
public static void GetVcaList(this Bank bank, out Vca array, int capacity, out int count) =>
TryGetVcaList(bank, out array, capacity, out count).Check();
///
///
/// Retrieves the bank's user data.
///
///
/// Studio::Bank::getUserData
///
///
public static unsafe Result TryGetUserData(this Bank bank, out nint userData)
{
fixed (nint* userDataPtr = &userData)
return PInvoke.BankGetUserData(bank, userDataPtr);
}
///
///
/// Retrieves the bank's user data.
///
///
/// Studio::Bank::getUserData
///
///
public static nint GetUserData(this Bank bank)
{
TryGetUserData(bank, out var userData).Check();
return userData;
}
///
///
/// Sets the bank's user data.
///
///
/// Studio::Bank::setUserData
///
///
public static Result TrySetUserData(this Bank bank, nint userData) => PInvoke.BankSetUserData(bank, userData);
///
///
/// Sets the bank's user data.
///
///
/// Studio::Bank::setUserData
///
///
public static void SetUserData(this Bank bank, nint userData) => TrySetUserData(bank, userData).Check();
}
}