UDN
Search public documentation:

MobileAudioSystem
日本語訳
中国翻译
한국어

Interested in the Unreal Engine?
Visit the Unreal Technology site.

Looking for jobs and company info?
Check out the Epic games site.

Questions about support via UDN?
Contact the UDN Staff

UE3 Home > Mobile Home > Mobile Audio System
UE3 Home > Audio Home > Mobile Audio System

Mobile Audio System


Overview


This document describes some of the audio issues specific to mobile devices. Music and sound effects are extremely important to the gaming experience. However, the audio pipeline for mobile devices differs slightly from that for PCs. Since mobile devices usually function as media players, they have special hardware that can be taken advantage of. At the same time there are also limitations to the types of effects that can be used when compared to the robust features available with PC sound cards.

Playing Music


Mobile devices have dedicated sound hardware for compressed sounds. iOS devices can play back one compressed stream at a time in hardware (basically for free). Other sounds it plays back are uncompressed, and take a small amount of CPU time to process. It is recommended that you play any background music (or possibly ambient audio) as a compressed .mp3 file, for two reasons. First, the memory for these huge music/sound files would be pretty abusive since they are uncompressed. Secondly, there will not be the CPU hit for constant-playing audio streams.

Currently there is no way to use a SoundCue and have it automatically play an .mp3 instead. The PlayMusicTrack kismet action, however, can have an override MP3Filename set in the MusicTrack. If you specify an MP3Filename, then at cook time, the reference to the SoundCue will be NULLed out to remove the reference to the probably very large SoundNodeWave.

Other than using PlayMusicTrack in Kismet, the way to play music is via script code or Kismet using console commands:

     mobile PlaySong <SongName>
     mobile StopSong
  

Note: SongName has no path or extension information and is case sensitive!

There is no way to play multiple songs at the same time. In iOS, if you play another song while one is currently playing, the first song will fade out, and then the new song will fade in.

On Android, the music will currently just switch from one song to the next.

  • Android support is available to full UE3 source licensees. If you are developing a UDK title and wish to explore moving from UDK to UE3 in order to target additional platforms, please contact the sales team at Epic to discuss our competitive terms and licensing options.

MP3 file location

The file must be placed into your game's Music directory, for instance:

     //depot/UnrealEngine3/UDKGame/Build/IPhone/Resources/Music/AmbientTrack.mp3
     //depot/UnrealEngine3/UDKGame/Build/Android/Resources/Music/AmbientTrack.mp3
  

And you would play it with "mobile PlaySong AmbientTrack".

DSP Effects


DSP-style effects (reverb, etc) are not supported on mobile platforms.