[Orxonox-commit 193] r2866 - in branches/sound/src: . sound

erwin at orxonox.net erwin at orxonox.net
Mon Mar 30 15:34:39 CEST 2009


Author: erwin
Date: 2009-03-30 13:34:39 +0000 (Mon, 30 Mar 2009)
New Revision: 2866

Added:
   branches/sound/src/sound/
   branches/sound/src/sound/SoundBase.h
   branches/sound/src/sound/SoundManager.h
   branches/sound/src/sound/copyheader
Removed:
   branches/sound/src/audio/
Log:
Added src/sound and some files

Added: branches/sound/src/sound/SoundBase.h
===================================================================
--- branches/sound/src/sound/SoundBase.h	                        (rev 0)
+++ branches/sound/src/sound/SoundBase.h	2009-03-30 13:34:39 UTC (rev 2866)
@@ -0,0 +1,58 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *       Erwin 'vaiursch' Herrsche
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include <al.h>
+
+class Ogre::SceneNode;
+class Orxonox::SoundManager;
+
+namespace orxonox
+{
+
+    class SoundBase
+    {
+    public:
+        SoundBase(Ogre::SceneNode* node);
+        ~SoundBase();
+
+        void attachToNode(Ogre::SceneNode* node);
+        void update();
+        void play(bool loop);
+        void stop();
+        void pause();
+
+        bool isPlaying();
+
+    private:
+        ALuint source_;
+        ALuint buffer_;
+        Ogre::SceneNode* node_;
+
+        static SoundManager* soundmanager_s;
+    }; // class SoundBase
+} // namepsace orxonox

Added: branches/sound/src/sound/SoundManager.h
===================================================================
--- branches/sound/src/sound/SoundManager.h	                        (rev 0)
+++ branches/sound/src/sound/SoundManager.h	2009-03-30 13:34:39 UTC (rev 2866)
@@ -0,0 +1,52 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *       Erwin 'vaiursch' Herrsche
+ *   Co-authors:
+ *      ...
+ */
+
+#include <al.h>
+#include <alc.h>
+
+class SoundBase;
+
+namespace Orxonox
+{
+    class SoundManager : public Tickable
+    {
+    public:
+        SoundManager();
+        
+        void addSound(SoundBase* sound);
+        void removeSound(SoundBase* sound);
+
+        void tick(float dt);
+
+    private:
+        ALCcontext* context_;
+        ALCdevice* device_;
+
+        std::list<SoundBase*> soundlist_;
+
+    }; // class SoundManager
+} // namespace Orxonox

Added: branches/sound/src/sound/copyheader
===================================================================
--- branches/sound/src/sound/copyheader	                        (rev 0)
+++ branches/sound/src/sound/copyheader	2009-03-30 13:34:39 UTC (rev 2866)
@@ -0,0 +1,28 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *       Erwin 'vaiursch' Herrsche
+ *   Co-authors:
+ *      ...
+ *
+ */
+




More information about the Orxonox-commit mailing list