Fix a crash when reloading AudioControlEditor controls (#2729)
* Fix a crash when reloading ACE controls data The crash was due to destruction of xml_node that was held in a unique_ptr. Rapidxml has a very rudimentary memory allocation design, so in most cases dynamic allocations aren't even made. The memory_pool does all the cleanup in its destructor, so having a unique_ptr run its default_delete was causing the crash. Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com> * Fix numerical conversion warnings Wwise source files needed a few fixes for the numerical conversion warning changes that went in recently. Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
This commit is contained in:
@@ -69,7 +69,7 @@ namespace Audio
|
||||
|
||||
AkDeviceSettings deviceSettings;
|
||||
AK::StreamMgr::GetDefaultDeviceSettings(deviceSettings);
|
||||
deviceSettings.uIOMemorySize = poolSize;
|
||||
deviceSettings.uIOMemorySize = aznumeric_cast<AkUInt32>(poolSize);
|
||||
deviceSettings.uSchedulerTypeFlags = AK_SCHEDULER_BLOCKING;
|
||||
Platform::SetThreadProperties(deviceSettings.threadProperties);
|
||||
|
||||
@@ -198,7 +198,7 @@ namespace Audio
|
||||
deviceDesc.bCanWrite = true;
|
||||
deviceDesc.deviceID = m_deviceID;
|
||||
AK_CHAR_TO_UTF16(deviceDesc.szDeviceName, "IO::IArchive", AZ_ARRAY_SIZE(deviceDesc.szDeviceName));
|
||||
deviceDesc.uStringSize = AKPLATFORM::AkUtf16StrLen(deviceDesc.szDeviceName);
|
||||
deviceDesc.uStringSize = aznumeric_cast<AkUInt32>(AKPLATFORM::AkUtf16StrLen(deviceDesc.szDeviceName));
|
||||
}
|
||||
|
||||
AkUInt32 CBlockingDevice_wwise::GetDeviceData()
|
||||
@@ -219,7 +219,7 @@ namespace Audio
|
||||
|
||||
AkDeviceSettings deviceSettings;
|
||||
AK::StreamMgr::GetDefaultDeviceSettings(deviceSettings);
|
||||
deviceSettings.uIOMemorySize = poolSize;
|
||||
deviceSettings.uIOMemorySize = aznumeric_cast<AkUInt32>(poolSize);
|
||||
deviceSettings.uSchedulerTypeFlags = AK_SCHEDULER_DEFERRED_LINED_UP;
|
||||
Platform::SetThreadProperties(deviceSettings.threadProperties);
|
||||
|
||||
@@ -336,7 +336,7 @@ namespace Audio
|
||||
deviceDesc.bCanWrite = false;
|
||||
deviceDesc.deviceID = m_deviceID;
|
||||
AK_CHAR_TO_UTF16(deviceDesc.szDeviceName, "IO::IStreamer", AZ_ARRAY_SIZE(deviceDesc.szDeviceName));
|
||||
deviceDesc.uStringSize = AKPLATFORM::AkUtf16StrLen(deviceDesc.szDeviceName);
|
||||
deviceDesc.uStringSize = aznumeric_cast<AkUInt32>(AKPLATFORM::AkUtf16StrLen(deviceDesc.szDeviceName));
|
||||
}
|
||||
|
||||
AkUInt32 CStreamingDevice_wwise::GetDeviceData()
|
||||
|
||||
Reference in New Issue
Block a user