Audio overview

A sound is emitted from a source, for instance a speaker or perhaps a vehicle in a Unity game. Sound is received by a listener in the real world, maybe a user's ears or a microphone.

Since we have two ears, just by listening to sound, we can tell many details about it:

  • What was the weight of the object that emitted the sound?
  • In what direction did the sound come from?
  • Was it hollow or solid?
  • What type of environment produced the sound?
  • Is it a real or synthesized sound?

These details help us in our daily lives. They allow us to communicate verbally; they let us know if someone is trying to contact us, if our lunch is ready, and often they warn us of danger.

Unity has designed its audio system around these core principles with two primary components: the Audio Source and the Audio Listener.

The Audio Source is a component that is attached to GameObjects. A sound is assigned to the Audio Source, and it is either played on a constant loop or is triggered to play when certain conditions are met.

After the sound is emitted, it is received by the Audio Listener, which then transmits those sounds to the player through their speakers or headphones.

Before we get any deeper into the sound element of things, we need to reveal the project that we are going to start in this chapter and will be working on throughout the rest of the book.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.107.241