//
// Generated by Brutal.Fmod.Generate; do not edit by hand.
#nullable enable
namespace Brutal.FmodApi.Studio
{
public static partial class FmodStudio
{
///
///
/// Checks that the VCA reference is valid.
///
///
/// Studio::VCA::isValid
///
///
public static Bool32 IsValid(this Vca vca) => PInvoke.VcaIsValid(vca);
///
///
/// Retrieves the VCA's GUID.
///
///
/// Studio::VCA::getID
///
///
public static unsafe Result TryGetId(this Vca vca, out Guid id)
{
fixed (Guid* idPtr = &id)
return PInvoke.VcaGetId(vca, idPtr);
}
///
///
/// Retrieves the VCA's GUID.
///
///
/// Studio::VCA::getID
///
///
public static Guid GetId(this Vca vca)
{
TryGetId(vca, out var id).Check();
return id;
}
///
///
/// Retrieves the path.
///
///
/// Studio::VCA::getPath
///
///
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);
}
///
///
/// Retrieves the path.
///
///
/// Studio::VCA::getPath
///
///
public static unsafe int GetPath(this Vca vca, byte* path, int size)
{
TryGetPath(vca, path, size, out var retrieved).Check();
return retrieved;
}
///
///
/// Retrieves the volume level.
///
///
/// Studio::VCA::getVolume
///
///
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);
}
///
///
/// Retrieves the volume level.
///
///
/// Studio::VCA::getVolume
///
///
public static void GetVolume(this Vca vca, out float volume, out float finalVolume) =>
TryGetVolume(vca, out volume, out finalVolume).Check();
///
///
/// Sets the volume level.
///
///
/// Studio::VCA::setVolume
///
///
public static Result TrySetVolume(this Vca vca, float volume) => PInvoke.VcaSetVolume(vca, volume);
///
///
/// Sets the volume level.
///
///
/// Studio::VCA::setVolume
///
///
public static void SetVolume(this Vca vca, float volume) => TrySetVolume(vca, volume).Check();
}
}