버전

menu_open
Wwise SDK 2018.1.11

◆ SetEmitterObstructionAndOcclusion()

AKRESULT __cdecl AK::SpatialAudio::SetEmitterObstructionAndOcclusion ( AkGameObjectID  in_gameObjectID,
AkReal32  in_fObstruction,
AkReal32  in_fOcclusion 
)

Set the obstruction and occlusion values of an emitter game object that has been registered with the SpatialAudio API.

This function should be called instead of AK::SoundEngine::SetObjectObstructionAndOcclusion(), and can be used for setting the obstruction and occlusion values on a Spatial Audio emitter. The obstruction value passed to SetEmitterObstructionAndOcclusion() should be used to simulate obstructing objects between the emitter and the listener, if they are in the same room, or between the emitter and a portal, if the emitter and listener are in different room. The occlusion value that is passed to SetEmitterObstructionAndOcclusion() is send to the sound engine directly, unless the emitter is unreachable via sound propagation. In this case, the occlusion value is maxed with the AkRoomParams::WallOcclusion value to simulate sound transmission through walls. If the listener and the emitter are in different rooms, the maximum of the obstruction value passed into SetEmitterObstructionAndOcclusion() and the the obstruction value calculated from the diffraction angle is passed to the sound engine. If the game object is not registered as an emitter with Spatial Audio, then an error will be reported, and the call will have no effect.

Note: The game is responsible to differentiate between obstruction between the emitter and the portal (where AK::SpatialAudio::SetEmitterObstructionAndOcclusion() should be used), and occlusion from room boundaries, which is better handled by the spatial audio diffraction system. For example, games that use ray-testing for obstruction may report 100 % obstruction when an object is very close to the opening of a portal, because the ray between the emitter and the listener hits a nearby wall. If the game then sends 100 %, this will erroneously override the diffraction calculation which is probably much less than 100% (180 degrees), and better matches the expected audibility of the sound. To prevent this scenario, games can ray-test for obstruction objects between the emitter and the portal, passing the results with AK::SpatialAudio::SetEmitterObstructionAndOcclusion(), and then test for obstructing objects between the portal and the listener, passing the results with AK::SpatialAudio::SetPortalObstructionAndOcclusion().
See also
Parameters
in_gameObjectID Game object ID of the sound emitter.
in_fObstruction Obstruction value. Valid range 0.f-1.f
in_fOcclusion Occlusion value. Valid range 0.f-1.f

이 페이지가 도움이 되었나요?

지원이 필요하신가요?

질문이 있으신가요? 문제를 겪고 계신가요? 더 많은 정보가 필요하신가요? 저희에게 문의해주시면 도와드리겠습니다!

지원 페이지를 방문해 주세요

작업하는 프로젝트에 대해 알려주세요. 언제든지 도와드릴 준비가 되어 있습니다.

프로젝트를 등록하세요. 아무런 조건이나 의무 사항 없이 빠른 시작을 도와드리겠습니다.

Wwise를 시작해 보세요