Adding sound to your C or C++ application with VSS
Camille Goudeseune, Integrated Systems Laboratory, Beckman Institute
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
(Virtual Sound Server), developed and supported by the
at NCSA from 1993-2000
and now maintained by Camille Goudeseune at the Beckman Institute's
Illinois Simulator Laboratory.
Bill Sherman and David Zielinksi helped maintain it in 2005-2007.
The latest version of this document is at
You should have a computer that can make sound:
Contact Camille Goudeseune
about getting a prerelease copy of VSS for Windows.
- 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.
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.
comments apply to the ears as well as to the eyes.
OK, now that the philosophy's out of the way, on to the nuts and bolts.
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.
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.
gives hints on troubleshooting.