Lesson 1

Table of Contents

Streaming

A way to reduce memory load is to stream the audio directly from optical disc, hard drive or flash memory. Streaming is great for large audio files that would otherwise take up large amounts of memory in the SoundBank; however, as it needs to load on triggering, a small amount of latency might be induced. As such, streaming is not ideal for sounds that rely on precise timing such as lip-synced dialogue, but is well adapted for sounds where timing is generally not critical such as ambience, and sometimes music.

Streaming is very similar to loading a SoundBank. When a SoundBank is loaded, the content is streamed to memory by the CPU. When streaming an audio file, a small amount of CPU is likewise used to fetch the streamed file from the hard drive or disc, and—depending on the settings you specify—the streamed data will either be flushed out or kept in memory.

Your streaming settings are configured on the Audio Object in your Wwise Project. Let’s demonstrate streaming on the Quest 4 Blacksmith dialogue Sound Voice Object.

[Note]

Sound Voice object is a type generally used for dialogue, specifically designed to handle multiple languages. Sound Voice object is not to be confused with a Voice.

  1. In the Wwise menu > Layouts, select Designer.

  2. In the Project Explorer's Audio tab, expand Actor-Mixer Hierarchy > Default Work Unit > World > NPCs > QuestGivers > Dialogue Blacksmith and select Blacksmith_DialogueLine_Q4b_01.

  3. In the Sound Property Editor’s General Settings, ensure Stream is selected.

By simply enabling Stream, on generation of the SoundBanks the sound will be stored in a WEM file next to the SoundBanks to be streamed in-game.

[Note]

A WEM (Wwise Encoded Media) file is a Wwise proprietary format archived in the compiled game.

The following options are available to streamed files:

  • Non-Cachable: Leaves no cache when streamed audio plays. Good for long loops or non-recurring sounds that have no reason to stay cached in memory after completion. In WAG, this option is selected for all dialogues because they usually only occur once.

  • Zero Latency: Eliminates the latency of streamed files by creating a small buffer of the beginning part of the audio file. Useful for the music in WAG because two themes are playing concurrently and, as such, the timing of the triggering is essential.

  • Prefetch length (ms): Refers to the milliseconds of time you’d like to store in the memory. With everything in WAG this is left to its default of 100 milliseconds.

The music, dialogue, and ambience in WAG are streamed, which saves approximately 57 MB of runtime memory. Within this, dialogue takes up approximately 37 MB, which underlines the importance of using the Non-cachable option when possible, to remove cache left over in memory.


Was this page helpful?