00001 /* 00002 * ExNihilo 3D Engine 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU Library General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 * 00018 * Please read AUTHORS file !!! 00019 * 00020 * $Id: ExManagerSound.cpp,v 1.10 2002/08/01 18:45:58 data Exp $ 00021 * 00022 */ 00023 00024 #include "ExManagerSound.h" 00025 00026 ExManagerSound::ExManagerSound (void) { 00027 00028 } 00029 00030 ExManagerSound::~ExManagerSound (void) { 00031 alcDestroyContext (context_id); 00032 } 00033 00034 bool ExManagerSound::Init (void) { 00035 Guard (void ExManagerSound::init (void)) 00036 00037 dev = alcOpenDevice (NULL); 00038 if (dev == NULL) { 00039 *Consol<<"Can not initialize Audio device"<<std::endl; 00040 return false; 00041 } 00042 00043 context_id = alcCreateContext (dev, NULL); 00044 if (context_id == NULL) { 00045 alcCloseDevice (dev); 00046 *Consol<<"Can not initialize Audio device"<<std::endl; 00047 return false; 00048 } 00049 00050 UnGuard 00051 return true; 00052 } 00053 00054 void ExManagerSound::DisplayAviableInput (void) { 00055 Guard (void ExManagerSound::DisplayAviableInput (void)) 00056 *Consol<<"****************************************"<<std::endl; 00057 *Consol<<"*Checking for Audio *"<<std::endl; 00058 *Consol<<"****************************************"<<std::endl; 00059 *Consol<<"Company : "<<alGetString (AL_VENDOR)<<std::endl; 00060 *Consol<<"Version : "<<alGetString (AL_VERSION)<<std::endl; 00061 *Consol<<"Renderer : "<<alGetString (AL_RENDERER)<<std::endl; 00062 *Consol<<"Extensions : "<<alGetString (AL_EXTENSIONS)<<std::endl; 00063 if (alIsExtensionPresent ((ALubyte*) "AL_LOKI_attenuation_scale")) 00064 { 00065 *Consol<<"Found AL_LOKI_attenuation_scale"<<std::endl; 00066 } 00067 UnGuard 00068 } 00069 00070 bool ExManagerSound::LoadSound (std::string file) { 00071 Guard (bool ExManagerSound::LoadSound(std::string file)) 00072 00073 UnGuard 00074 return false; 00075 } 00076 00077 void ExManagerSound::PlaySound (std::string file) { 00078 Guard (void ExManagerSound::PlaySound (std::string file)) 00079 UnGuard 00080 } 00081 00082 void ExManagerSound::StopSound (std::string file) { 00083 Guard (void ExManagerSound::StopSound (std::string file)) 00084 UnGuard 00085 } 00086 00087 int ExManagerSound::GetSound (std::string file) { 00088 Guard (ExCSound* ExManagerSound::GetSound (std::string file)) 00089 return -1; 00090 UnGuard 00091 } 00092 00093 bool ExManagerSound::RemoveSound (std::string file) { 00094 Guard (bool ExManagerSound::RemoveSound (std::string file)) 00095 return true; 00096 UnGuard 00097 } 00098 00099 void ExManagerSound::ListAllSound (void) { 00100 Guard (void ExManagerSound::ListAllSound (void)) 00101 00102 UnGuard 00103 } 00104 00105 void ExManagerSound::Reset (void) { 00106 Guard (void ExManagerSound::Reset (void)) 00107 UnGuard 00108 } 00109