You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unlike some popular major engines, our sound system need not support sound locality (a.k.a. Sound attenuation). This should considerably reduce the complexity of designing the sound system.
The system will be designed similarly to the existing animation system.
An Entity should have a SoundAttribute. The sound attribute should have a collection of sounds with unique keys.
Unlike drawables, there will not be different types of sounds.
The basic API for a sound will be:
class Sound {
bool loopSound; // property to loop the sound clip when it ends (default should be false)
float volume; // property to set the default volume of the clip. volume ranges from [0,1] where 1 is full volume
(() => float) pitchModulationFunction; // property to modify the pitch each time playSound is called (default should return 1); pitch > 1 means a higher pitch, < 1 means a lower pitch
(() => float) volumeModulationFunction; // property to modify the volume each time playSound is called (default should return 1); volume ranges from [0,1] where 1 is full volume
(() => float) durationModulationFunction; // property to modify the duration each time playSound is called; duration will be multiplied by the default duration
void playSound(); // plays a sound
void stopSound(); // Stops the sound early
}
The text was updated successfully, but these errors were encountered:
We should have means for playing sound.
Unlike some popular major engines, our sound system need not support sound locality (a.k.a. Sound attenuation). This should considerably reduce the complexity of designing the sound system.
The system will be designed similarly to the existing animation system.
An Entity should have a SoundAttribute. The sound attribute should have a collection of sounds with unique keys.
Unlike drawables, there will not be different types of sounds.
The basic API for a sound will be:
The text was updated successfully, but these errors were encountered: