// // Generated by Brutal.Fmod.Generate; do not edit by hand. #nullable enable namespace Brutal.FmodApi { public static partial class Fmod { /// /// /// Releases a soundgroup object and returns all sounds back to the master sound group. /// /// /// You cannot release the master SoundGroup. /// /// /// See Also: System::createSoundGroup, System::getMasterSoundGroup /// /// /// SoundGroup::release /// /// public static Result TryRelease(this SoundGroup soundGroup) => PInvoke.SoundGroupRelease(soundGroup); /// /// /// Releases a soundgroup object and returns all sounds back to the master sound group. /// /// /// You cannot release the master SoundGroup. /// /// /// See Also: System::createSoundGroup, System::getMasterSoundGroup /// /// /// SoundGroup::release /// /// public static void Release(this SoundGroup soundGroup) => TryRelease(soundGroup).Check(); /// /// /// Retrieves the parent System object. /// /// /// SoundGroup::getSystemObject /// /// public static unsafe Result TryGetSystemObject(this SoundGroup soundGroup, out FmodSystem system) { fixed (FmodSystem* systemPtr = &system) return PInvoke.SoundGroupGetSystemObject(soundGroup, systemPtr); } /// /// /// Retrieves the parent System object. /// /// /// SoundGroup::getSystemObject /// /// public static FmodSystem GetSystemObject(this SoundGroup soundGroup) { TryGetSystemObject(soundGroup, out var system).Check(); return system; } /// /// /// Sets the maximum number of playbacks to be audible at once in a sound group. /// /// /// SoundGroup::setMaxAudible /// /// public static Result TrySetMaxAudible(this SoundGroup soundGroup, int maxAudible) => PInvoke.SoundGroupSetMaxAudible(soundGroup, maxAudible); /// /// /// Sets the maximum number of playbacks to be audible at once in a sound group. /// /// /// SoundGroup::setMaxAudible /// /// public static void SetMaxAudible(this SoundGroup soundGroup, int maxAudible) => TrySetMaxAudible(soundGroup, maxAudible).Check(); /// /// /// Retrieves the maximum number of playbacks to be audible at once in a sound group. /// /// /// SoundGroup::getMaxAudible /// /// public static unsafe Result TryGetMaxAudible(this SoundGroup soundGroup, out int maxAudible) { fixed (int* maxAudiblePtr = &maxAudible) return PInvoke.SoundGroupGetMaxAudible(soundGroup, maxAudiblePtr); } /// /// /// Retrieves the maximum number of playbacks to be audible at once in a sound group. /// /// /// SoundGroup::getMaxAudible /// /// public static int GetMaxAudible(this SoundGroup soundGroup) { TryGetMaxAudible(soundGroup, out var maxAudible).Check(); return maxAudible; } /// /// /// This function changes the way the sound playback behaves when too many sounds are playing in a /// soundgroup. /// /// /// SoundGroup::setMaxAudibleBehavior /// /// public static Result TrySetMaxAudibleBehavior(this SoundGroup soundGroup, SoundGroupBehavior behavior) => PInvoke.SoundGroupSetMaxAudibleBehavior(soundGroup, behavior); /// /// /// This function changes the way the sound playback behaves when too many sounds are playing in a /// soundgroup. /// /// /// SoundGroup::setMaxAudibleBehavior /// /// public static void SetMaxAudibleBehavior(this SoundGroup soundGroup, SoundGroupBehavior behavior) => TrySetMaxAudibleBehavior(soundGroup, behavior).Check(); /// /// /// Retrieves the current max audible behavior. /// /// /// SoundGroup::getMaxAudibleBehavior /// /// public static unsafe Result TryGetMaxAudibleBehavior( this SoundGroup soundGroup, out SoundGroupBehavior behavior ) { fixed (SoundGroupBehavior* behaviorPtr = &behavior) return PInvoke.SoundGroupGetMaxAudibleBehavior(soundGroup, behaviorPtr); } /// /// /// Retrieves the current max audible behavior. /// /// /// SoundGroup::getMaxAudibleBehavior /// /// public static SoundGroupBehavior GetMaxAudibleBehavior(this SoundGroup soundGroup) { TryGetMaxAudibleBehavior(soundGroup, out var behavior).Check(); return behavior; } /// /// /// Sets a mute fade time. /// /// /// SoundGroup::setMuteFadeSpeed /// /// public static Result TrySetMuteFadeSpeed(this SoundGroup soundGroup, float speed) => PInvoke.SoundGroupSetMuteFadeSpeed(soundGroup, speed); /// /// /// Sets a mute fade time. /// /// /// SoundGroup::setMuteFadeSpeed /// /// public static void SetMuteFadeSpeed(this SoundGroup soundGroup, float speed) => TrySetMuteFadeSpeed(soundGroup, speed).Check(); /// /// /// Retrieves the current mute fade time. /// /// /// SoundGroup::getMuteFadeSpeed /// /// public static unsafe Result TryGetMuteFadeSpeed(this SoundGroup soundGroup, out float speed) { fixed (float* speedPtr = &speed) return PInvoke.SoundGroupGetMuteFadeSpeed(soundGroup, speedPtr); } /// /// /// Retrieves the current mute fade time. /// /// /// SoundGroup::getMuteFadeSpeed /// /// public static float GetMuteFadeSpeed(this SoundGroup soundGroup) { TryGetMuteFadeSpeed(soundGroup, out var speed).Check(); return speed; } /// /// /// Sets the volume of the sound group. /// /// /// SoundGroup::setVolume /// /// public static Result TrySetVolume(this SoundGroup soundGroup, float volume) => PInvoke.SoundGroupSetVolume(soundGroup, volume); /// /// /// Sets the volume of the sound group. /// /// /// SoundGroup::setVolume /// /// public static void SetVolume(this SoundGroup soundGroup, float volume) => TrySetVolume(soundGroup, volume).Check(); /// /// /// Retrieves the volume of the sound group. /// /// /// SoundGroup::getVolume /// /// public static unsafe Result TryGetVolume(this SoundGroup soundGroup, out float volume) { fixed (float* volumePtr = &volume) return PInvoke.SoundGroupGetVolume(soundGroup, volumePtr); } /// /// /// Retrieves the volume of the sound group. /// /// /// SoundGroup::getVolume /// /// public static float GetVolume(this SoundGroup soundGroup) { TryGetVolume(soundGroup, out var volume).Check(); return volume; } /// /// /// Stops all sounds within this soundgroup. /// /// /// See Also: System::playSound /// /// /// SoundGroup::stop /// /// public static Result TryStop(this SoundGroup soundGroup) => PInvoke.SoundGroupStop(soundGroup); /// /// /// Stops all sounds within this soundgroup. /// /// /// See Also: System::playSound /// /// /// SoundGroup::stop /// /// public static void Stop(this SoundGroup soundGroup) => TryStop(soundGroup).Check(); /// /// /// Retrieves the name of the sound group. /// /// /// SoundGroup::getName /// /// public static unsafe Result TryGetName(this SoundGroup soundGroup, byte* name, int nameLen) => PInvoke.SoundGroupGetName(soundGroup, name, nameLen); /// /// /// Retrieves the name of the sound group. /// /// /// SoundGroup::getName /// /// public static unsafe void GetName(this SoundGroup soundGroup, byte* name, int nameLen) => TryGetName(soundGroup, name, nameLen).Check(); /// /// /// Retrieves the current number of sounds in this sound group. /// /// /// SoundGroup::getNumSounds /// /// public static unsafe Result TryGetNumSounds(this SoundGroup soundGroup, out int numSounds) { fixed (int* numSoundsPtr = &numSounds) return PInvoke.SoundGroupGetNumSounds(soundGroup, numSoundsPtr); } /// /// /// Retrieves the current number of sounds in this sound group. /// /// /// SoundGroup::getNumSounds /// /// public static int GetNumSounds(this SoundGroup soundGroup) { TryGetNumSounds(soundGroup, out var numSounds).Check(); return numSounds; } /// /// /// Retrieves a sound. /// /// /// SoundGroup::getSound /// /// public static unsafe Result TryGetSound(this SoundGroup soundGroup, int index, out Sound sound) { fixed (Sound* soundPtr = &sound) return PInvoke.SoundGroupGetSound(soundGroup, index, soundPtr); } /// /// /// Retrieves a sound. /// /// /// SoundGroup::getSound /// /// public static Sound GetSound(this SoundGroup soundGroup, int index) { TryGetSound(soundGroup, index, out var sound).Check(); return sound; } /// /// /// Retrieves the number of currently playing Channels for the SoundGroup. /// /// /// SoundGroup::getNumPlaying /// /// public static unsafe Result TryGetNumPlaying(this SoundGroup soundGroup, out int numPlaying) { fixed (int* numPlayingPtr = &numPlaying) return PInvoke.SoundGroupGetNumPlaying(soundGroup, numPlayingPtr); } /// /// /// Retrieves the number of currently playing Channels for the SoundGroup. /// /// /// SoundGroup::getNumPlaying /// /// public static int GetNumPlaying(this SoundGroup soundGroup) { TryGetNumPlaying(soundGroup, out var numPlaying).Check(); return numPlaying; } /// /// /// Sets a user value associated with this object. /// /// /// SoundGroup::setUserData /// /// public static Result TrySetUserData(this SoundGroup soundGroup, nint userData) => PInvoke.SoundGroupSetUserData(soundGroup, userData); /// /// /// Sets a user value associated with this object. /// /// /// SoundGroup::setUserData /// /// public static void SetUserData(this SoundGroup soundGroup, nint userData) => TrySetUserData(soundGroup, userData).Check(); /// /// /// Retrieves a user value associated with this object. /// /// /// SoundGroup::getUserData /// /// public static unsafe Result TryGetUserData(this SoundGroup soundGroup, out nint userData) { fixed (nint* userDataPtr = &userData) return PInvoke.SoundGroupGetUserData(soundGroup, userDataPtr); } /// /// /// Retrieves a user value associated with this object. /// /// /// SoundGroup::getUserData /// /// public static nint GetUserData(this SoundGroup soundGroup) { TryGetUserData(soundGroup, out var userData).Check(); return userData; } } }