MyAudio project is a library based on XAudio2 which can be used for adding and loading sounds to your game easily.
Main features are as follows:
Play/stop/pause/resume/loop wave files
Add effects to your audio
Set the volume/pitch of your audio
Initialization of audio classes will need lua files that include paths and descriptions of how you would like to play those files, such as:
return{
audio = “audio file path”,
loop = false,
autoplay = false,
volume = 0,
pitch = 1.0,
effects = {
--Effect names here
},
};
There will also be interfaces for you to control audio during run-time, such as:
cAudio.Play()/Stop()/Pause()/Resume()
cAudio.SetAutoplay()/GetAutoplay()
cAudio.SetVolume(float)/GetVolume()
cAudio.SetPitch(float)/GetPitch()
cAudio.DisableEffect()/EnableEffect()/SetEffect(AudioEffect)
The main challenge I think I’ll be facing is to set up the project and learn how to use the library. If I have enough time, I also want to implement interfaces to allow audio programmers to write their own effects.
Comments