Version

menu_open
Wwise SDK 2019.2.15

◆ 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 General Information for a discussion on using strings and IDs).

Note: Media that is still in use by the sound engine should not be unset. If this function returns AK_ResourceInUse, then the operation is a no-op and 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.

Returns
  • 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
Parameters
in_pSourceSettings Array of Source Settings
in_uNumSourceSettings Number of Source Settings in the array
out_pUnsetResults (optional, can be null) Array of result codes

Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise