We have run into the same issue. Looking at the code, it turns out that short IDs of zero are actually expected on AkAudioTypes (which is what these are). If they are zero, then the short ids are generated at load time from the name of the asset. The problem is that the name of the asset for states is a combination of the state group name and the state name, so the short id generated isn't the same as the one the API generates when you pass it the individual strings.
We modified the Wwise plugin to fix this. Perhaps it will be useful to you. it's in AkGroupValue.cpp.
UPDATE: Read the comment below from Tom V. It may more correct in UAkStateValue.cpp instead.
void UAkGroupValue::Load()
{
// ShortIDs are supposed to be the hash of the name. It seems like sometimes Wwise fills these in, and sometimes they leave them zero.
// When they are zero, they are supposed to be filled in with the hash of the name at load time. However, States have a group id and a short id
// and the name contains both strings. So, we need to split them up and get the right short id for each part.
// I think this is an oversight by Wwise. The AkAudioType from which this derives sets the short id if it isn't set, but does so with the full name
// and not just the approproate part.
if (auto AudioDevice = FAkAudioDevice::Get())
{
// GroupValues' asset names are a combination of group name AND switch name, so we need to parse that out of the name
FString FullName = GetName();
int32 Index;
if (FullName.FindChar('-', Index))
{
auto GroupIdFromName = AudioDevice->GetIDFromString(FullName.Mid(0, Index));
auto idFromName = AudioDevice->GetIDFromString(FullName.Mid(Index+1));
if (GroupShortID == 0)
{
GroupShortID = GroupIdFromName;
}
else if (GroupShortID != 0 && GroupShortID != GroupIdFromName)
{
UE_LOG(LogAkAudio, Error, TEXT("%s -> %s - Current Group Short ID '%u' is different from ID from the name '%u'"), *GetName(), *FullName.Mid(0, Index), GroupShortID, GroupIdFromName);
}
if (ShortID == 0)
{
ShortID = idFromName;
}
else if (ShortID != 0 && ShortID != idFromName)
{
UE_LOG(LogAkAudio, Error, TEXT("%s -> %s - Current Short ID '%u' is different from ID from the name '%u'"), *GetName(), *FullName.Mid(Index+1), ShortID, idFromName);
}
}
}
Super::Load(); // Must be called after the above
// THE REST OF THE EXISTING FUNCTION GOES HERE
}