AudioManager.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of Micole Architecture
00003  *
00004  * Copyright (C) 2007 Micole partners
00005  *
00006  * Micole Architecture is free software: you can redistribute it 
00007  * and/or modify it under the terms of the GNU Lesser General 
00008  * Public License as published by the Free Software Foundation, 
00009  * either version 3 of the License, or (at your option) any 
00010  * later version.
00011  *
00012  * Micole Architecture is distributed in the hope that it will be 
00013  * useful, * but WITHOUT ANY WARRANTY; without even the implied 
00014  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00015  * PURPOSE.  See the GNU Lesser General Public License for more 
00016  * details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with Micole Architecture.  If not, see
00020  * <http://www.gnu.org/licenses/>.
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

Generated on Tue Oct 16 17:10:42 2007 for Micole by  doxygen 1.4.7