Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals

arssound.h

Go to the documentation of this file.
00001 /*
00002          _/_/_/     _/_/_/   _/_/_/_/    _/_/_/    _/    _/  _/_/_/_/ _/_/_/_/    _/_/_/   _/_/_/_/
00003         _/    _/  _/    _/  _/     _/  _/     _/  _/    _/  _/       _/     _/  _/    _/  _/     _/
00004        _/    _/  _/    _/  _/     _/  _/     _/  _/    _/  _/       _/     _/  _/    _/  _/     _/
00005       _/_/_/    _/    _/  _/_/_/_/   _/     _/  _/    _/  _/_/_/   _/_/_/_/   _/    _/  _/_/_/_/
00006      _/     _/ _/    _/  _/  _/     _/     _/  _/    _/  _/       _/  _/     _/    _/  _/  _/
00007     _/     _/ _/    _/  _/   _/    _/   _/_/  _/    _/  _/       _/   _/    _/    _/  _/   _/
00008    _/     _/ _/    _/  _/    _/     _/_/_/   _/    _/  _/       _/    _/   _/    _/  _/    _/
00009   _/_/_/_/   _/_/_/   _/     _/         _/   _/_/_/   _/_/_/_/ _/     _/   _/_/_/   _/     _/
00010 
00011   \author Hannosset Christophe
00012   \date 2 - Nov - 2003
00013 */
00014 
00015 #if !defined( __ARSSOUND_H__ )
00016 #define __ARSSOUND_H__
00017 
00018 namespace Ars
00019 {
00020         class Sounds    {
00021         protected:
00022 
00023                 Mix_Chunk *wave;
00024 
00025                 int     channel;
00026                 int     ticks;
00027                 int     loop;
00028                 int     id;
00029 
00030         public:
00031 
00032                 Sounds( void );
00033 
00034                 ~Sounds( void );
00035 
00036                 const bool Load( const string &aSection , const string &akey , string aCfgFile = "" );
00037                 const bool Load( const string &aFilename );
00038 
00039                 void Configure( const int channel = 0 , const int nr = 0 , const int ticks = -1 );
00040                 void Play( const int channel = -2 , const int nr = -2 , const int ticks = -2 );
00041 
00042                 operator Mix_Chunk *( void )    {       return wave;    } 
00043                 const bool operator==( const Sounds &snd )      {       return id == snd.id;    }
00044         };
00045 
00046         Sounds &GetSound( const icstring &name );
00047         Sounds &AddSound( const icstring &name , const string &aSection , const string &akey , string aCfgFile = "" );
00048         Sounds &AddSound( const icstring &name , const string &aFilename );
00049         void Preload( const icstring &aSection );
00050         void UnloadSounds( void );
00051 }
00052 #endif

Generated on Fri Dec 5 04:05:59 2003 for Borqueror by doxygen 1.3.3