BUG: Unable to get audio table event length after updating FMOD Integration from 2.0 to 2.1

I have some code used to get the duration of an event from an audio table while in the editor. It worked in version 2.0 of the integration, but does not work in 2.1. Unity version 2021.1. Now it always returns length of zero.
Any help will be much appreciated, I barely got it working the first time as this is way outside my comfort zone, not even sure where to start now.

double GetClipDuration(string lineID,string cutsceneID){

    string lineKey = cutsceneID + "/" + lineID;
    double result = 0;
    var dialogueInstance = FMODUnity.RuntimeManager.CreateInstance("event:/Dialogue");
    //Forcibly pin key in memory and pass memory allocation to var

    GCHandle stringHandle = GCHandle.Alloc(lineKey, GCHandleType.Pinned);
    FMOD.Studio.SOUND_INFO dialogueSoundInfo;
    string key = stringHandle.Target as String;
    var keyResult = FMODUnity.RuntimeManager.StudioSystem.getSoundInfo(key, out dialogueSoundInfo);
    Debug.Log("Checking key.");
    if (keyResult != FMOD.RESULT.OK)

        Debug.Log("Key not found.");
        return 0; 
    Debug.Log("Key found.");
    FMOD.Sound dialogueSound;
    var soundResult = FMODUnity.RuntimeManager.CoreSystem.createSound(dialogueSoundInfo.name_or_data, soundMode | dialogueSoundInfo.mode, ref dialogueSoundInfo.exinfo, out dialogueSound);
    Debug.Log("Creating sound.");
    if (soundResult == FMOD.RESULT.OK)
        //Get length    

        FMOD.Sound subSound; 
        dialogueSound.getSubSound(dialogueSoundInfo.subsoundindex, out subSound);
        string n;
        uint length = 0;
        subSound.getLength(out length, FMOD.TIMEUNIT.MS);
        Debug.Log("sound created with length: " + length);
        result = length;

    return result;

First thing to check would be the FMOD.RESULT returned by FMOD functions like getSubSound and getLength, just in case they are failing for some reason.