// // Generated by Brutal.Fmod.Generate; do not edit by hand. #nullable enable namespace Brutal.FmodApi.Studio { public static partial class FmodStudio { /// /// /// Checks that the System reference is valid and has been initialized. /// /// /// Studio::System::isValid /// /// public static Bool32 IsValid(this FmodStudioSystem system) => PInvoke.SystemIsValid(system); /// /// /// Sets advanced settings. /// /// /// Studio::System::setAdvancedSettings /// /// public static unsafe Result TrySetAdvancedSettings( this FmodStudioSystem system, in StudioAdvancedSettings settings ) { fixed (StudioAdvancedSettings* settingsPtr = &settings) return PInvoke.SystemSetAdvancedSettings(system, settingsPtr); } /// /// /// Sets advanced settings. /// /// /// Studio::System::setAdvancedSettings /// /// public static void SetAdvancedSettings(this FmodStudioSystem system, in StudioAdvancedSettings settings) => TrySetAdvancedSettings(system, settings).Check(); /// /// /// Retrieves advanced settings. /// /// /// Studio::System::getAdvancedSettings /// /// public static unsafe Result TryGetAdvancedSettings( this FmodStudioSystem system, out StudioAdvancedSettings settings ) { fixed (StudioAdvancedSettings* settingsPtr = &settings) return PInvoke.SystemGetAdvancedSettings(system, settingsPtr); } /// /// /// Retrieves advanced settings. /// /// /// Studio::System::getAdvancedSettings /// /// public static StudioAdvancedSettings GetAdvancedSettings(this FmodStudioSystem system) { TryGetAdvancedSettings(system, out var settings).Check(); return settings; } /// /// /// Initializes the Studio System. /// /// /// Studio::System::initialize /// /// public static Result TryInitialize( this FmodStudioSystem system, int maxChannels, StudioInitFlags studioFlags, InitFlags flags, nint extraDriverData ) => PInvoke.SystemInitialize(system, maxChannels, studioFlags, flags, extraDriverData); /// /// /// Initializes the Studio System. /// /// /// Studio::System::initialize /// /// public static void Initialize( this FmodStudioSystem system, int maxChannels, StudioInitFlags studioFlags, InitFlags flags, nint extraDriverData ) => TryInitialize(system, maxChannels, studioFlags, flags, extraDriverData).Check(); /// /// /// Shut down and free the Studio System object. /// /// /// This function will free the memory used by the Studio System object and everything created under it. /// /// /// Studio::System::create and Studio::System::release are not thread-safe. Calling either of these /// functions concurrently with any Studio API function (including these two functions) may cause undefined /// behavior. External synchronization must be used if calls to Studio::System::create or /// Studio::System::release could overlap other Studio API calls. All other Studio API functions are thread /// safe and may be called freely from any thread unless otherwise documented. /// /// /// All handles or pointers to objects associated with a Studio System object become invalid when the Studio /// System object is released. The Studio API attempts to protect against stale handles and pointers being /// used with a different Studio System object but this protection cannot be guaranteed and attempting to /// use stale handles or pointers may cause undefined behavior. /// /// /// See Also: Creating the Studio System /// /// /// Studio::System::release /// /// public static Result TryRelease(this FmodStudioSystem system) => PInvoke.SystemRelease(system); /// /// /// Shut down and free the Studio System object. /// /// /// This function will free the memory used by the Studio System object and everything created under it. /// /// /// Studio::System::create and Studio::System::release are not thread-safe. Calling either of these /// functions concurrently with any Studio API function (including these two functions) may cause undefined /// behavior. External synchronization must be used if calls to Studio::System::create or /// Studio::System::release could overlap other Studio API calls. All other Studio API functions are thread /// safe and may be called freely from any thread unless otherwise documented. /// /// /// All handles or pointers to objects associated with a Studio System object become invalid when the Studio /// System object is released. The Studio API attempts to protect against stale handles and pointers being /// used with a different Studio System object but this protection cannot be guaranteed and attempting to /// use stale handles or pointers may cause undefined behavior. /// /// /// See Also: Creating the Studio System /// /// /// Studio::System::release /// /// public static void Release(this FmodStudioSystem system) => TryRelease(system).Check(); /// /// /// Update the studio system. /// /// /// When Studio is initialized in the default asynchronous processing mode this function submits all /// buffered commands for execution on the Studio Update thread for asynchronous processing. This is a fast /// operation since the commands are not processed on the calling thread. If Studio is initialized with /// FMOD_STUDIO_INIT_DEFERRED_CALLBACKS then any deferred callbacks fired during any asynchronous updates /// since the last call to this function will be called. If an error occurred during any asynchronous /// updates since the last call to this function then this function will return the error result. /// /// /// When Studio is initialized with FMOD_STUDIO_INIT_SYNCHRONOUS_UPDATE queued commands will be processed /// immediately when calling this function, the scheduling and update logic for the Studio system are /// executed and all callbacks are fired. This may block the calling thread for a substantial amount of /// time. /// /// /// See Also: Studio System Processing /// /// /// Studio::System::update /// /// public static Result TryUpdate(this FmodStudioSystem system) => PInvoke.SystemUpdate(system); /// /// /// Update the studio system. /// /// /// When Studio is initialized in the default asynchronous processing mode this function submits all /// buffered commands for execution on the Studio Update thread for asynchronous processing. This is a fast /// operation since the commands are not processed on the calling thread. If Studio is initialized with /// FMOD_STUDIO_INIT_DEFERRED_CALLBACKS then any deferred callbacks fired during any asynchronous updates /// since the last call to this function will be called. If an error occurred during any asynchronous /// updates since the last call to this function then this function will return the error result. /// /// /// When Studio is initialized with FMOD_STUDIO_INIT_SYNCHRONOUS_UPDATE queued commands will be processed /// immediately when calling this function, the scheduling and update logic for the Studio system are /// executed and all callbacks are fired. This may block the calling thread for a substantial amount of /// time. /// /// /// See Also: Studio System Processing /// /// /// Studio::System::update /// /// public static void Update(this FmodStudioSystem system) => TryUpdate(system).Check(); /// /// /// Retrieves the Core System. /// /// /// Studio::System::getCoreSystem /// /// public static unsafe Result TryGetCoreSystem(this FmodStudioSystem system, out FmodSystem coreSystem) { fixed (FmodSystem* coreSystemPtr = &coreSystem) return PInvoke.SystemGetCoreSystem(system, coreSystemPtr); } /// /// /// Retrieves the Core System. /// /// /// Studio::System::getCoreSystem /// /// public static FmodSystem GetCoreSystem(this FmodStudioSystem system) { TryGetCoreSystem(system, out var coreSystem).Check(); return coreSystem; } /// /// /// Retrieves an EventDescription of an event or snapshot with the specified file path. /// /// /// Studio::System::getEvent /// /// public static unsafe Result TryGetEvent( this FmodStudioSystem system, RefString8 pathOrId, out EventDescription eventDescription ) { fixed (byte* pathOrIdPtr = pathOrId) fixed (EventDescription* eventDescriptionPtr = &eventDescription) return PInvoke.SystemGetEvent(system, pathOrIdPtr, eventDescriptionPtr); } /// /// /// Retrieves an EventDescription of an event or snapshot with the specified file path. /// /// /// Studio::System::getEvent /// /// public static EventDescription GetEvent(this FmodStudioSystem system, RefString8 pathOrId) { TryGetEvent(system, pathOrId, out var eventDescription).Check(); return eventDescription; } /// /// /// Retrieves a loaded bus. /// /// /// Studio::System::getBus /// /// public static unsafe Result TryGetBus(this FmodStudioSystem system, RefString8 pathOrId, out Bus bus) { fixed (byte* pathOrIdPtr = pathOrId) fixed (Bus* busPtr = &bus) return PInvoke.SystemGetBus(system, pathOrIdPtr, busPtr); } /// /// /// Retrieves a loaded bus. /// /// /// Studio::System::getBus /// /// public static Bus GetBus(this FmodStudioSystem system, RefString8 pathOrId) { TryGetBus(system, pathOrId, out var bus).Check(); return bus; } /// /// /// Retrieves a loaded VCA. /// /// /// Studio::System::getVCA /// /// public static unsafe Result TryGetVca(this FmodStudioSystem system, RefString8 pathOrId, out Vca vca) { fixed (byte* pathOrIdPtr = pathOrId) fixed (Vca* vcaPtr = &vca) return PInvoke.SystemGetVca(system, pathOrIdPtr, vcaPtr); } /// /// /// Retrieves a loaded VCA. /// /// /// Studio::System::getVCA /// /// public static Vca GetVca(this FmodStudioSystem system, RefString8 pathOrId) { TryGetVca(system, pathOrId, out var vca).Check(); return vca; } /// /// /// Retrieves a loaded bank with the specified file path. /// /// /// Studio::System::getBank /// /// public static unsafe Result TryGetBank(this FmodStudioSystem system, RefString8 pathOrId, out Bank bank) { fixed (byte* pathOrIdPtr = pathOrId) fixed (Bank* bankPtr = &bank) return PInvoke.SystemGetBank(system, pathOrIdPtr, bankPtr); } /// /// /// Retrieves a loaded bank with the specified file path. /// /// /// Studio::System::getBank /// /// public static Bank GetBank(this FmodStudioSystem system, RefString8 pathOrId) { TryGetBank(system, pathOrId, out var bank).Check(); return bank; } /// /// /// Retrieves an EventDescription. /// /// /// Studio::System::getEventByID /// /// public static unsafe Result TryGetEventById( this FmodStudioSystem system, in Guid id, out EventDescription eventDescription ) { fixed (Guid* idPtr = &id) fixed (EventDescription* eventDescriptionPtr = &eventDescription) return PInvoke.SystemGetEventById(system, idPtr, eventDescriptionPtr); } /// /// /// Retrieves an EventDescription. /// /// /// Studio::System::getEventByID /// /// public static EventDescription GetEventById(this FmodStudioSystem system, in Guid id) { TryGetEventById(system, id, out var eventDescription).Check(); return eventDescription; } /// /// /// Retrieves a loaded bus. /// /// /// Studio::System::getBusByID /// /// public static unsafe Result TryGetBusById(this FmodStudioSystem system, in Guid id, out Bus bus) { fixed (Guid* idPtr = &id) fixed (Bus* busPtr = &bus) return PInvoke.SystemGetBusById(system, idPtr, busPtr); } /// /// /// Retrieves a loaded bus. /// /// /// Studio::System::getBusByID /// /// public static Bus GetBusById(this FmodStudioSystem system, in Guid id) { TryGetBusById(system, id, out var bus).Check(); return bus; } /// /// /// Retrieves a loaded VCA. /// /// /// Studio::System::getVCAByID /// /// public static unsafe Result TryGetVcaById(this FmodStudioSystem system, in Guid id, out Vca vca) { fixed (Guid* idPtr = &id) fixed (Vca* vcaPtr = &vca) return PInvoke.SystemGetVcaById(system, idPtr, vcaPtr); } /// /// /// Retrieves a loaded VCA. /// /// /// Studio::System::getVCAByID /// /// public static Vca GetVcaById(this FmodStudioSystem system, in Guid id) { TryGetVcaById(system, id, out var vca).Check(); return vca; } /// /// /// Retrieves a loaded bank with the specified ID. /// /// /// Studio::System::getBankByID /// /// public static unsafe Result TryGetBankById(this FmodStudioSystem system, in Guid id, out Bank bank) { fixed (Guid* idPtr = &id) fixed (Bank* bankPtr = &bank) return PInvoke.SystemGetBankById(system, idPtr, bankPtr); } /// /// /// Retrieves a loaded bank with the specified ID. /// /// /// Studio::System::getBankByID /// /// public static Bank GetBankById(this FmodStudioSystem system, in Guid id) { TryGetBankById(system, id, out var bank).Check(); return bank; } /// /// /// Retrieves information for loading a sound from the audio table. /// /// /// Studio::System::getSoundInfo /// /// public static unsafe Result TryGetSoundInfo(this FmodStudioSystem system, RefString8 key, out SoundInfo info) { fixed (byte* keyPtr = key) fixed (SoundInfo* infoPtr = &info) return PInvoke.SystemGetSoundInfo(system, keyPtr, infoPtr); } /// /// /// Retrieves information for loading a sound from the audio table. /// /// /// Studio::System::getSoundInfo /// /// public static SoundInfo GetSoundInfo(this FmodStudioSystem system, RefString8 key) { TryGetSoundInfo(system, key, out var info).Check(); return info; } /// /// /// Retrieves a global parameter by name, including the path if needed. /// /// /// Studio::System::getParameterDescriptionByName /// /// public static unsafe Result TryGetParameterDescriptionByName( this FmodStudioSystem system, RefString8 name, out ParameterDescription parameter ) { fixed (byte* namePtr = name) fixed (ParameterDescription* parameterPtr = ¶meter) return PInvoke.SystemGetParameterDescriptionByName(system, namePtr, parameterPtr); } /// /// /// Retrieves a global parameter by name, including the path if needed. /// /// /// Studio::System::getParameterDescriptionByName /// /// public static ParameterDescription GetParameterDescriptionByName(this FmodStudioSystem system, RefString8 name) { TryGetParameterDescriptionByName(system, name, out var parameter).Check(); return parameter; } /// /// /// Retrieves a global parameter by ID. /// /// /// Studio::System::getParameterDescriptionByID /// /// public static unsafe Result TryGetParameterDescriptionById( this FmodStudioSystem system, ParameterId id, out ParameterDescription parameter ) { fixed (ParameterDescription* parameterPtr = ¶meter) return PInvoke.SystemGetParameterDescriptionById(system, id, parameterPtr); } /// /// /// Retrieves a global parameter by ID. /// /// /// Studio::System::getParameterDescriptionByID /// /// public static ParameterDescription GetParameterDescriptionById(this FmodStudioSystem system, ParameterId id) { TryGetParameterDescriptionById(system, id, out var parameter).Check(); return parameter; } /// /// /// Retrieves a global parameter label by name, including the path if needed. /// /// /// Studio::System::getParameterLabelByName /// /// public static unsafe Result TryGetParameterLabelByName( this FmodStudioSystem system, RefString8 name, int labelIndex, byte* label, int size, out int retrieved ) { fixed (byte* namePtr = name) fixed (int* retrievedPtr = &retrieved) return PInvoke.SystemGetParameterLabelByName(system, namePtr, labelIndex, label, size, retrievedPtr); } /// /// /// Retrieves a global parameter label by name, including the path if needed. /// /// /// Studio::System::getParameterLabelByName /// /// public static unsafe int GetParameterLabelByName( this FmodStudioSystem system, RefString8 name, int labelIndex, byte* label, int size ) { TryGetParameterLabelByName(system, name, labelIndex, label, size, out var retrieved).Check(); return retrieved; } /// /// /// Retrieves a global parameter label by ID. /// /// /// Studio::System::getParameterLabelByID /// /// public static unsafe Result TryGetParameterLabelById( this FmodStudioSystem system, ParameterId id, int labelIndex, byte* label, int size, out int retrieved ) { fixed (int* retrievedPtr = &retrieved) return PInvoke.SystemGetParameterLabelById(system, id, labelIndex, label, size, retrievedPtr); } /// /// /// Retrieves a global parameter label by ID. /// /// /// Studio::System::getParameterLabelByID /// /// public static unsafe int GetParameterLabelById( this FmodStudioSystem system, ParameterId id, int labelIndex, byte* label, int size ) { TryGetParameterLabelById(system, id, labelIndex, label, size, out var retrieved).Check(); return retrieved; } /// /// /// Retrieves a global parameter value by unique identifier. /// /// /// Studio::System::getParameterByID /// /// public static unsafe Result TryGetParameterById( this FmodStudioSystem system, ParameterId id, out float value, out float finalValue ) { fixed (float* valuePtr = &value) fixed (float* finalValuePtr = &finalValue) return PInvoke.SystemGetParameterById(system, id, valuePtr, finalValuePtr); } /// /// /// Retrieves a global parameter value by unique identifier. /// /// /// Studio::System::getParameterByID /// /// public static void GetParameterById( this FmodStudioSystem system, ParameterId id, out float value, out float finalValue ) => TryGetParameterById(system, id, out value, out finalValue).Check(); /// /// /// Sets a global parameter value by unique identifier. /// /// /// Studio::System::setParameterByID /// /// public static Result TrySetParameterById( this FmodStudioSystem system, ParameterId id, float value, Bool32 ignoreSeekSpeed ) => PInvoke.SystemSetParameterById(system, id, value, ignoreSeekSpeed); /// /// /// Sets a global parameter value by unique identifier. /// /// /// Studio::System::setParameterByID /// /// public static void SetParameterById( this FmodStudioSystem system, ParameterId id, float value, Bool32 ignoreSeekSpeed ) => TrySetParameterById(system, id, value, ignoreSeekSpeed).Check(); /// /// /// Sets a global parameter value by unique identifier, looking up the value label. /// /// /// Studio::System::setParameterByIDWithLabel /// /// public static unsafe Result TrySetParameterByIdWithLabel( this FmodStudioSystem system, ParameterId id, RefString8 label, Bool32 ignoreSeekSpeed ) { fixed (byte* labelPtr = label) return PInvoke.SystemSetParameterByIdWithLabel(system, id, labelPtr, ignoreSeekSpeed); } /// /// /// Sets a global parameter value by unique identifier, looking up the value label. /// /// /// Studio::System::setParameterByIDWithLabel /// /// public static void SetParameterByIdWithLabel( this FmodStudioSystem system, ParameterId id, RefString8 label, Bool32 ignoreSeekSpeed ) => TrySetParameterByIdWithLabel(system, id, label, ignoreSeekSpeed).Check(); /// /// /// Sets multiple global parameter values by unique identifier. /// /// /// Studio::System::setParametersByIDs /// /// public static unsafe Result TrySetParametersByIDs( this FmodStudioSystem system, ParameterId* ids, float* values, int count, Bool32 ignoreSeekSpeed ) => PInvoke.SystemSetParametersByIDs(system, ids, values, count, ignoreSeekSpeed); /// /// /// Sets multiple global parameter values by unique identifier. /// /// /// Studio::System::setParametersByIDs /// /// public static unsafe void SetParametersByIDs( this FmodStudioSystem system, ParameterId* ids, float* values, int count, Bool32 ignoreSeekSpeed ) => TrySetParametersByIDs(system, ids, values, count, ignoreSeekSpeed).Check(); /// /// /// Retrieves a global parameter value by name, including the path if needed. /// /// /// Studio::System::getParameterByName /// /// public static unsafe Result TryGetParameterByName( this FmodStudioSystem system, RefString8 name, out float value, out float finalValue ) { fixed (byte* namePtr = name) fixed (float* valuePtr = &value) fixed (float* finalValuePtr = &finalValue) return PInvoke.SystemGetParameterByName(system, namePtr, valuePtr, finalValuePtr); } /// /// /// Retrieves a global parameter value by name, including the path if needed. /// /// /// Studio::System::getParameterByName /// /// public static void GetParameterByName( this FmodStudioSystem system, RefString8 name, out float value, out float finalValue ) => TryGetParameterByName(system, name, out value, out finalValue).Check(); /// /// /// Sets a global parameter value by name, including the path if needed. /// /// /// Studio::System::setParameterByName /// /// public static unsafe Result TrySetParameterByName( this FmodStudioSystem system, RefString8 name, float value, Bool32 ignoreSeekSpeed ) { fixed (byte* namePtr = name) return PInvoke.SystemSetParameterByName(system, namePtr, value, ignoreSeekSpeed); } /// /// /// Sets a global parameter value by name, including the path if needed. /// /// /// Studio::System::setParameterByName /// /// public static void SetParameterByName( this FmodStudioSystem system, RefString8 name, float value, Bool32 ignoreSeekSpeed ) => TrySetParameterByName(system, name, value, ignoreSeekSpeed).Check(); /// /// /// Sets a global parameter value by name, including the path if needed, looking up the value label. /// /// /// Studio::System::setParameterByNameWithLabel /// /// public static unsafe Result TrySetParameterByNameWithLabel( this FmodStudioSystem system, RefString8 name, RefString8 label, Bool32 ignoreSeekSpeed ) { fixed (byte* namePtr = name) fixed (byte* labelPtr = label) return PInvoke.SystemSetParameterByNameWithLabel(system, namePtr, labelPtr, ignoreSeekSpeed); } /// /// /// Sets a global parameter value by name, including the path if needed, looking up the value label. /// /// /// Studio::System::setParameterByNameWithLabel /// /// public static void SetParameterByNameWithLabel( this FmodStudioSystem system, RefString8 name, RefString8 label, Bool32 ignoreSeekSpeed ) => TrySetParameterByNameWithLabel(system, name, label, ignoreSeekSpeed).Check(); /// /// /// Retrieves the ID for a bank, event, snapshot, bus or VCA. /// /// /// Studio::System::lookupID /// /// public static unsafe Result TryLookupId(this FmodStudioSystem system, RefString8 path, out Guid id) { fixed (byte* pathPtr = path) fixed (Guid* idPtr = &id) return PInvoke.SystemLookupId(system, pathPtr, idPtr); } /// /// /// Retrieves the ID for a bank, event, snapshot, bus or VCA. /// /// /// Studio::System::lookupID /// /// public static Guid LookupId(this FmodStudioSystem system, RefString8 path) { TryLookupId(system, path, out var id).Check(); return id; } /// /// /// Retrieves the path for a bank, event, snapshot, bus or VCA. /// /// /// Studio::System::lookupPath /// /// public static unsafe Result TryLookupPath( this FmodStudioSystem system, in Guid id, byte* path, int size, out int retrieved ) { fixed (Guid* idPtr = &id) fixed (int* retrievedPtr = &retrieved) return PInvoke.SystemLookupPath(system, idPtr, path, size, retrievedPtr); } /// /// /// Retrieves the path for a bank, event, snapshot, bus or VCA. /// /// /// Studio::System::lookupPath /// /// public static unsafe int LookupPath(this FmodStudioSystem system, in Guid id, byte* path, int size) { TryLookupPath(system, id, path, size, out var retrieved).Check(); return retrieved; } /// /// /// Retrieves the number of listeners. /// /// /// Studio::System::getNumListeners /// /// public static unsafe Result TryGetNumListeners(this FmodStudioSystem system, out int numListeners) { fixed (int* numListenersPtr = &numListeners) return PInvoke.SystemGetNumListeners(system, numListenersPtr); } /// /// /// Retrieves the number of listeners. /// /// /// Studio::System::getNumListeners /// /// public static int GetNumListeners(this FmodStudioSystem system) { TryGetNumListeners(system, out var numListeners).Check(); return numListeners; } /// /// /// Sets the number of listeners in the 3D sound scene. /// /// /// Studio::System::setNumListeners /// /// public static Result TrySetNumListeners(this FmodStudioSystem system, int numListeners) => PInvoke.SystemSetNumListeners(system, numListeners); /// /// /// Sets the number of listeners in the 3D sound scene. /// /// /// Studio::System::setNumListeners /// /// public static void SetNumListeners(this FmodStudioSystem system, int numListeners) => TrySetNumListeners(system, numListeners).Check(); /// /// /// Retrieves listener 3D attributes. /// /// /// Studio::System::getListenerAttributes /// /// public static unsafe Result TryGetListenerAttributes( this FmodStudioSystem system, int index, out Attributes3d attributes, out float3 attenuationPosition ) { fixed (Attributes3d* attributesPtr = &attributes) fixed (float3* attenuationPositionPtr = &attenuationPosition) return PInvoke.SystemGetListenerAttributes(system, index, attributesPtr, attenuationPositionPtr); } /// /// /// Retrieves listener 3D attributes. /// /// /// Studio::System::getListenerAttributes /// /// public static void GetListenerAttributes( this FmodStudioSystem system, int index, out Attributes3d attributes, out float3 attenuationPosition ) => TryGetListenerAttributes(system, index, out attributes, out attenuationPosition).Check(); /// /// /// Sets the 3D attributes of the listener. /// /// /// Studio::System::setListenerAttributes /// /// public static unsafe Result TrySetListenerAttributes( this FmodStudioSystem system, int index, in Attributes3d attributes, in float3 attenuationPosition ) { fixed (Attributes3d* attributesPtr = &attributes) fixed (float3* attenuationPositionPtr = &attenuationPosition) return PInvoke.SystemSetListenerAttributes(system, index, attributesPtr, attenuationPositionPtr); } /// /// /// Sets the 3D attributes of the listener. /// /// /// Studio::System::setListenerAttributes /// /// public static void SetListenerAttributes( this FmodStudioSystem system, int index, in Attributes3d attributes, in float3 attenuationPosition ) => TrySetListenerAttributes(system, index, attributes, attenuationPosition).Check(); /// /// /// Retrieves listener weighting. /// /// /// Studio::System::getListenerWeight /// /// public static unsafe Result TryGetListenerWeight(this FmodStudioSystem system, int index, out float weight) { fixed (float* weightPtr = &weight) return PInvoke.SystemGetListenerWeight(system, index, weightPtr); } /// /// /// Retrieves listener weighting. /// /// /// Studio::System::getListenerWeight /// /// public static float GetListenerWeight(this FmodStudioSystem system, int index) { TryGetListenerWeight(system, index, out var weight).Check(); return weight; } /// /// /// Sets the listener weighting. /// /// /// Studio::System::setListenerWeight /// /// public static Result TrySetListenerWeight(this FmodStudioSystem system, int index, float weight) => PInvoke.SystemSetListenerWeight(system, index, weight); /// /// /// Sets the listener weighting. /// /// /// Studio::System::setListenerWeight /// /// public static void SetListenerWeight(this FmodStudioSystem system, int index, float weight) => TrySetListenerWeight(system, index, weight).Check(); /// /// /// Loads the metadata of a bank. This does not load the bank's sample data. /// /// /// Studio::System::loadBankFile /// /// public static unsafe Result TryLoadBankFile( this FmodStudioSystem system, RefString8 fileName, LoadBankFlags flags, out Bank bank ) { fixed (byte* fileNamePtr = fileName) fixed (Bank* bankPtr = &bank) return PInvoke.SystemLoadBankFile(system, fileNamePtr, flags, bankPtr); } /// /// /// Loads the metadata of a bank. This does not load the bank's sample data. /// /// /// Studio::System::loadBankFile /// /// public static Bank LoadBankFile(this FmodStudioSystem system, RefString8 fileName, LoadBankFlags flags) { TryLoadBankFile(system, fileName, flags, out var bank).Check(); return bank; } /// /// /// Loads the metadata of a bank from memory. Does not load the bank's sample data. /// /// /// Studio::System::loadBankMemory /// /// public static unsafe Result TryLoadBankMemory( this FmodStudioSystem system, RefString8 buffer, int length, LoadMemoryMode mode, LoadBankFlags flags, out Bank bank ) { fixed (byte* bufferPtr = buffer) fixed (Bank* bankPtr = &bank) return PInvoke.SystemLoadBankMemory(system, bufferPtr, length, mode, flags, bankPtr); } /// /// /// Loads the metadata of a bank from memory. Does not load the bank's sample data. /// /// /// Studio::System::loadBankMemory /// /// public static Bank LoadBankMemory( this FmodStudioSystem system, RefString8 buffer, int length, LoadMemoryMode mode, LoadBankFlags flags ) { TryLoadBankMemory(system, buffer, length, mode, flags, out var bank).Check(); return bank; } /// /// /// Loads the metadata of a bank using custom read callbacks. /// /// /// Studio::System::loadBankCustom /// /// public static unsafe Result TryLoadBankCustom( this FmodStudioSystem system, in BankInfo info, LoadBankFlags flags, out Bank bank ) { fixed (BankInfo* infoPtr = &info) fixed (Bank* bankPtr = &bank) return PInvoke.SystemLoadBankCustom(system, infoPtr, flags, bankPtr); } /// /// /// Loads the metadata of a bank using custom read callbacks. /// /// /// Studio::System::loadBankCustom /// /// public static Bank LoadBankCustom(this FmodStudioSystem system, in BankInfo info, LoadBankFlags flags) { TryLoadBankCustom(system, info, flags, out var bank).Check(); return bank; } /// /// /// Registers a DSP plug-in. /// /// /// Studio::System::registerPlugin /// /// public static unsafe Result TryRegisterPlugin(this FmodStudioSystem system, in DspDescription description) { fixed (DspDescription* descriptionPtr = &description) return PInvoke.SystemRegisterPlugin(system, descriptionPtr); } /// /// /// Registers a DSP plug-in. /// /// /// Studio::System::registerPlugin /// /// public static void RegisterPlugin(this FmodStudioSystem system, in DspDescription description) => TryRegisterPlugin(system, description).Check(); /// /// /// Unregisters a DSP plug-in. /// /// /// Studio::System::unregisterPlugin /// /// public static unsafe Result TryUnregisterPlugin(this FmodStudioSystem system, RefString8 name) { fixed (byte* namePtr = name) return PInvoke.SystemUnregisterPlugin(system, namePtr); } /// /// /// Unregisters a DSP plug-in. /// /// /// Studio::System::unregisterPlugin /// /// public static void UnregisterPlugin(this FmodStudioSystem system, RefString8 name) => TryUnregisterPlugin(system, name).Check(); /// /// /// Unloads all currently loaded banks. /// /// /// See Also: Studio::System::loadBankFile, Studio::System::loadBankMemory, /// Studio::System::loadBankCustom /// /// /// Studio::System::unloadAll /// /// public static Result TryUnloadAll(this FmodStudioSystem system) => PInvoke.SystemUnloadAll(system); /// /// /// Unloads all currently loaded banks. /// /// /// See Also: Studio::System::loadBankFile, Studio::System::loadBankMemory, /// Studio::System::loadBankCustom /// /// /// Studio::System::unloadAll /// /// public static void UnloadAll(this FmodStudioSystem system) => TryUnloadAll(system).Check(); /// /// /// Block until all pending commands have been executed. /// /// /// This function blocks the calling thread until all pending commands have been executed and all /// non-blocking bank loads have been completed. /// /// /// This is equivalent to calling Studio::System::update and then sleeping until the asynchronous thread has /// finished executing all pending commands. /// /// /// See Also: Studio::System::initialize, Studio::System::update, Studio::System::flushSampleLoading /// /// /// Studio::System::flushCommands /// /// public static Result TryFlushCommands(this FmodStudioSystem system) => PInvoke.SystemFlushCommands(system); /// /// /// Block until all pending commands have been executed. /// /// /// This function blocks the calling thread until all pending commands have been executed and all /// non-blocking bank loads have been completed. /// /// /// This is equivalent to calling Studio::System::update and then sleeping until the asynchronous thread has /// finished executing all pending commands. /// /// /// See Also: Studio::System::initialize, Studio::System::update, Studio::System::flushSampleLoading /// /// /// Studio::System::flushCommands /// /// public static void FlushCommands(this FmodStudioSystem system) => TryFlushCommands(system).Check(); /// /// /// Block until all sample loading and unloading has completed. /// /// /// See Also: Studio::System::flushCommands, Sample Data Loading /// /// /// Studio::System::flushSampleLoading /// /// public static Result TryFlushSampleLoading(this FmodStudioSystem system) => PInvoke.SystemFlushSampleLoading(system); /// /// /// Block until all sample loading and unloading has completed. /// /// /// See Also: Studio::System::flushCommands, Sample Data Loading /// /// /// Studio::System::flushSampleLoading /// /// public static void FlushSampleLoading(this FmodStudioSystem system) => TryFlushSampleLoading(system).Check(); /// /// /// Start recording Studio API commands to a file. /// /// /// Studio::System::startCommandCapture /// /// public static unsafe Result TryStartCommandCapture( this FmodStudioSystem system, RefString8 fileName, CommandCaptureFlags flags ) { fixed (byte* fileNamePtr = fileName) return PInvoke.SystemStartCommandCapture(system, fileNamePtr, flags); } /// /// /// Start recording Studio API commands to a file. /// /// /// Studio::System::startCommandCapture /// /// public static void StartCommandCapture( this FmodStudioSystem system, RefString8 fileName, CommandCaptureFlags flags ) => TryStartCommandCapture(system, fileName, flags).Check(); /// /// /// Stop recording Studio API commands. /// /// /// See Also: Studio::System::startCommandCapture, Studio::System::loadCommandReplay /// /// /// Studio::System::stopCommandCapture /// /// public static Result TryStopCommandCapture(this FmodStudioSystem system) => PInvoke.SystemStopCommandCapture(system); /// /// /// Stop recording Studio API commands. /// /// /// See Also: Studio::System::startCommandCapture, Studio::System::loadCommandReplay /// /// /// Studio::System::stopCommandCapture /// /// public static void StopCommandCapture(this FmodStudioSystem system) => TryStopCommandCapture(system).Check(); /// /// /// Load a command replay. /// /// /// Studio::System::loadCommandReplay /// /// public static unsafe Result TryLoadCommandReplay( this FmodStudioSystem system, RefString8 fileName, CommandReplayFlags flags, out CommandReplay replay ) { fixed (byte* fileNamePtr = fileName) fixed (CommandReplay* replayPtr = &replay) return PInvoke.SystemLoadCommandReplay(system, fileNamePtr, flags, replayPtr); } /// /// /// Load a command replay. /// /// /// Studio::System::loadCommandReplay /// /// public static CommandReplay LoadCommandReplay( this FmodStudioSystem system, RefString8 fileName, CommandReplayFlags flags ) { TryLoadCommandReplay(system, fileName, flags, out var replay).Check(); return replay; } /// /// /// Retrieves the number of currently-loaded banks. /// /// /// Studio::System::getBankCount /// /// public static unsafe Result TryGetBankCount(this FmodStudioSystem system, out int count) { fixed (int* countPtr = &count) return PInvoke.SystemGetBankCount(system, countPtr); } /// /// /// Retrieves the number of currently-loaded banks. /// /// /// Studio::System::getBankCount /// /// public static int GetBankCount(this FmodStudioSystem system) { TryGetBankCount(system, out var count).Check(); return count; } /// /// /// Retrieves a list of the currently-loaded banks. /// /// /// Studio::System::getBankList /// /// public static unsafe Result TryGetBankList( this FmodStudioSystem system, out Bank array, int capacity, out int count ) { fixed (Bank* arrayPtr = &array) fixed (int* countPtr = &count) return PInvoke.SystemGetBankList(system, arrayPtr, capacity, countPtr); } /// /// /// Retrieves a list of the currently-loaded banks. /// /// /// Studio::System::getBankList /// /// public static void GetBankList(this FmodStudioSystem system, out Bank array, int capacity, out int count) => TryGetBankList(system, out array, capacity, out count).Check(); /// /// /// Retrieves the number of global parameters. /// /// /// Studio::System::getParameterDescriptionCount /// /// public static unsafe Result TryGetParameterDescriptionCount(this FmodStudioSystem system, out int count) { fixed (int* countPtr = &count) return PInvoke.SystemGetParameterDescriptionCount(system, countPtr); } /// /// /// Retrieves the number of global parameters. /// /// /// Studio::System::getParameterDescriptionCount /// /// public static int GetParameterDescriptionCount(this FmodStudioSystem system) { TryGetParameterDescriptionCount(system, out var count).Check(); return count; } /// /// /// Retrieves a list of global parameters. /// /// /// Studio::System::getParameterDescriptionList /// /// public static unsafe Result TryGetParameterDescriptionList( this FmodStudioSystem system, out ParameterDescription array, int capacity, out int count ) { fixed (ParameterDescription* arrayPtr = &array) fixed (int* countPtr = &count) return PInvoke.SystemGetParameterDescriptionList(system, arrayPtr, capacity, countPtr); } /// /// /// Retrieves a list of global parameters. /// /// /// Studio::System::getParameterDescriptionList /// /// public static void GetParameterDescriptionList( this FmodStudioSystem system, out ParameterDescription array, int capacity, out int count ) => TryGetParameterDescriptionList(system, out array, capacity, out count).Check(); /// /// /// Retrieves the amount of CPU used for different parts of the FMOD Engine. /// /// /// Studio::System::getCPUUsage /// /// public static unsafe Result TryGetCpuUsage( this FmodStudioSystem system, out StudioCpuUsage usage, out CpuUsage usageCore ) { fixed (StudioCpuUsage* usagePtr = &usage) fixed (CpuUsage* usageCorePtr = &usageCore) return PInvoke.SystemGetCpuUsage(system, usagePtr, usageCorePtr); } /// /// /// Retrieves the amount of CPU used for different parts of the FMOD Engine. /// /// /// Studio::System::getCPUUsage /// /// public static void GetCpuUsage( this FmodStudioSystem system, out StudioCpuUsage usage, out CpuUsage usageCore ) => TryGetCpuUsage(system, out usage, out usageCore).Check(); /// /// /// Retrieves buffer usage information. /// /// /// Studio::System::getBufferUsage /// /// public static unsafe Result TryGetBufferUsage(this FmodStudioSystem system, out BufferUsage usage) { fixed (BufferUsage* usagePtr = &usage) return PInvoke.SystemGetBufferUsage(system, usagePtr); } /// /// /// Retrieves buffer usage information. /// /// /// Studio::System::getBufferUsage /// /// public static BufferUsage GetBufferUsage(this FmodStudioSystem system) { TryGetBufferUsage(system, out var usage).Check(); return usage; } /// /// /// Resets memory buffer usage statistics. /// /// /// This function resets the buffer usage data tracked by the Studio system. /// /// /// See Also: FMOD_STUDIO_BUFFER_USAGE, Studio::System::getBufferUsage /// /// /// Studio::System::resetBufferUsage /// /// public static Result TryResetBufferUsage(this FmodStudioSystem system) => PInvoke.SystemResetBufferUsage(system); /// /// /// Resets memory buffer usage statistics. /// /// /// This function resets the buffer usage data tracked by the Studio system. /// /// /// See Also: FMOD_STUDIO_BUFFER_USAGE, Studio::System::getBufferUsage /// /// /// Studio::System::resetBufferUsage /// /// public static void ResetBufferUsage(this FmodStudioSystem system) => TryResetBufferUsage(system).Check(); /// /// /// Sets a callback for the Studio System. /// /// /// Studio::System::setCallback /// /// public static Result TrySetCallback( this FmodStudioSystem system, StudioSystemCallbackPtr callback, StudioSystemCallbackType callbackMask ) => PInvoke.SystemSetCallback(system, callback, callbackMask); /// /// /// Sets a callback for the Studio System. /// /// /// Studio::System::setCallback /// /// public static void SetCallback( this FmodStudioSystem system, StudioSystemCallbackPtr callback, StudioSystemCallbackType callbackMask ) => TrySetCallback(system, callback, callbackMask).Check(); /// /// /// Sets the user data. /// /// /// Studio::System::setUserData /// /// public static Result TrySetUserData(this FmodStudioSystem system, nint userData) => PInvoke.SystemSetUserData(system, userData); /// /// /// Sets the user data. /// /// /// Studio::System::setUserData /// /// public static void SetUserData(this FmodStudioSystem system, nint userData) => TrySetUserData(system, userData).Check(); /// /// /// Retrieves the user data. /// /// /// Studio::System::getUserData /// /// public static unsafe Result TryGetUserData(this FmodStudioSystem system, out nint userData) { fixed (nint* userDataPtr = &userData) return PInvoke.SystemGetUserData(system, userDataPtr); } /// /// /// Retrieves the user data. /// /// /// Studio::System::getUserData /// /// public static nint GetUserData(this FmodStudioSystem system) { TryGetUserData(system, out var userData).Check(); return userData; } /// /// /// Retrieves memory usage statistics. /// /// /// Studio::System::getMemoryUsage /// /// public static unsafe Result TryGetMemoryUsage(this FmodStudioSystem system, out MemoryUsage memoryUsage) { fixed (MemoryUsage* memoryUsagePtr = &memoryUsage) return PInvoke.SystemGetMemoryUsage(system, memoryUsagePtr); } /// /// /// Retrieves memory usage statistics. /// /// /// Studio::System::getMemoryUsage /// /// public static MemoryUsage GetMemoryUsage(this FmodStudioSystem system) { TryGetMemoryUsage(system, out var memoryUsage).Check(); return memoryUsage; } } }