To use SoundFrame, you will need the following files:
The following samples are also available:
The following example is the basic code structure of the SoundFrame client:
#include <AK/SoundFrame/SF.h> class SoundFrameClient : public AK::SoundFrame::IClient { AK::SoundFrame::ISoundFrame * m_pSoundFrame; public: SoundFrameClient() : m_pSoundFrame( NULL ) { AK::SoundFrame::Create( this, &m_pSoundFrame ); if ( m_pSoundFrame ) m_pSoundFrame->Connect(); } ~SoundFrameClient() { if ( m_pSoundFrame ) m_pSoundFrame->Release(); } // SoundFrame::IClient methods virtual void OnConnect( bool in_bConnect ) {} virtual void OnEventNotif( Notif in_eNotif, AkUniqueID in_eventID ) {} virtual void OnDialogueEventNotif( Notif in_eNotif, AkUniqueID in_dialogueEventID ) {} virtual void OnSoundObjectNotif( Notif in_eNotif, AkUniqueID in_soundObjectID ) {} virtual void OnStatesNotif( Notif in_eNotif, AkUniqueID in_stateGroupID ) {} virtual void OnSwitchesNotif( Notif in_eNotif, AkUniqueID in_switchGroupID ) {} virtual void OnGameParametersNotif( Notif in_eNotif, AkUniqueID in_gameParameterID ) {} virtual void OnTriggersNotif( Notif in_eNotif, AkUniqueID in_triggerID ) {} virtual void OnArgumentsNotif( Notif in_eNotif, AkUniqueID in_argumentID ) {} virtual void OnEnvironmentsNotif( Notif in_eNotif, AkUniqueID in_environmentID ) {} virtual void OnGameObjectsNotif( Notif in_eNotif, AkGameObjectID in_gameObjectID ) {} }
|
Caution: In order for SoundFrame to receive messages from the Wwise authoring tool, AK::SoundFrame::ISoundFrame::Connect must create a Window. The function must be called from the same thread as the message pump of the application. |
While the client holds SoundFrame, it can use it to interact with Wwise in the following ways:
SoundFrame gives you the power to integrate Wwise objects into your applications. With SoundFrame, you can perform tasks such as event playback, switch assignation, and environment setting. The following Wwise objects can be used with SoundFrame:
When using Wwise objects in your applications, it is important to know how to reference them. There are two ways to reference a Wwise object:
When you want to integrate Wwise objects into your applications, you can enable this functionality using either of the following methods:
IClient::OnEventNotif
.When your projects include attenuation, it is useful to see the maximum attenuation values that are defined in Wwise displayed in your applications. With SoundFrame, you can display attenuation values and also register for notifications when these values are modified in Wwise.
From SoundFrame's perspective, attenuation is a property of a sound object (refer to ISoundObject for more information). To display attenuation values in your application:
After you have adapted your application to properly display attenuation values, it is preferable that you register for attenuation change notifications.
To register for attenuation change notifications:
You will then receive notifications of type Notif_Changed in AK::SoundFrame::IClient::OnSoundObjectNotif
when attenuation values are modified in Wwise.
To unregister from attenuation change notifications:
SoundFrame gives you access to most of the Sound Engine API. This enables you to play back Events as well as modify States, Switches, RTPCs, Triggers, and environments in your application. This API lets you simulate real game scenarios directly in Wwise without requiring a working game engine or even having to generate SoundBanks.
If you want users to be able to play back Events from within your applications, you will have to enable Event playback as follows:
|
Note: When your application goes into Play mode many events will be fired in a long sequence. Therefore, it is recommended to set the playback mode to True using ISoundFrame::SetPlayBackMode during playback. When the playback is done you can set the playback mode back to False. Setting the playback mode to False will stop all playbacks in Wwise. |
SoundFrame lets you change the active states and switches in your applications to simulate real game scenarios. The following methods let you do this:
SoundFrame gives you access to methods that let you create or remove game objects and modify their positions in three dimensions. It also lets you define listeners and place them where you want within your applications. To do so, use the following methods:
SoundFrame allows you to modify RTPCs, environments, as well as launch interactive music triggers so that you can create even more realistic game simulations. You can also define the obstruction and occlusion levels of your game objects. To do so, use the following methods:
SoundBanks can be created and populated with events manually by the Wwise user in the SoundBank Manager.
However, if you use another application, such as a 3D application or level editor to integrate events into your game, you can generate a SoundBank definition file from that application and then import it in Wwise to automatically create and populate SoundBanks.
A definition file is a text file that lists all the events in your game, classified by SoundBank. The definition file must include the name of the SoundBank and the corresponding event name, separated by a tab. The following illustration demonstrates how a definition file should be written so that it can be read by Wwise.
The definition file can also include special keywords that define the types of project elements that will be packaged in the SoundBanks. The following keywords can be used:
In the definition file, one or more of these keywords can be added after the event name, with each one being separated by a tab. If no keywords are included in the definition file, all project elements and media will be packaged in the SoundBank. The following illustration demonstrates how these keywords should be used within a definition file.
If your game is not using strings for event names, you can use any of the following systems to define the events in the definition file:
The following illustration demonstrates how to define events in a definition file using the four different systems.
Event IDs are available through SoundFrame in various functions:
Refer to AK::SoundFrame::IEvent, AK::SoundFrame::IClient and AK::SoundFrame::ISoundFrame for more details.
SoundBank definition files can either be imported manually, or through SoundFrame.
If your application generates a SoundBank definition file, you can make a call to notify Wwise that a new definition file needs to be imported.
To notify Wwise that a new SoundBank definition file needs to be imported:
|
Note: Note that the SoundBanks created by the definition file are located in the default SoundBank Work Unit. To create your SoundBank in a different Work Unit you need to import definition file manually in Wwise. |
If your application does not generate a SoundBank definition file, you can make a call to notify Wwise that the SoundBanks need to be regenerated.
To notify Wwise that the SoundBanks need to be regenerated:
To create or update SoundBanks in Wwise by importing a definition file:
|
Note: Wwise remembers if an Event was added manually by a user, or automatically by importing a SoundBank definition file. Only Events that were added by importing a definition file will be removed from the SoundBank during a subsequent definition file importation. Manually added Events will not be removed from the SoundBank even if they are not listed in the definition file. |
프로젝트를 등록하세요. 아무런 조건이나 의무 사항 없이 빠른 시작을 도와드리겠습니다.
Wwise를 시작해 보세요