[Gcblue-commits] gcb_wx/include/common tcSound.h,1.18,1.19
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2005-02-21 18:26:46
|
Update of /cvsroot/gcblue/gcb_wx/include/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22705/include/common Modified Files: tcSound.h Log Message: Replaced osgAL with OpenAL++ exclusively due to instability issues. Index: tcSound.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/common/tcSound.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** tcSound.h 27 Jan 2005 01:01:43 -0000 1.18 --- tcSound.h 21 Feb 2005 18:25:54 -0000 1.19 *************** *** 1,6 **** ! /* ! ** tcSound.h ! ** ! ** Copyright (C) 2003 Dewitt Colclough (de...@tw...) ** All rights reserved. --- 1,6 ---- ! /** ! ** @file tcSound.h ! */ ! /* Copyright (C) 2003-2005 Dewitt Colclough (de...@tw...) ** All rights reserved. *************** *** 28,40 **** #endif ! #include <AL/al.h> ! #include <AL/alut.h> ! #include <AL/alc.h> ! #include "osgAL/SoundNode" ! #include "osgAL/SoundRoot" ! #include "osgAL/SoundManager" ! #include "osgAL/SoundState" #include <string> #include <map> --- 28,42 ---- #endif ! //#include <AL/al.h> ! //#include <AL/alut.h> ! //#include <AL/alc.h> ! #include <openalpp/alpp.h> ! //#include "osgAL/SoundNode" ! //#include "osgAL/SoundRoot" ! //#include "osgAL/SoundManager" ! //#include "osgAL/SoundState" + #include <queue> #include <string> #include <map> *************** *** 58,61 **** --- 60,65 ---- }; + + /** * Singleton class for sound *************** *** 66,72 **** static tcSound* Get(); - /// for 3D sound - osg::ref_ptr<osgAL::SoundNode> CreateSound(const std::string& file); - bool GetMusicPause() const; void PlayEffect(int anEffect); --- 70,73 ---- *************** *** 88,92 **** --- 89,96 ---- void UnInit(); + #if 0 // 3D sound methods + osg::ref_ptr<osgAL::SoundNode> CreateSound(const std::string& file); + osgAL::SoundRoot* GetSoundRoot(); void InitOsgAL(); *************** *** 95,98 **** --- 99,103 ---- /// Set the transformation matrix for the listener void SetListenerMatrix(const osg::Matrix& matrix); + #endif private: *************** *** 101,108 **** ~tcSound(); ! std::map<std::string, openalpp::Sample*> effectMap; ! /// buffer of SoundState's to use for non-directional sound effects ! std::vector<osg::ref_ptr<osgAL::SoundState> > effectBuffer; /// fifo of indices of available effectSounds --- 106,113 ---- ~tcSound(); ! std::map<std::string, openalpp::ref_ptr<openalpp::Sample> > effectMap; ! /// buffer of openalpp::Source to use for non-directional sound effects ! std::vector<openalpp::ref_ptr<openalpp::Source> > effectBuffer; /// fifo of indices of available effectSounds *************** *** 111,116 **** tcOggStreamer *oggStreamer; ///< class for streaming Ogg music - - bool mbInitialized; int mnCurrentTrack; --- 116,119 ---- *************** *** 120,128 **** long mnEffectVolume; ! ! osg::ref_ptr<osgAL::SoundRoot> soundRoot; ///< for 3D sound with osgAL ! int GetEffectBuffer(); void ReleaseEffectBuffer(int bufferIdx); void ReleaseStoppedBuffers(); --- 123,131 ---- long mnEffectVolume; ! // osg::ref_ptr<osgAL::SoundRoot> soundRoot; ///< for 3D sound with osgAL int GetEffectBuffer(); + void InitOpenAL(); + openalpp::Sample* LoadSample(const std::string& file); void ReleaseEffectBuffer(int bufferIdx); void ReleaseStoppedBuffers(); |