Jump to content
  • Advertisement
  • entries
  • comments
  • views


Sign in to follow this  


I finally got the audio module implemented. I spent a little while fucking around with ogg and DirectSound before I said screw it, downloaded Audiere, and wrapped that. It's not the most impressive audio module of course; far from it. However, I don't, and never have, wanted to be an audio programmer. Some time in the future I may delve further into that, but I doubt it. I can play background music and sound effects and that's all I need.

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.


#include "include/dft.h"

dft::Audio::Device Device;
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;

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.


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.
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!