バージョン

menu_open
Wwise SDK 2022.1.12

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

Like most functions of AK::SoundEngine, AddOutput is asynchronous. A successful return code merely indicates that the request is properly queued. Error codes returned by this function indicate various invalid parameters. To know if this function succeeds or not, and the failure code, register an AkDeviceStatusCallbackFunc callback with RegisterAudioDeviceStatusCallback.

参照
AK::SoundEngine::AddOutput
AK::SoundEngine::RegisterAudioDeviceStatusCallback
AK::AkDeviceStatusCallbackFunc
戻り値
  • 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_SettingsCreation parameters for this output. AkOutputSettings
in_outputDeviceIdAkOutputDeviceID of the output to replace. Use 0 to target the current main output, regardless of its id. Otherwise, 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.

このページはお役に立ちましたか?

サポートは必要ですか?

ご質問や問題、ご不明点はございますか?お気軽にお問い合わせください。

サポートページをご確認ください

あなたのプロジェクトについて教えてください。ご不明な点はありませんか。

プロジェクトを登録していただくことで、ご利用開始のサポートをいたします。

Wwiseからはじめよう