버전
menu
Wwise Unreal Integration Documentation
|
External Sources and their media are decoupled by default. You must map External Source Cookies, which are equivalent to ShortIDs, to the media to play. External Source media can be generated alongside SoundBanks and streaming media, but you must also track the media files and their metadata.
Simple External Source Manager는 External Source 미디어를 추적하며 External Source에 매핑할 수 있는 기능을 제공합니다. It uses Data Tables (.csv
files) that describe the External Source media to use in the game as well as an API and Blueprint functions to assign media to External Sources.
The Simple External Source Manager supports the External Source Manager Implementation in the following ways:
A usage example of this submodule is available in the Wwise Demo Game (see Using the Wwise Demo Game).
기본적으로 Simple External Source Manager 모듈은 비활성화되어 있습니다. 이를 활성화하려면 Unreal 프로젝트의 DefaultEngine.ini
파일에 다음 줄을 추가하세요:
이 코드는 Wwise Simple External Source Manager 하위 모듈을 사용해서 External Source 로드를 처리하는 모듈로 WwiseFileHandlerModule
을 오버라이드합니다.
Wwise Simple External Source Manager Settings는 두 개의 Data Table과 하나의 Directory를 통해 설정할 수 있습니다:
미디어 정보 테이블의 항목에는 다음과 같은 속성이 있습니다.
AkGameplayTypes.h
의 AkCodecId
열거형(enum)을 참조해 주세요.기본 미디어 테이블의 항목에는 다음과 같은 속성이 있습니다.
ExternalSourceCookie
와 일치해야 합니다. 테이블에서 조회하는 데 사용됩니다.ExternalSourceMediaInfoId
와 일치해야 합니다.Simple External Source Manager가 인스턴스화되면 Media Info Table 을 읽어 미디어 메타데이터 목록을 채웁니다. 그리고 미디어 ID의 미디어 이름 맵이 External Source Manager Blueprint 함수 와 함께 사용되도록 채워집니다.
Next, the External Source 기본 미디어 is read, and External Source Cookie/media ID pairs are added to a map. This optional Data Table sets default media for External Sources to use in the game. 이 시스템은 SetExternalSourceMedia
메소드에 대한 Blueprint 및 함수 호출의 수를 줄입니다. 기본 미디어가 이미 정의된 경우 미디어를 동적으로 변경하는 External Source에만 이 메소드를 사용하면 됩니다.
External Source Manager가 External Source를 로드하면 (보통 로드 중인 AkAudioEvent
에 의해 트리거됨) External Source를 참조하는 애셋의 수를 추적하는 상태 구조체가 생성되고 해당 맵이 확인됩니다. If a media pairing exists in the map, a state structure for the media is created or updated. Depending on the information read from the Media Info Table, the media is either loaded into memory from disk or, if it is streamed, the created state is registered to handle incoming streaming requests from the sound engine.
If an External Source Cookie/media ID pair is set during gameplay (for example, by the External Source Manager Blueprint 함수), and if the External Source is already loaded, the media is loaded immediately. If the External Source is already mapped to a different media, the reference count of that media is decremented. 참조 횟수가 0이면 재생이 중지되고 언로드됩니다.
All PostEvent
calls that pass through the AkAudioDevice, including PostEvent
calls from the Integration's Blueprint functions, call the External Source Manager's PrepareExternalSourceInfos
method. 이러한 메소드는 전달된 External Source 쿠키에 게시할 미디어를 선택합니다. 해당 작업이 성공하거나 실패한 후 BindPlayingIdToExternalSources
메소드가 호출되어 선택한 모든 미디어를 게시된 이벤트의 Playing ID에 바인딩합니다. 마찬가지로 Event 재생이 완료되면 OnEndOfEvent
메소드가 호출되고 미디어가 해당 Playing ID에서 더 이상 사용되지 않음을 External Source Manager에게 알립니다.
마지막으로 Cook
메소드는 External Source 미디어 패키징을 지원합니다. External Source를 사용하는 Event가 패키징되면 각 External Source에 대해 Cook
메소드가 호출됩니다. 이러한 메소드가 호출되면 Simple External Source Manager는 패키징을 위해 Media Info Table 에 모든 미디어 파일을 준비합니다. 해당 작업은 한 번만 수행하면 되기 때문에 플래그가 설정되고 그 다음 Cook
로의 호출은 아무 작업도 수행하지 않습니다.
![]() | 참고: | WwiseSoundEngine API를 통해 직접 External Source로 이벤트를 게시하는 경우 적절한 시간에 External Source Manager의 PrepareExternalSourceInfos , BindPlayingIdToExternalSources 및 OnEndOfEvent 를 구현해야 합니다. Otherwise, if you switch the media an External Source uses while it is playing, the previous media might be unloaded prematurely, which could cause the sound engine to crash. 또한 더 낮은 수준에서 I/O Hook를 재정의하고 파일 관리를 직접 처리할 수도 있습니다. |
디스크의 Data Table이 수정되고 Unreal Editor가 열리면 해당 콘텐츠가 다시 파싱됩니다. 그런 다음 로드된 모든 Wwise Events Asset이 언로드된 다음 다시 로드됩니다. 이러한 억지 기법은 External Source Manager의 상태가 적절하게 업데이트되도록 하는 가장 간단한 방법입니다.
To update the mapping between External Sources and media, use one of the Blueprint functions to set External Source media.
선호에 따라 이름이나 ID를 사용하는 세 가지 Blueprint 함수가 제공됩니다.
MediaID
를 사용하여 미디어를 지정합니다.MediaName
을 사용하여 미디어를 지정합니다.Cookie
를 사용하여 External Source를 지정하고 MediaID
를 사용하여 미디어를 지정합니다.When you set an External Source media with strings, the Cookie
is determined by a hash of the name string. MediaID
는 Media Info Table이 파싱될 때 구성되는 맵에서 미디어 이름을 조회하여 가져옵니다.
![]() | 참고: | Blueprint는 부호가 있는 짧은 정수만 사용할 수 있습니다. 이러한 제한을 피하려면 FAkUniqueID 변수를 사용하여 External Source 쿠키 값을 설정하세요. |
개발자는 코드를 통해 두 가지 방법으로 External Source를 설정할 수 있습니다. 이전 섹션에서 설명한 Blueprint 함수를 호출하거나, External Source Manager 인스턴스를 가져와서 해당 메소드를 직접 호출할 수 있습니다. Wwise Simple External Source Manager의 대부분의 메소드는 가상이기 때문에 개발자는 이러한 관리자를 새로운 모듈로 확장할 수 있습니다. 그리고 자체 데이터 구조체와 논리를 사용하여 미디어를 추적하고 External Source와 페어링할 수 있습니다.
Simple External Source Manager 디자인의 주요 한계점은 여러 플랫폼 게임에 대해 Media Info Table 이 유연하지 않다는 것입니다. 플랫폼마다 다른 코덱을 사용해서 미디어를 디코딩하지만 Media Info Table의 구조체는 이를 지원하지 않습니다. 관리자 확장으로 가능한 한 해결책은 플랫폼별 Media Info Table을 만들고 빌드 대상에 따라 알맞게 패키징하는 것입니다.
When streaming, External Sources have more limitations than internally packaged media. Zero latency is not possible with External Sources, and the prefetched data is only provided to the sound engine when it is requested for playback. There is a playback delay between the initial PostEvent and the actual sample processing, which would occur with any media that do not have zero latency.
프로젝트를 등록하세요. 아무런 조건이나 의무 사항 없이 빠른 시작을 도와드리겠습니다.
Wwise를 시작해 보세요