版本

menu_open
Wwise SDK 2022.1.12

◆ TryUnsetMedia()

AKSOUNDENGINE_API AKRESULT AK::SoundEngine::TryUnsetMedia ( AkSourceSettings in_pSourceSettings,
AkUInt32  in_uNumSourceSettings,
AKRESULT out_pUnsetResults 
)

Removes the specified source from the list of loaded media, only if this media is not already in use. The sources are identified by their ID (refer to 一般信息 for a discussion on using strings and IDs).

备注: Media that is still in use by the sound engine should not be unset. It is marked for removal to prevent additional use. If this function returns AK_ResourceInUse, then the client must not release memory for this media. Instead, the client should retry the TryUnsetMedia operation later with the same parameters and check for AK_Success.

If out_pUnsetResults is not null, then it is assumed to point to an array of result codes of the same length as in_pSourceSettings. out_pUnsetResults will be filled with either AK_Success or AK_ResourceInUse, indicating which media was still in use and not unset.

返回
  • AK_Success: Operation was successful, and the memory can be released on the client side.
  • AK_ResourceInUse: Specified media is still in use by the sound engine, and the media was not unset. Do not release memory, and try again later.
  • AK_InvalidParameter: in_pSourceSettings is invalid
参数
in_pSourceSettingsArray of Source Settings
in_uNumSourceSettingsNumber of Source Settings in the array
out_pUnsetResults(optional, can be null) Array of result codes

此页面对您是否有帮助?

需要技术支持?

仍有疑问?或者问题?需要更多信息?欢迎联系我们,我们可以提供帮助!

查看我们的“技术支持”页面

介绍一下自己的项目。我们会竭力为您提供帮助。

来注册自己的项目,我们帮您快速入门,不带任何附加条件!

开始 Wwise 之旅