mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 13:08:24 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
8 changed files with 784842 additions and 0 deletions
|
|
@ -0,0 +1,549 @@
|
|||
// <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();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,429 @@
|
|||
// <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 Bus reference is valid.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_isvalid">Studio::Bus::isValid</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static Bool32 IsValid(this Bus bus) => PInvoke.BusIsValid(bus);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the GUID.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_getid">Studio::Bus::getID</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static unsafe Result TryGetId(this Bus bus, out Guid id)
|
||||
{
|
||||
fixed (Guid* idPtr = &id)
|
||||
return PInvoke.BusGetId(bus, idPtr);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the GUID.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_getid">Studio::Bus::getID</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static Guid GetId(this Bus bus)
|
||||
{
|
||||
TryGetId(bus, 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-bus.html#studio_bus_getpath">Studio::Bus::getPath</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static unsafe Result TryGetPath(this Bus bus, byte* path, int size, out int retrieved)
|
||||
{
|
||||
fixed (int* retrievedPtr = &retrieved)
|
||||
return PInvoke.BusGetPath(bus, path, size, retrievedPtr);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the path.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_getpath">Studio::Bus::getPath</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static unsafe int GetPath(this Bus bus, byte* path, int size)
|
||||
{
|
||||
TryGetPath(bus, path, size, out var retrieved).Check();
|
||||
return retrieved;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the volume level.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_getvolume">Studio::Bus::getVolume</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static unsafe Result TryGetVolume(this Bus bus, out float volume, out float finalVolume)
|
||||
{
|
||||
fixed (float* volumePtr = &volume)
|
||||
fixed (float* finalVolumePtr = &finalVolume)
|
||||
return PInvoke.BusGetVolume(bus, volumePtr, finalVolumePtr);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the volume level.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_getvolume">Studio::Bus::getVolume</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static void GetVolume(this Bus bus, out float volume, out float finalVolume) =>
|
||||
TryGetVolume(bus, out volume, out finalVolume).Check();
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Sets the volume level.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_setvolume">Studio::Bus::setVolume</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static Result TrySetVolume(this Bus bus, float volume) => PInvoke.BusSetVolume(bus, volume);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Sets the volume level.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_setvolume">Studio::Bus::setVolume</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static void SetVolume(this Bus bus, float volume) => TrySetVolume(bus, volume).Check();
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the pause state.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_getpaused">Studio::Bus::getPaused</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static unsafe Result TryGetPaused(this Bus bus, out Bool32 paused)
|
||||
{
|
||||
fixed (Bool32* pausedPtr = &paused)
|
||||
return PInvoke.BusGetPaused(bus, pausedPtr);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the pause state.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_getpaused">Studio::Bus::getPaused</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static Bool32 GetPaused(this Bus bus)
|
||||
{
|
||||
TryGetPaused(bus, out var paused).Check();
|
||||
return paused;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Sets the pause state.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_setpaused">Studio::Bus::setPaused</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static Result TrySetPaused(this Bus bus, Bool32 paused) => PInvoke.BusSetPaused(bus, paused);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Sets the pause state.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_setpaused">Studio::Bus::setPaused</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static void SetPaused(this Bus bus, Bool32 paused) => TrySetPaused(bus, paused).Check();
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the mute state.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_getmute">Studio::Bus::getMute</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static unsafe Result TryGetMute(this Bus bus, out Bool32 mute)
|
||||
{
|
||||
fixed (Bool32* mutePtr = &mute)
|
||||
return PInvoke.BusGetMute(bus, mutePtr);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the mute state.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_getmute">Studio::Bus::getMute</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static Bool32 GetMute(this Bus bus)
|
||||
{
|
||||
TryGetMute(bus, out var mute).Check();
|
||||
return mute;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Sets the mute state.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_setmute">Studio::Bus::setMute</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static Result TrySetMute(this Bus bus, Bool32 mute) => PInvoke.BusSetMute(bus, mute);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Sets the mute state.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_setmute">Studio::Bus::setMute</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static void SetMute(this Bus bus, Bool32 mute) => TrySetMute(bus, mute).Check();
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Stops all event instances that are routed into the bus.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_stopallevents">Studio::Bus::stopAllEvents</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static Result TryStopAllEvents(this Bus bus, StopMode mode) => PInvoke.BusStopAllEvents(bus, mode);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Stops all event instances that are routed into the bus.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_stopallevents">Studio::Bus::stopAllEvents</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static void StopAllEvents(this Bus bus, StopMode mode) => TryStopAllEvents(bus, mode).Check();
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the port index assigned to the bus.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_getportindex">Studio::Bus::getPortIndex</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static unsafe Result TryGetPortIndex(this Bus bus, out PortIndex index)
|
||||
{
|
||||
fixed (PortIndex* indexPtr = &index)
|
||||
return PInvoke.BusGetPortIndex(bus, indexPtr);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the port index assigned to the bus.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_getportindex">Studio::Bus::getPortIndex</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static PortIndex GetPortIndex(this Bus bus)
|
||||
{
|
||||
TryGetPortIndex(bus, out var index).Check();
|
||||
return index;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Sets the port index to use when attaching to an output port.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_setportindex">Studio::Bus::setPortIndex</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static Result TrySetPortIndex(this Bus bus, PortIndex index) => PInvoke.BusSetPortIndex(bus, index);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Sets the port index to use when attaching to an output port.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_setportindex">Studio::Bus::setPortIndex</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static void SetPortIndex(this Bus bus, PortIndex index) => TrySetPortIndex(bus, index).Check();
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Locks the core ChannelGroup.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// This function forces the system to create the ChannelGroup and keep it available until
|
||||
/// Studio::Bus::unlockChannelGroup is called. See Signal Paths for details.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_lockchannelgroup">Studio::Bus::lockChannelGroup</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static Result TryLockChannelGroup(this Bus bus) => PInvoke.BusLockChannelGroup(bus);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Locks the core ChannelGroup.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// This function forces the system to create the ChannelGroup and keep it available until
|
||||
/// Studio::Bus::unlockChannelGroup is called. See Signal Paths for details.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_lockchannelgroup">Studio::Bus::lockChannelGroup</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static void LockChannelGroup(this Bus bus) => TryLockChannelGroup(bus).Check();
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Unlocks the core ChannelGroup.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// This function allows the system to destroy the ChannelGroup when it is not needed. See Signal Paths for
|
||||
/// details.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <b>See Also:</b> Studio::Bus::lockChannelGroup
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_unlockchannelgroup">Studio::Bus::unlockChannelGroup</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static Result TryUnlockChannelGroup(this Bus bus) => PInvoke.BusUnlockChannelGroup(bus);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Unlocks the core ChannelGroup.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// This function allows the system to destroy the ChannelGroup when it is not needed. See Signal Paths for
|
||||
/// details.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <b>See Also:</b> Studio::Bus::lockChannelGroup
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_unlockchannelgroup">Studio::Bus::unlockChannelGroup</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static void UnlockChannelGroup(this Bus bus) => TryUnlockChannelGroup(bus).Check();
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the core ChannelGroup.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_getchannelgroup">Studio::Bus::getChannelGroup</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static unsafe Result TryGetChannelGroup(this Bus bus, out ChannelGroup group)
|
||||
{
|
||||
fixed (ChannelGroup* groupPtr = &group)
|
||||
return PInvoke.BusGetChannelGroup(bus, groupPtr);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the core ChannelGroup.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_getchannelgroup">Studio::Bus::getChannelGroup</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static ChannelGroup GetChannelGroup(this Bus bus)
|
||||
{
|
||||
TryGetChannelGroup(bus, out var group).Check();
|
||||
return group;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the bus CPU usage data.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_getcpuusage">Studio::Bus::getCPUUsage</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static unsafe Result TryGetCpuUsage(this Bus bus, out uint exclusive, out uint inclusive)
|
||||
{
|
||||
fixed (uint* exclusivePtr = &exclusive)
|
||||
fixed (uint* inclusivePtr = &inclusive)
|
||||
return PInvoke.BusGetCpuUsage(bus, exclusivePtr, inclusivePtr);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the bus CPU usage data.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_getcpuusage">Studio::Bus::getCPUUsage</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static void GetCpuUsage(this Bus bus, out uint exclusive, out uint inclusive) =>
|
||||
TryGetCpuUsage(bus, out exclusive, out inclusive).Check();
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves memory usage statistics.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_getmemoryusage">Studio::Bus::getMemoryUsage</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static unsafe Result TryGetMemoryUsage(this Bus bus, out MemoryUsage memoryUsage)
|
||||
{
|
||||
fixed (MemoryUsage* memoryUsagePtr = &memoryUsage)
|
||||
return PInvoke.BusGetMemoryUsage(bus, memoryUsagePtr);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves memory usage statistics.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-bus.html#studio_bus_getmemoryusage">Studio::Bus::getMemoryUsage</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static MemoryUsage GetMemoryUsage(this Bus bus)
|
||||
{
|
||||
TryGetMemoryUsage(bus, out var memoryUsage).Check();
|
||||
return memoryUsage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,576 @@
|
|||
// <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 CommandReplay reference is valid.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_isvalid">Studio::CommandReplay::isValid</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static Bool32 IsValid(this CommandReplay replay) => PInvoke.CommandReplayIsValid(replay);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the Studio System object associated with this replay object.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_getsystem">Studio::CommandReplay::getSystem</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static unsafe Result TryGetSystem(this CommandReplay replay, out FmodStudioSystem system)
|
||||
{
|
||||
fixed (FmodStudioSystem* systemPtr = &system)
|
||||
return PInvoke.CommandReplayGetSystem(replay, systemPtr);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the Studio System object associated with this replay object.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_getsystem">Studio::CommandReplay::getSystem</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static FmodStudioSystem GetSystem(this CommandReplay replay)
|
||||
{
|
||||
TryGetSystem(replay, out var system).Check();
|
||||
return system;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the total playback time.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_getlength">Studio::CommandReplay::getLength</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static unsafe Result TryGetLength(this CommandReplay replay, out float length)
|
||||
{
|
||||
fixed (float* lengthPtr = &length)
|
||||
return PInvoke.CommandReplayGetLength(replay, lengthPtr);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the total playback time.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_getlength">Studio::CommandReplay::getLength</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static float GetLength(this CommandReplay replay)
|
||||
{
|
||||
TryGetLength(replay, out var length).Check();
|
||||
return length;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the number of commands in the replay.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_getcommandcount">Studio::CommandReplay::getCommandCount</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static unsafe Result TryGetCommandCount(this CommandReplay replay, out int count)
|
||||
{
|
||||
fixed (int* countPtr = &count)
|
||||
return PInvoke.CommandReplayGetCommandCount(replay, countPtr);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the number of commands in the replay.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_getcommandcount">Studio::CommandReplay::getCommandCount</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static int GetCommandCount(this CommandReplay replay)
|
||||
{
|
||||
TryGetCommandCount(replay, out var count).Check();
|
||||
return count;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves command information.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_getcommandinfo">Studio::CommandReplay::getCommandInfo</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static unsafe Result TryGetCommandInfo(this CommandReplay replay, int commandIndex, out CommandInfo info)
|
||||
{
|
||||
fixed (CommandInfo* infoPtr = &info)
|
||||
return PInvoke.CommandReplayGetCommandInfo(replay, commandIndex, infoPtr);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves command information.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_getcommandinfo">Studio::CommandReplay::getCommandInfo</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static CommandInfo GetCommandInfo(this CommandReplay replay, int commandIndex)
|
||||
{
|
||||
TryGetCommandInfo(replay, commandIndex, out var info).Check();
|
||||
return info;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the string representation of a command.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_getcommandstring">Studio::CommandReplay::getCommandString</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static unsafe Result TryGetCommandString(
|
||||
this CommandReplay replay,
|
||||
int commandIndex,
|
||||
byte* buffer,
|
||||
int length
|
||||
) => PInvoke.CommandReplayGetCommandString(replay, commandIndex, buffer, length);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the string representation of a command.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_getcommandstring">Studio::CommandReplay::getCommandString</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static unsafe void GetCommandString(
|
||||
this CommandReplay replay,
|
||||
int commandIndex,
|
||||
byte* buffer,
|
||||
int length
|
||||
) => TryGetCommandString(replay, commandIndex, buffer, length).Check();
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the command index corresponding to the given playback time.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_getcommandattime">Studio::CommandReplay::getCommandAtTime</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static unsafe Result TryGetCommandAtTime(this CommandReplay replay, float time, out int commandIndex)
|
||||
{
|
||||
fixed (int* commandIndexPtr = &commandIndex)
|
||||
return PInvoke.CommandReplayGetCommandAtTime(replay, time, commandIndexPtr);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the command index corresponding to the given playback time.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_getcommandattime">Studio::CommandReplay::getCommandAtTime</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static int GetCommandAtTime(this CommandReplay replay, float time)
|
||||
{
|
||||
TryGetCommandAtTime(replay, time, out var commandIndex).Check();
|
||||
return commandIndex;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Sets a path substition that will be used when loading banks with this replay.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_setbankpath">Studio::CommandReplay::setBankPath</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static unsafe Result TrySetBankPath(this CommandReplay replay, RefString8 bankPath)
|
||||
{
|
||||
fixed (byte* bankPathPtr = bankPath)
|
||||
return PInvoke.CommandReplaySetBankPath(replay, bankPathPtr);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Sets a path substition that will be used when loading banks with this replay.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_setbankpath">Studio::CommandReplay::setBankPath</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static void SetBankPath(this CommandReplay replay, RefString8 bankPath) =>
|
||||
TrySetBankPath(replay, bankPath).Check();
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Begins playback.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// If the replay is already running then calling this function will restart replay from the beginning.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <b>See Also:</b> Studio::CommandReplay::stop, Studio::CommandReplay::getPlaybackState
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_start">Studio::CommandReplay::start</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static Result TryStart(this CommandReplay replay) => PInvoke.CommandReplayStart(replay);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Begins playback.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// If the replay is already running then calling this function will restart replay from the beginning.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <b>See Also:</b> Studio::CommandReplay::stop, Studio::CommandReplay::getPlaybackState
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_start">Studio::CommandReplay::start</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static void Start(this CommandReplay replay) => TryStart(replay).Check();
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Stops playback.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// If the FMOD_STUDIO_COMMANDREPLAY_SKIP_CLEANUP flag has been used then the system state is left as it was
|
||||
/// at the end of the playback, otherwise all resources that were created as part of the replay will be
|
||||
/// cleaned up.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <b>See Also:</b> Studio::CommandReplay::start, Studio::CommandReplay::getPlaybackState,
|
||||
/// Studio::System::loadCommandReplay
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_stop">Studio::CommandReplay::stop</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static Result TryStop(this CommandReplay replay) => PInvoke.CommandReplayStop(replay);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Stops playback.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// If the FMOD_STUDIO_COMMANDREPLAY_SKIP_CLEANUP flag has been used then the system state is left as it was
|
||||
/// at the end of the playback, otherwise all resources that were created as part of the replay will be
|
||||
/// cleaned up.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <b>See Also:</b> Studio::CommandReplay::start, Studio::CommandReplay::getPlaybackState,
|
||||
/// Studio::System::loadCommandReplay
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_stop">Studio::CommandReplay::stop</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static void Stop(this CommandReplay replay) => TryStop(replay).Check();
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Seeks the playback position to a time.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_seektotime">Studio::CommandReplay::seekToTime</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static Result TrySeekToTime(this CommandReplay replay, float time) =>
|
||||
PInvoke.CommandReplaySeekToTime(replay, time);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Seeks the playback position to a time.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_seektotime">Studio::CommandReplay::seekToTime</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static void SeekToTime(this CommandReplay replay, float time) => TrySeekToTime(replay, time).Check();
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Seeks the playback position to a command.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_seektocommand">Studio::CommandReplay::seekToCommand</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static Result TrySeekToCommand(this CommandReplay replay, int commandIndex) =>
|
||||
PInvoke.CommandReplaySeekToCommand(replay, commandIndex);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Seeks the playback position to a command.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_seektocommand">Studio::CommandReplay::seekToCommand</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static void SeekToCommand(this CommandReplay replay, int commandIndex) =>
|
||||
TrySeekToCommand(replay, commandIndex).Check();
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the paused state.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_getpaused">Studio::CommandReplay::getPaused</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static unsafe Result TryGetPaused(this CommandReplay replay, out Bool32 paused)
|
||||
{
|
||||
fixed (Bool32* pausedPtr = &paused)
|
||||
return PInvoke.CommandReplayGetPaused(replay, pausedPtr);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the paused state.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_getpaused">Studio::CommandReplay::getPaused</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static Bool32 GetPaused(this CommandReplay replay)
|
||||
{
|
||||
TryGetPaused(replay, out var paused).Check();
|
||||
return paused;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Sets the paused state.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_setpaused">Studio::CommandReplay::setPaused</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static Result TrySetPaused(this CommandReplay replay, Bool32 paused) =>
|
||||
PInvoke.CommandReplaySetPaused(replay, paused);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Sets the paused state.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_setpaused">Studio::CommandReplay::setPaused</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static void SetPaused(this CommandReplay replay, Bool32 paused) => TrySetPaused(replay, paused).Check();
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the playback state.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_getplaybackstate">Studio::CommandReplay::getPlaybackState</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static unsafe Result TryGetPlaybackState(this CommandReplay replay, out PlaybackState state)
|
||||
{
|
||||
fixed (PlaybackState* statePtr = &state)
|
||||
return PInvoke.CommandReplayGetPlaybackState(replay, statePtr);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the playback state.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_getplaybackstate">Studio::CommandReplay::getPlaybackState</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static PlaybackState GetPlaybackState(this CommandReplay replay)
|
||||
{
|
||||
TryGetPlaybackState(replay, out var state).Check();
|
||||
return state;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the progress through the command replay.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_getcurrentcommand">Studio::CommandReplay::getCurrentCommand</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static unsafe Result TryGetCurrentCommand(
|
||||
this CommandReplay replay,
|
||||
out int commandIndex,
|
||||
out float currentTime
|
||||
)
|
||||
{
|
||||
fixed (int* commandIndexPtr = &commandIndex)
|
||||
fixed (float* currentTimePtr = ¤tTime)
|
||||
return PInvoke.CommandReplayGetCurrentCommand(replay, commandIndexPtr, currentTimePtr);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the progress through the command replay.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_getcurrentcommand">Studio::CommandReplay::getCurrentCommand</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static void GetCurrentCommand(this CommandReplay replay, out int commandIndex, out float currentTime) =>
|
||||
TryGetCurrentCommand(replay, out commandIndex, out currentTime).Check();
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Releases the command replay.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_release">Studio::CommandReplay::release</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static Result TryRelease(this CommandReplay replay) => PInvoke.CommandReplayRelease(replay);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Releases the command replay.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_release">Studio::CommandReplay::release</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static void Release(this CommandReplay replay) => TryRelease(replay).Check();
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Sets a callback that is issued each time the replay reaches a new frame.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_setframecallback">Studio::CommandReplay::setFrameCallback</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static Result TrySetFrameCallback(this CommandReplay replay, CommandReplayFrameCallbackPtr callback) =>
|
||||
PInvoke.CommandReplaySetFrameCallback(replay, callback);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Sets a callback that is issued each time the replay reaches a new frame.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_setframecallback">Studio::CommandReplay::setFrameCallback</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static void SetFrameCallback(this CommandReplay replay, CommandReplayFrameCallbackPtr callback) =>
|
||||
TrySetFrameCallback(replay, callback).Check();
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Sets the bank loading callback.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_setloadbankcallback">Studio::CommandReplay::setLoadBankCallback</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static Result TrySetLoadBankCallback(
|
||||
this CommandReplay replay,
|
||||
CommandReplayLoadBankCallbackPtr callback
|
||||
) => PInvoke.CommandReplaySetLoadBankCallback(replay, callback);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Sets the bank loading callback.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_setloadbankcallback">Studio::CommandReplay::setLoadBankCallback</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static void SetLoadBankCallback(this CommandReplay replay, CommandReplayLoadBankCallbackPtr callback) =>
|
||||
TrySetLoadBankCallback(replay, callback).Check();
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Sets the create event instance callback.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_setcreateinstancecallback">Studio::CommandReplay::setCreateInstanceCallback</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static Result TrySetCreateInstanceCallback(
|
||||
this CommandReplay replay,
|
||||
CommandReplayCreateInstanceCallbackPtr callback
|
||||
) => PInvoke.CommandReplaySetCreateInstanceCallback(replay, callback);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Sets the create event instance callback.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_setcreateinstancecallback">Studio::CommandReplay::setCreateInstanceCallback</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static void SetCreateInstanceCallback(
|
||||
this CommandReplay replay,
|
||||
CommandReplayCreateInstanceCallbackPtr callback
|
||||
) => TrySetCreateInstanceCallback(replay, callback).Check();
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves user data.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_getuserdata">Studio::CommandReplay::getUserData</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static unsafe Result TryGetUserData(this CommandReplay replay, out nint userData)
|
||||
{
|
||||
fixed (nint* userDataPtr = &userData)
|
||||
return PInvoke.CommandReplayGetUserData(replay, userDataPtr);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves user data.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_getuserdata">Studio::CommandReplay::getUserData</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static nint GetUserData(this CommandReplay replay)
|
||||
{
|
||||
TryGetUserData(replay, out var userData).Check();
|
||||
return userData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Sets user data.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_setuserdata">Studio::CommandReplay::setUserData</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static Result TrySetUserData(this CommandReplay replay, nint userData) =>
|
||||
PInvoke.CommandReplaySetUserData(replay, userData);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Sets user data.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-commandreplay.html#studio_commandreplay_setuserdata">Studio::CommandReplay::setUserData</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static void SetUserData(this CommandReplay replay, nint userData) =>
|
||||
TrySetUserData(replay, userData).Check();
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,121 @@
|
|||
// <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 VCA reference is valid.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-vca.html#studio_vca_isvalid">Studio::VCA::isValid</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static Bool32 IsValid(this Vca vca) => PInvoke.VcaIsValid(vca);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the VCA's GUID.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-vca.html#studio_vca_getid">Studio::VCA::getID</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static unsafe Result TryGetId(this Vca vca, out Guid id)
|
||||
{
|
||||
fixed (Guid* idPtr = &id)
|
||||
return PInvoke.VcaGetId(vca, idPtr);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the VCA's GUID.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-vca.html#studio_vca_getid">Studio::VCA::getID</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static Guid GetId(this Vca vca)
|
||||
{
|
||||
TryGetId(vca, 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-vca.html#studio_vca_getpath">Studio::VCA::getPath</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static unsafe Result TryGetPath(this Vca vca, byte* path, int size, out int retrieved)
|
||||
{
|
||||
fixed (int* retrievedPtr = &retrieved)
|
||||
return PInvoke.VcaGetPath(vca, path, size, retrievedPtr);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the path.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-vca.html#studio_vca_getpath">Studio::VCA::getPath</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static unsafe int GetPath(this Vca vca, byte* path, int size)
|
||||
{
|
||||
TryGetPath(vca, path, size, out var retrieved).Check();
|
||||
return retrieved;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the volume level.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-vca.html#studio_vca_getvolume">Studio::VCA::getVolume</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static unsafe Result TryGetVolume(this Vca vca, out float volume, out float finalVolume)
|
||||
{
|
||||
fixed (float* volumePtr = &volume)
|
||||
fixed (float* finalVolumePtr = &finalVolume)
|
||||
return PInvoke.VcaGetVolume(vca, volumePtr, finalVolumePtr);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Retrieves the volume level.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-vca.html#studio_vca_getvolume">Studio::VCA::getVolume</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static void GetVolume(this Vca vca, out float volume, out float finalVolume) =>
|
||||
TryGetVolume(vca, out volume, out finalVolume).Check();
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Sets the volume level.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-vca.html#studio_vca_setvolume">Studio::VCA::setVolume</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static Result TrySetVolume(this Vca vca, float volume) => PInvoke.VcaSetVolume(vca, volume);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Sets the volume level.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-vca.html#studio_vca_setvolume">Studio::VCA::setVolume</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static void SetVolume(this Vca vca, float volume) => TrySetVolume(vca, volume).Check();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
// <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>
|
||||
/// Parses a GUID from a string.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-common.html#studio_parseid">Studio::parseID</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static unsafe Result TryParseId(RefString8 idString, out Guid id)
|
||||
{
|
||||
fixed (byte* idStringPtr = idString)
|
||||
fixed (Guid* idPtr = &id)
|
||||
return PInvoke.ParseId(idStringPtr, idPtr);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Parses a GUID from a string.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-common.html#studio_parseid">Studio::parseID</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static Guid ParseId(RefString8 idString)
|
||||
{
|
||||
TryParseId(idString, out var id).Check();
|
||||
return id;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// This function creates the studio system.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_create">Studio::System::create</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static unsafe Result TrySystemCreate(out FmodStudioSystem system, uint headerVersion)
|
||||
{
|
||||
fixed (FmodStudioSystem* systemPtr = &system)
|
||||
return PInvoke.SystemCreate(systemPtr, headerVersion);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// This function creates the studio system.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <see href="https://www.fmod.com/docs/2.03/api/studio-api-system.html#studio_system_create">Studio::System::create</see>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static FmodStudioSystem SystemCreate(uint headerVersion)
|
||||
{
|
||||
TrySystemCreate(out var system, headerVersion).Check();
|
||||
return system;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue