Adding sound to your C or C++ application with VSS
a.k.a.
Camille Goudeseune, NCSA Audio Group
2/25/00
1. Overview
This website tells you how to add sound to an application written
in C or in C++ (as most CAVE applications are).
Theory is kept to a minimum.
The sound system used is
VSS
(Virtual Sound Server), developed and supported by the
Audio Group
at NCSA since 1993.
The latest version of this document is at
http://cage.ncsa.uiuc.edu/adg/VSS/doc/dummies/.
You should have a computer that can make sound:
either
- an SGI running Irix 5.3 or greater,
- a PC running Linux (Red Hat 5.2+, with OSS or ALSA sound drivers), or
- a PC running Windows 95, Windows NT 4.0 or greater.
Contact Camille Goudeseune
about getting a prerelease copy of VSS for Windows.
You will run VSS on such a computer; your application can run on
the same computer or on another one networked to the first one.
2. Why bother?
Of course your application doesn't need sound. By the same reasoning,
it doesn't need a GUI or color. More seriously, though, your application
may have more considerations than just quick development: things like
intelligibility, ease of use, ease of learning and understanding,
preventing user error.
Like any other part of your application which isn't the core computation,
sound helps users of your application get their job done.
Again like these other parts, sound design is best when it's subtle.
You're not presenting Mahler's Second Symphony,
and you're not showing off how deep your menus nest.
You just want your application to be as clear and "good" as possible.
Insofar as sound can achieve this goal, let's use sound.
Tufte's
comments apply to the ears as well as to the eyes.
3. Contents
OK, now that the philosophy's out of the way, on to the nuts and bolts.
-
The first part of this website
shows you how to get the most basic level of sound running with your application,
a background ambience.
-
The second part
shows you how to adjust sounds while they're playing.
After all, a computer is more than just a tape recorder.
-
The third part
gives you a checklist to see where sound can improve
your application, and shows you how the data in your
application can be made to change sounds
("data sonification", analogous to data visualization).
-
The fourth part
shows advanced examples of using VSS.
-
An appendix
gives hints on troubleshooting.
All these parts provide several examples you can try out interactively.
You can immediately cut-and-paste the examples into your own application,
as-is or for further tweaking.