Anyway, there are 3 types of sounds set up: background music, voice, and sound effect. Each having a corresponding master output level. So, you can change the volume of each particular file and the player can change the master volume for the particular types.
Example:
#include "include/dft.h"int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int){ dft::Audio::Device Device; if(!Device.Create()) return 0; Device.SetBackgroundMusicOutputLevel(0.5f); // Background music plays at half volume. Device.SetVoiceOutputLevel(1.0f); // Voice files play at full volume. Device.SetSoundEffectOutputLevel(0.75f); // Sound effects play at three quarters volume. dft::Audio::Sound Sound, SoundFx; if(!Sound.Load(Device, "gamestartup1.mp3", dft::Audio::Sound::Types::BackgroundMusic)) // load a background music file return 0; if(!SoundFx.Load(Device, "617-death03.ogg", dft::Audio::Sound::Types::SoundEffect)) // load a sound effect return 0; Sound.Play(false); SoundFx.Play(true); Sound.SetVolume(1.0f); SoundFx.SetVolume(0.5f); while(Sound.IsPlaying()); return 0;}
Pretty much, SoundFx keeps repeating until Sound is finished playing. Once I get a GUI hooked in, I'll have to test panning and such better, but it seems to work fine. Another thing I have to test is pausing and continuing and I also need to implement background music fading so I can fade one song out and another in.
YAY SOUND!
Now onto actually making the engine to run this thing. But that's for another day; time for bed as soon as I finish this.
(Btw, yes, this is for SuperRPG.)
Invasion has some changes going on. I finally decided to go to top-down instead of what I had (3/4; RPG style.) Other than that, the storyline has changed a little and Fall of Man is being pushed back to make way for Invasion: Hell Comes to Earth. The new storyline has three distinct main events which I'll be spreading across three games. YAY TRILOGY! Anyway, I'm not spending too much time on Invasion right now; just when I'm away from my computer and can't code stuff for SuperRPG. Just wanted to let you guys know what's going on with it.