OpenMortal Apocalypse mirror
Sourceforge mirror
SourceForge.net Logo
      News | Info | Characters | Arenas | Screenshots | Forums | Download  
Developer: Making of | Character-HOWTO | AI Design | Submit a Character
Documentation: Main Page | Modules | Class Hierarchy | Class List | File List

Audio.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           Audio.h  -  description
00003                              -------------------
00004     begin                : Sat Jul 26 2003
00005     copyright            : (C) 2003 by upi
00006     email                : upi@apocalypse.rulez.org
00007  ***************************************************************************/
00008 
00009 
00010 #ifndef OPENMORTAL_AUDIO_H
00011 #define OPENMORTAL_AUDIO_H
00012 
00013 
00014 #ifndef NULL
00015 #define NULL 0
00016 #endif
00017 
00018 
00019 class COpenMortalAudioPriv;
00020 
00029 class COpenMortalAudio
00030 {
00031 public:
00032     COpenMortalAudio();
00033     ~COpenMortalAudio();
00034     void LoadSampleMap();
00035 
00036 public:
00037     // Sample related methods
00038     
00039     void LoadSample( const char* a_pcFilename, const char* a_pcSampleName=NULL );
00040     void UnloadSample( const char* a_pcSampleName );
00041     void PlaySample( const char* a_pcSampleName );
00042     void PlayFile( const char* a_pcFilename );
00043 
00044     // Music related methods
00045 
00046     void LoadMusic( const char* a_pcFilename, const char* a_pcMusicName=NULL );
00047     void UnloadMusic( const char* a_pcMusicName );
00048     void PlayMusic( const char* a_pcMusicName );
00049     void FadeMusic( int a_iMilliSec );
00050     void SetMusicVolume( int a_iVolume );
00051     void StopMusic();
00052     bool IsMusicPlaying();
00053 
00054 protected:
00055     // Attributes
00056 
00057     COpenMortalAudioPriv* m_poPriv;
00058 };
00059 
00060 
00061 extern COpenMortalAudio* Audio;
00062 
00063 #endif // ifdef OPENMORTAL_AUDIO_H