audio

command
v0.0.0-...-fc8682f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2015 License: BSD-2-Clause Imports: 1 Imported by: 0

README

Audio Demo

What does it do?

It demonstrates how one can play audio.

For doing so, it created bird noises as a background sound, and some weird man's voice as a sound effect, when pressing SPACE.

One can zoom in/out, and hear the sound effect increase/decrease in volume. This is because every non-background sound, is rendered in 3d.

What are important aspects of the code?

These things are key in this demo:

  • game.AddSystem(&engi.AudioSystem{}), to add/enable the AudioSystem;
  • The moveSystem, to enable the sound effects / graphical effects;
  • entity.AddComponent(&engi.AudioComponent{File: "326064.wav", Repeat: false}), to add the audio component as a sound effect;
  • backgroundMusic.AddComponent(&engi.AudioComponent{File: "326488.wav", Repeat: true, Background: true}), to dd the audio component as background music.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL