Game Development Reference
In-Depth Information
A common example of the Doppler Effect is a police car or ambulance driving
past—as the vehicle passes, the frequency of the siren changes. Because the game
we'll be making will be 2D, we won't use this functionality, but it can be very
useful. Dig around the documentation and experiment with the library to get the
full benefit from it.
To start using OpenAL the reference needs to be added to the engine library
project. It's called ''Tao Framework Tao.OpenAl Binding for .NET.'' If it is not
listed under the .NET tab of the Add Reference dialog then choose the Browse
tab and navigate to the Tao framework install directory \TaoFramework\bin
and choose it from there. OpenAL also requires alut.dll, ILU.dll, and OpenAL32.dll
to be copied to the bin/debug and bin/release directories. These dll files
can be found in your Tao Framework install directory, \TaoFramework\lib .
A skeleton class can then be created based on the simple idealized API and how
the TextureManager works. First, a sound class needs to be made. This class
will represent a sound being played.
public class Sound
{
}
This sound class can then be used to build up the sound manager skeleton class.
Remember these classes should be added to the engine project because this code
can be used by many games.
public class SoundManager
{
public SoundManager()
{
}
public void LoadSound(string soundId, string path)
{
}
public Sound PlaySound(string soundId)
{
return null;
}
public bool IsSoundPlaying(Sound sound)
 
Search WWH ::




Custom Search