00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef AUDIOMANAGER_H
00024 #define AUDIOMANAGER_H
00025
00026 #pragma warning(disable:4786)
00027
00028 #include <map>
00029 #include <string>
00030
00031 #include <bass.h>
00032
00033 #include "AudioDevice.h"
00034
00035 typedef std::map<std::string, AudioDevice*> AudioDeviceMap;
00036 typedef std::map<int, std::string> ErrorCodeMap;
00037
00039
00042 class AudioManager {
00043
00044 private:
00045
00046 static AudioDeviceMap audioDeviceMap;
00047 static ErrorCodeMap errorCodeMap;
00048
00049 static void FillUpErrorCodeMap (void);
00050 static void CheckError (void);
00051
00052 public:
00053
00055
00058 __declspec(dllexport) static void Initialise (void);
00059
00061
00064 static void CleanUp (void);
00065
00067
00070 static AudioDevice* InitialiseNextDevice (std::string id);
00071
00073
00076 static bool CloseDevice (std::string id);
00077
00079
00082 static AudioDevice* GetAudioDevice (std::string id);
00083
00085 static uint8 GetAudioDeviceNum (void);
00086
00088
00091 static bool SetActiveDevice (std::string id);
00092 };
00093
00094 #endif // Do not add stuff beyond this point