Sounds & Music

Sounds and Music in Construct 2 are audio files. Any sound files the project uses will be exported with the project. Because browser makers cannot agree on a single format for the web, these must be encoded in to two formats: Ogg Vorbis (.ogg) and MPEG-4 AAC (.m4a).

To import and play back audio in Construct 2, the following steps are required:

  1. Import sounds by right-clicking the Sounds or Music folders in the Project Bar and selecting Import sounds or Import music.
  2. Import audio via the Import Audio dialog.
  3. Add the Audio object to the project and add events to play back audio.

For more information on audio support in Construct 2, see the information in the section on the Import Audio dialog.

MIME types

In order for your server to send audio files correctly, it must be set up with the correct MIME types. If the server sends the wrong MIME types, audio may not play in some browsers.

Tags: