[Gcblue-commits] gcb_wx/include/common tcSound.h,1.17,1.18 tcSoundConsole.h,1.11,1.12
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2005-01-27 01:02:25
|
Update of /cvsroot/gcblue/gcb_wx/include/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11058/include/common Modified Files: tcSound.h tcSoundConsole.h Log Message: Multiple smoke trail fixes Animation tweaks Index: tcSoundConsole.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/common/tcSoundConsole.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** tcSoundConsole.h 2 Nov 2004 04:23:54 -0000 1.11 --- tcSoundConsole.h 27 Jan 2005 01:01:43 -0000 1.12 *************** *** 42,46 **** void SetDelayedTextEffect(bool effectOn); ! void SetEffect(int anEffect) {mnSoundEffect=anEffect;} void SetLineSpacing(int anSpacing); void SetWrap(int n); --- 42,46 ---- void SetDelayedTextEffect(bool effectOn); ! void SetEffect(const std::string& effect) {soundEffect = effect;} void SetLineSpacing(int anSpacing); void SetWrap(int n); *************** *** 53,57 **** private: tcConsoleBox* textBox; ! int mnSoundEffect; ///< sound effect to use when printing text unsigned int lastEffect; ///< counter value when last sound effect was played }; --- 53,57 ---- private: tcConsoleBox* textBox; ! std::string soundEffect; ///< sound effect to use when printing text unsigned int lastEffect; ///< counter value when last sound effect was played }; Index: tcSound.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/common/tcSound.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** tcSound.h 16 Jan 2005 18:35:56 -0000 1.17 --- tcSound.h 27 Jan 2005 01:01:43 -0000 1.18 *************** *** 45,80 **** #define OGG_PATH "sound\\ogg\\" - #define SEFFECT_EXPLOSION 0 - #define SEFFECT_SHORTBEEP 1 - #define SEFFECT_IMPLOSION 2 - #define SEFFECT_MISSILELAUNCH 3 - #define SEFFECT_TWOBEEPS 4 - #define SEFFECT_CONSOLE 5 - #define SEFFECT_BEEP2 6 - #define SEFFECT_REJECTBEEP 7 - #define SEFFECT_LIGHTSABER 8 - #define SEFFECT_PING 9 - #define SEFFECT_PING2 10 - #define SEFFECT_PING3 11 - #define SEFFECT_LOWBEEP 12 - #define SEFFECT_BLOOP 13 - #define SEFFECT_NOISYBEEP 14 - #define SEFFECT_THUCK 15 - #define SEFFECT_EXPLOSION2 16 - #define SEFFECT_WELCOME 17 - #define SEFFECT_JETLAUNCH 18 - #define SEFFECT_MUTEDBEEP 19 - #define SEFFECT_INTERCOM 20 - #define SEFFECT_FSLIDE 21 - #define SEFFECT_NAVALGUN 22 - #define SEFFECT_HELOLAUNCH 23 - #define SEFFECT_RADARON 24 - #define SEFFECT_RADAROFF 25 - #define SEFFECT_TORPEDOLAUNCH 26 - #define SEFFECT_SONARDETECT 27 ! #define N_SEFFECT 28 ! ! #define N_EFFECT_BUFFERS 16 --- 45,50 ---- #define OGG_PATH "sound\\ogg\\" ! #define N_EFFECT_BUFFERS 32 *************** *** 96,99 **** --- 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); *************** *** 107,117 **** void SetMusicVolume(float vol); void StopMusic(int anTrack); ! void StopMusic(void); ! void PlayRandomMusic(void); void UpdateAutoMusic(double afStatusTime); ! void Test(void); ! bool Init(void); ! void UnInit(void); private: --- 80,98 ---- void SetMusicVolume(float vol); void StopMusic(int anTrack); ! void StopMusic(); ! void PlayRandomMusic(); void UpdateAutoMusic(double afStatusTime); ! void Test(); ! bool Init(); ! void UnInit(); ! ! // 3D sound methods ! osgAL::SoundRoot* GetSoundRoot(); ! void InitOsgAL(); ! void SetListenerDirection(const osg::Vec3& dir); ! ! /// Set the transformation matrix for the listener ! void SetListenerMatrix(const osg::Matrix& matrix); private: *************** *** 120,131 **** ~tcSound(); ! std::map<std::string, int> effectMap; tcOggStreamer *oggStreamer; ///< class for streaming Ogg music ! struct _effectbuffinfo ! { ! int maAvailableBuffers[N_EFFECT_BUFFERS]; ! int mnAvailable; ! } msEffectBufferInfo; bool mbInitialized; --- 101,115 ---- ~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 ! std::deque<size_t> available; tcOggStreamer *oggStreamer; ///< class for streaming Ogg music ! ! bool mbInitialized; *************** *** 136,149 **** long mnEffectVolume; - int effectsrc; ! ALuint SourceEffect[N_EFFECT_BUFFERS]; ///< these are sources TODO change name and make them provate ! ALuint BufferEffect[N_SEFFECT]; ///< these are buffers ! void FillBufferFromFile(char *azFileName,ALuint* buffer); ! bool LoadWavDataFromFile(char *azFileName, unsigned anEffectID); ! int GetEffectBuffer(void); ! void ReleaseEffectBuffer(int); ! void ReleaseStoppedBuffers(void); }; --- 120,130 ---- long mnEffectVolume; ! osg::ref_ptr<osgAL::SoundRoot> soundRoot; ///< for 3D sound with osgAL ! ! int GetEffectBuffer(); ! void ReleaseEffectBuffer(int bufferIdx); ! void ReleaseStoppedBuffers(); }; |