Files
SDLPongCPP/TrooperEngineDLL/TrooperEngine/AudioEngine/cMusic.hpp
T
2018-06-25 21:48:45 -04:00

47 lines
911 B
C++

#ifndef _CMUSIC_HPP_
#define _CMUSIC_HPP_
/*** SDL Header Files ***/
#include <SDL.h>
#include <SDL_mixer.h>
/*** Custom Header Files ***/
//#include "cAudio.hpp"
/*** DLL Header File ***/
#include "dllExport.h"
#include "cSound.hpp"
namespace AudioEngine {
class EXPORT_FROM_MYDLL cMusic
{
public:
cMusic();
/* Copy constructor */
cMusic( const cMusic& copy );
~cMusic();
///Functions
/* Plays the music if loaded */
void PlayMusic();
/* Fades in the music for time */
void FadeIn( const unsigned int time = 1000 ) const;
/* Fades out the music for time */
void FideOut( const unsigned int time = 1000 ) const;
private:
///Functions
void LoadMusic();
void UnloadMusic();
private:
///Variables
Mix_Music* mp_music;
unsigned char m_volume;// = 255
};/// END CLASS DEFINITION cMusic
}/// END NAMESPACE DEFINITION AudioEngine
#endif/// END IFNDEF _CMUSIC_HPP_