mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
429 lines
16 KiB
C#
429 lines
16 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 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;
|
|
}
|
|
}
|
|
}
|