Version

menu_open
Warning: you were redirected to the latest documentation corresponding to your major release ( 2023.1.8.8601 ). Should you wish to access your specific version's documentation, please download the offline documentation from the Audiokinetic Launcher and check the Offline Documentation option in Wwise Authoring.
Wwise SDK 2023.1.8

◆ 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. 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.

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_pSourceSettingsArray of Source Settings
in_uNumSourceSettingsNumber 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