|
◆ ReplaceOutput()
AKSOUNDENGINE_API AKRESULT AK::SoundEngine::ReplaceOutput |
( |
const AkOutputSettings & |
in_Settings, |
|
|
AkOutputDeviceID |
in_outputDeviceId, |
|
|
AkOutputDeviceID * |
out_pOutputDeviceId = NULL |
|
) |
|
|
Replaces an output device previously created during engine initialization or from AddOutput, with a new output device. In addition to simply removing one output device and adding a new one, the new output device will also be used on all of the master buses that the old output device was associated with, and preserve all listeners that were attached to the old output device.
- 参见
-
AK::SoundEngine::AddOutput
- 返回
-
- AK_InvalidID: The audioDeviceShareset on in_settings was not valid.
- AK_IDNotFound: The audioDeviceShareset on in_settings doesn't exist. Possibly, the Init bank isn't loaded yet or was not updated with latest changes.
- AK_DeviceNotReady: The idDevice on in_settings doesn't match with a valid hardware device. Either the device doesn't exist or is disabled. Disconnected devices (headphones) are not considered "not ready" therefore won't cause this error.
- AK_DeviceNotFound: The in_outputDeviceId provided does not match with any of the output devices that the sound engine is currently using.
- AK_InvalidParameter: Out of range parameters or unsupported parameter combinations on in_settings
- AK_Success: parameters were valid, and the remove and add will occur.
- 参数
-
in_Settings |
Creation parameters for this output. AkOutputSettings |
in_outputDeviceId |
AkOutputDeviceID of the output to replace. For example, use the AkOuptutDeviceID returned from AddOutput() or ReplaceOutput(), or generated by GetOutputID() |
out_pOutputDeviceId |
(Optional) Pointer into which the method writes the AkOutputDeviceID of the new output device. If the call fails, the value pointed to will not be modified. |
|