0
0

In [b:1ip0gvdg]fmod.cs[/b:1ip0gvdg] in the fmod studio unity plugin, there is the following code:
[code:1ip0gvdg]

if !UNITY_IPHONE || UNITY_EDITOR

public class Memory
{
    public static RESULT GetStats(ref int currentalloced, ref int maxalloced)
    {
        return FMOD_Memory_GetStats(ref currentalloced, ref maxalloced, 1);
    }

    #region importfunctions

    [DllImport (VERSION.dll)]
    private static extern RESULT FMOD_Memory_GetStats(ref int currentalloced, ref int maxalloced, int blocking);

    #endregion
}

endif

[/code:1ip0gvdg]

Why is the [b:1ip0gvdg]"#if !UNITY_IPHONE"[/b:1ip0gvdg] there? The [b:1ip0gvdg]libfmodstudiounityplugin.a[/b:1ip0gvdg] seems to have it:
[code:1ip0gvdg]
0000c5e4 t _FMOD_Memory_GetStats
[/code:1ip0gvdg]

Is this merely an oversight, or is there a reason why this is disabled? If so, what is the correct way to determine the amount of memory being used by FMOD at any given point on an IOS device? We would like to gather this data for telemetry purposes.

  • You must to post comments
0
0

Hi wgkx,

Low level API access (including Memory GetStats) is coming soon to the Unity integration for all platforms. The reason Memory GetStats was disabled (as well as the rest of the low level API) on iOS is because Unity uses FMOD Ex internally and on iOS Unity has static linking. This means if we PInvoke that symbol we end up calling the the internal version and returning the memory usage of the internal audio system, not the Studio integration. We have renamed all the symbols to prevent the name collision and allowing us to expose the low level API in the next version.

For future reference there is a Unity specific FMOD Forum over here: viewforum.php?f=30

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.