// // Generated by Brutal.Fmod.Generate; do not edit by hand. #nullable enable namespace Brutal.FmodApi.Studio { public static partial class FmodStudio { /// /// /// Checks that the Bus reference is valid. /// /// /// Studio::Bus::isValid /// /// public static Bool32 IsValid(this Bus bus) => PInvoke.BusIsValid(bus); /// /// /// Retrieves the GUID. /// /// /// Studio::Bus::getID /// /// public static unsafe Result TryGetId(this Bus bus, out Guid id) { fixed (Guid* idPtr = &id) return PInvoke.BusGetId(bus, idPtr); } /// /// /// Retrieves the GUID. /// /// /// Studio::Bus::getID /// /// public static Guid GetId(this Bus bus) { TryGetId(bus, out var id).Check(); return id; } /// /// /// Retrieves the path. /// /// /// Studio::Bus::getPath /// /// 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); } /// /// /// Retrieves the path. /// /// /// Studio::Bus::getPath /// /// public static unsafe int GetPath(this Bus bus, byte* path, int size) { TryGetPath(bus, path, size, out var retrieved).Check(); return retrieved; } /// /// /// Retrieves the volume level. /// /// /// Studio::Bus::getVolume /// /// 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); } /// /// /// Retrieves the volume level. /// /// /// Studio::Bus::getVolume /// /// public static void GetVolume(this Bus bus, out float volume, out float finalVolume) => TryGetVolume(bus, out volume, out finalVolume).Check(); /// /// /// Sets the volume level. /// /// /// Studio::Bus::setVolume /// /// public static Result TrySetVolume(this Bus bus, float volume) => PInvoke.BusSetVolume(bus, volume); /// /// /// Sets the volume level. /// /// /// Studio::Bus::setVolume /// /// public static void SetVolume(this Bus bus, float volume) => TrySetVolume(bus, volume).Check(); /// /// /// Retrieves the pause state. /// /// /// Studio::Bus::getPaused /// /// public static unsafe Result TryGetPaused(this Bus bus, out Bool32 paused) { fixed (Bool32* pausedPtr = &paused) return PInvoke.BusGetPaused(bus, pausedPtr); } /// /// /// Retrieves the pause state. /// /// /// Studio::Bus::getPaused /// /// public static Bool32 GetPaused(this Bus bus) { TryGetPaused(bus, out var paused).Check(); return paused; } /// /// /// Sets the pause state. /// /// /// Studio::Bus::setPaused /// /// public static Result TrySetPaused(this Bus bus, Bool32 paused) => PInvoke.BusSetPaused(bus, paused); /// /// /// Sets the pause state. /// /// /// Studio::Bus::setPaused /// /// public static void SetPaused(this Bus bus, Bool32 paused) => TrySetPaused(bus, paused).Check(); /// /// /// Retrieves the mute state. /// /// /// Studio::Bus::getMute /// /// public static unsafe Result TryGetMute(this Bus bus, out Bool32 mute) { fixed (Bool32* mutePtr = &mute) return PInvoke.BusGetMute(bus, mutePtr); } /// /// /// Retrieves the mute state. /// /// /// Studio::Bus::getMute /// /// public static Bool32 GetMute(this Bus bus) { TryGetMute(bus, out var mute).Check(); return mute; } /// /// /// Sets the mute state. /// /// /// Studio::Bus::setMute /// /// public static Result TrySetMute(this Bus bus, Bool32 mute) => PInvoke.BusSetMute(bus, mute); /// /// /// Sets the mute state. /// /// /// Studio::Bus::setMute /// /// public static void SetMute(this Bus bus, Bool32 mute) => TrySetMute(bus, mute).Check(); /// /// /// Stops all event instances that are routed into the bus. /// /// /// Studio::Bus::stopAllEvents /// /// public static Result TryStopAllEvents(this Bus bus, StopMode mode) => PInvoke.BusStopAllEvents(bus, mode); /// /// /// Stops all event instances that are routed into the bus. /// /// /// Studio::Bus::stopAllEvents /// /// public static void StopAllEvents(this Bus bus, StopMode mode) => TryStopAllEvents(bus, mode).Check(); /// /// /// Retrieves the port index assigned to the bus. /// /// /// Studio::Bus::getPortIndex /// /// public static unsafe Result TryGetPortIndex(this Bus bus, out PortIndex index) { fixed (PortIndex* indexPtr = &index) return PInvoke.BusGetPortIndex(bus, indexPtr); } /// /// /// Retrieves the port index assigned to the bus. /// /// /// Studio::Bus::getPortIndex /// /// public static PortIndex GetPortIndex(this Bus bus) { TryGetPortIndex(bus, out var index).Check(); return index; } /// /// /// Sets the port index to use when attaching to an output port. /// /// /// Studio::Bus::setPortIndex /// /// public static Result TrySetPortIndex(this Bus bus, PortIndex index) => PInvoke.BusSetPortIndex(bus, index); /// /// /// Sets the port index to use when attaching to an output port. /// /// /// Studio::Bus::setPortIndex /// /// public static void SetPortIndex(this Bus bus, PortIndex index) => TrySetPortIndex(bus, index).Check(); /// /// /// Locks the core ChannelGroup. /// /// /// This function forces the system to create the ChannelGroup and keep it available until /// Studio::Bus::unlockChannelGroup is called. See Signal Paths for details. /// /// /// Studio::Bus::lockChannelGroup /// /// public static Result TryLockChannelGroup(this Bus bus) => PInvoke.BusLockChannelGroup(bus); /// /// /// Locks the core ChannelGroup. /// /// /// This function forces the system to create the ChannelGroup and keep it available until /// Studio::Bus::unlockChannelGroup is called. See Signal Paths for details. /// /// /// Studio::Bus::lockChannelGroup /// /// public static void LockChannelGroup(this Bus bus) => TryLockChannelGroup(bus).Check(); /// /// /// Unlocks the core ChannelGroup. /// /// /// This function allows the system to destroy the ChannelGroup when it is not needed. See Signal Paths for /// details. /// /// /// See Also: Studio::Bus::lockChannelGroup /// /// /// Studio::Bus::unlockChannelGroup /// /// public static Result TryUnlockChannelGroup(this Bus bus) => PInvoke.BusUnlockChannelGroup(bus); /// /// /// Unlocks the core ChannelGroup. /// /// /// This function allows the system to destroy the ChannelGroup when it is not needed. See Signal Paths for /// details. /// /// /// See Also: Studio::Bus::lockChannelGroup /// /// /// Studio::Bus::unlockChannelGroup /// /// public static void UnlockChannelGroup(this Bus bus) => TryUnlockChannelGroup(bus).Check(); /// /// /// Retrieves the core ChannelGroup. /// /// /// Studio::Bus::getChannelGroup /// /// public static unsafe Result TryGetChannelGroup(this Bus bus, out ChannelGroup group) { fixed (ChannelGroup* groupPtr = &group) return PInvoke.BusGetChannelGroup(bus, groupPtr); } /// /// /// Retrieves the core ChannelGroup. /// /// /// Studio::Bus::getChannelGroup /// /// public static ChannelGroup GetChannelGroup(this Bus bus) { TryGetChannelGroup(bus, out var group).Check(); return group; } /// /// /// Retrieves the bus CPU usage data. /// /// /// Studio::Bus::getCPUUsage /// /// 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); } /// /// /// Retrieves the bus CPU usage data. /// /// /// Studio::Bus::getCPUUsage /// /// public static void GetCpuUsage(this Bus bus, out uint exclusive, out uint inclusive) => TryGetCpuUsage(bus, out exclusive, out inclusive).Check(); /// /// /// Retrieves memory usage statistics. /// /// /// Studio::Bus::getMemoryUsage /// /// public static unsafe Result TryGetMemoryUsage(this Bus bus, out MemoryUsage memoryUsage) { fixed (MemoryUsage* memoryUsagePtr = &memoryUsage) return PInvoke.BusGetMemoryUsage(bus, memoryUsagePtr); } /// /// /// Retrieves memory usage statistics. /// /// /// Studio::Bus::getMemoryUsage /// /// public static MemoryUsage GetMemoryUsage(this Bus bus) { TryGetMemoryUsage(bus, out var memoryUsage).Check(); return memoryUsage; } } }