-
Notifications
You must be signed in to change notification settings - Fork 3
misc
FMOD Object: N/A
This module contains a number of miscellaneous functions relating to the FMOD extension.
This module offers a collection of functions designed to address specific tasks and provide utilities for various purposes. Explore the available functions to make the most of the functionalities provided by this module.
- fmod_last_result
- fmod_memory_get_stats
- fmod_debug_initialize
- fmod_thread_set_attributes
- fmod_path_bundle
- fmod_path_user
FMOD Function: Memory_GetStats
This function returns information on the memory usage of FMOD.
This information is byte accurate and counts all allocs and frees internally. This is useful for determining a fixed memory size to make FMOD work within for fixed-memory machines such as consoles.
Syntax:
fmod_memory_get_stats(blocking)
Argument | Type | Description |
---|---|---|
blocking | Boolean | This is a flag to indicate whether to favour speed or accuracy. Specifying true for this parameter will flush the DSP network to make sure all queued allocations happen immediately, which can be costly. |
Returns:
FMOD Function: Debug_Initialize
This function specifies the level and delivery method of log messages when using the logging version of FMOD.
fmod_last_result will return FMOD_RESULT.ERR_UNSUPPORTED
when using the non-logging (release) versions of FMOD.
Note that:
-
FMOD_DEBUG_FLAGS.LEVEL_LOG
produces informational, warning and error messages. -
FMOD_DEBUG_FLAGS.LEVEL_WARNING
produces warnings and error messages. -
FMOD_DEBUG_FLAGS.LEVEL_ERROR
produces error messages only.
See Also: Callback Behavior
Syntax:
fmod_debug_initialize(flags, mode, filename)
Argument | Type | Description |
---|---|---|
flags | FMOD_DEBUG_FLAGS | The debug level, type and display control flags. More than one mode can be set at once by combining them with the OR operator. |
mode | FMOD_DEBUG_MODE | The destination for log messages. The default is FMOD_DEBUG_MODE.TTY . |
filename | String | The filename to use when mode is set to file, only required when using that mode. The default is pointer_null . |
Returns:
N/A
FMOD Function: Thread_SetAttributes
This function specifies the affinity, priority and stack size for all FMOD created threads.
You must call this function for the chosen thread before that thread is created for the settings to take effect.
Affinity can be specified using one (or more) of the FMOD_THREAD_AFFINITY constants or by providing the bits explicitly, i.e. (1<<3) for logical core three (core affinity is zero based). See platform documentation for details on the available cores for a given device.
Priority can be specified using one of the FMOD_THREAD_PRIORITY constants or by providing the value explicitly, i.e. (-2) for the lowest thread priority on Windows. See platform documentation for details on the available priority values for a given operating system.
The stack size can be specified explicitly, however for each thread you should provide a size equal to or larger than the expected default or risk causing a stack overflow at runtime.
Syntax:
fmod_thread_set_attributes(type, affinity, priority, stacksize)
Argument | Type | Description |
---|---|---|
type | FMOD_THREAD_TYPE | The identifier for an FMOD thread. |
affinity | FMOD_THREAD_AFFINITY | A bitfield of desired CPU cores to assign the given thread to. |
priority | FMOD_THREAD_PRIORITY | The scheduling priority to assign the given thread to. |
stacksize | FMOD_THREAD_STACK_SIZE | The amount of stack space available to the given thread. |
Returns:
N/A
This function returns the result of the last call to any of FMOD's functions.
The extension functions themselves don't return a value indicating if a function call was succesful or not. You should therefore use this function if you want to get the result of the last function that you called.
Syntax:
fmod_last_result()
Returns:
Since FMOD uses direct C++ access to the file system, it doesn't know anything about the user path automatically. This function returns the full bundle path to an Included File in the datafiles
folder.
Syntax:
fmod_path_bundle()
Returns:
Since FMOD uses direct C++ access to the file system, it doesn't know anything about the bundle path automatically. This function returns the full path to a file stored in the save path.
Syntax:
fmod_path_user()
Returns:
YoYoGames 2024