Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Audio Profiler module reference

Analyze the audio performance of your application.
Read time 5 minutesLast updated 12 days ago

The Audio Profiler module monitors the performance of the audio system in your application, such as the total load and voice counts. To open the Profiler window, go to menu: Window > Analysis > Profiler. For information on how to use the Profiler, refer to Profiler introduction

The Audio Profiler in the Profiler Window

The Audio Profiler module's chart tracks the time spent on the audio in your application. The timings are divided into the following categories:

Chart

Description

Playing Audio SourcesTotal number of audio sources playing in the scene at the selected frame. This is useful to monitor if the audio is overloaded.
Audio VoicesThe number of audio (FMOD channels) voices used in the selected frame.
Total Audio CPUThe amount of CPU usage the audio used in the selected frame.
Total Audio MemoryThe amount of RAM the audio engine used in the selected frame.
To change the order of the categories in the chart, you can drag them in the chart's legend. You can also click a category's colored legend to toggle its display.

Module details pane

When you select the Audio Profiler module, the details pane displays a breakdown of the audio data for the selected frame. There are two views you can use to inspect the audio profiler data: Simple and Detailed. To change the display, use the top-left dropdown in the details pane (set to Simple by default).

Simple view

The Simple view contains the following information about the audio data for the frame you selected.

Data

Description

Total Audio SourcesTotal number of audio sources in the scene.
Playing Audio SourcesTotal number of audio sources playing in the scene
Paused Audio SourcesThe total number of paused audio sources in the scene.
Audio Clip CountTotal number of audio clips in the scene.
Audio VoicesThe total number of audio channels (FMOD channels) your Project uses.
Total Audio CPUThe total amount of CPU the audio uses.
DSP CPUThe amount of CPU your project uses by mixing, audio effects, and decompression of non-streamed sounds that have the Compressed In Memory load type. This doesn't cover the CPU required for sounds that Unity decodes in the background whose load type is Decompress On Load and have the Load In Background flag checked.
Streaming CPUThe amount of CPU your project uses to stream the audio in your application.
Other CPUGeneral CPU overhead not covered by the other CPU categories.
Total Audio MemoryThe amount of memory the audio uses in your project.
Streaming File MemoryThe amount of memory that audio files with the load type of Streaming use for short-term buffering of compressed audio data when the files are progressively read from disk.
Streaming Decode MemoryThe amount of memory that audio files with the load type of Streaming use for buffering the decoded sample stream.
Sample Sound MemoryThe amount of memory that audio files with the load type of Decompress On Load use for the decompressed sample data.

Note: Unity pools the memory that the audio system allocates and it keeps growing until it reaches saturation over the runtime of your application. The audio system internally reuses the allocated memory, which can't be compacted during runtime.
Other MemoryOverhead caused by various subsystems in the audio system.

Detailed view

The Detailed view contains all the information in the Simple view, and additionally contains detailed per-frame logging of audio events. You can view these either as Channels, Groups, or Channels and Groups. To open this view, open the dropdown at the top of the module details pane, select Detailed, and then select one of the views from the toolbar at the top of the pane.
The Groups view shows the hierarchy of the buses in the audio mixer. The Channels and Groups view displays this information alongside information about the playing sounds.

The Audio Profiler Groups view

The Audio Profiler Channel and Groups view

Select the Reset play count on play to reset the number in the Plays column the next time you click Play in the Player window, or when you connect to a new target device.
The information in the detailed view is arranged into the following columns:

Column

Description

ObjectThe GameObject that contains the Audio Source playing the audio.
AssetThe audio Asset that the corresponding GameObject Audio Source is playing.
VolumeThe volume the Audio Source applies to the audio. This is a combination of its overall volume property, and the dynamic volume that the distance-dependent attenuation curve applies.
AudibilityThe actual level at which the audio plays. This is the sum of the Audio Source’s volume and the other attenuations the mixer channels apply to it.
PlaysThe number of times Unity has played the audio. This information is useful to debug logic errors where Unity might not use some audio files.
3DDisplays YES if the audio uses dynamic distance-dependent attenuation and directional panning.
PausedDisplays YES if the audio is paused in this frame.
MutedDisplays YES if the audio is muted in this frame.
VirtualDisplays YES if the audio is suspended because of the Max Real Voice Count, which you can set in the Audio Project Settings. The Max Real Voice Count sets the maximum amount of Audio Sources that Unity simultaneously plays at once. If this displays true, Unity has prioritized other audio that has higher audibility or priority in this frame.
OneShotDisplays YES if AudioSource.PlayOneShot() played the audio.
LoopedDisplays YES if AudioSource.Play() played the audio.
DistanceThe distance from the Audio Source to the AudioListener.
MinDistThe minimum distance defined on the AudioSource curve editor. This defines a spherical region around the audio where the volume stays at a constant level within it.
MaxDistThe maximum distance defined on the Audio Source curve editor. This defines a spherical region around the audio where the volume stays at a constant level outside of it.
TimeThe current relative time in the audio’s playback. While the audio playback is paused, this time does not advance.
DurationThe length of the audio in seconds.

Additional resources