[Python-ogre-commit] SF.net SVN: python-ogre: [388] trunk/python-ogre
Brought to you by:
andy_miller,
roman_yakovenko
|
From: <and...@us...> - 2007-09-22 11:41:01
|
Revision: 388
http://python-ogre.svn.sourceforge.net/python-ogre/?rev=388&view=rev
Author: andy_miller
Date: 2007-09-22 04:41:04 -0700 (Sat, 22 Sep 2007)
Log Message:
-----------
Opcode now part of the "thirdparty source tree, as is quickgui, ogreal, plib etc
Modified Paths:
--------------
trunk/python-ogre/ThirdParty/quickgui/QuickGUI.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIEventArgs.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIExportDLL.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIImage.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIImage.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUILabel.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUILabel.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIListItem.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIListItem.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIMemberFunctionPointer.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenu.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenu.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuList.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuList.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIMouseCursor.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIMouseCursor.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUINStateButton.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUINStateButton.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIPanel.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIPanel.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIProgressBar.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIProgressBar.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUISheet.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUISheet.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUITextBox.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUITextBox.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUITitleBar.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUITitleBar.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIWindow.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIWindow.h
trunk/python-ogre/code_generators/bullet/generate_code.py
trunk/python-ogre/code_generators/bullet/python_bullet_aliases.h
trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py
trunk/python-ogre/code_generators/opcode/generate_code.py
trunk/python-ogre/environment.py
trunk/python-ogre/scripts/01-RetrieveSource.sh
trunk/python-ogre/scripts/02-ExtractAndPatch.sh
trunk/python-ogre/scripts/06-GenerateCode.sh
Added Paths:
-----------
trunk/python-ogre/ThirdParty/ogreal/
trunk/python-ogre/ThirdParty/ogreal/Makefile.am
trunk/python-ogre/ThirdParty/ogreal/OgreAL.h
trunk/python-ogre/ThirdParty/ogreal/OgreALListener.cpp
trunk/python-ogre/ThirdParty/ogreal/OgreALListener.h
trunk/python-ogre/ThirdParty/ogreal/OgreALOggSound.cpp
trunk/python-ogre/ThirdParty/ogreal/OgreALOggSound.h
trunk/python-ogre/ThirdParty/ogreal/OgreALOggSoundStream.cpp
trunk/python-ogre/ThirdParty/ogreal/OgreALOggSoundStream.h
trunk/python-ogre/ThirdParty/ogreal/OgreALPrereqs.h
trunk/python-ogre/ThirdParty/ogreal/OgreALSound.cpp
trunk/python-ogre/ThirdParty/ogreal/OgreALSound.h
trunk/python-ogre/ThirdParty/ogreal/OgreALSoundManager.cpp
trunk/python-ogre/ThirdParty/ogreal/OgreALSoundManager.h
trunk/python-ogre/ThirdParty/ogreal/OgreALSoundStream.cpp
trunk/python-ogre/ThirdParty/ogreal/OgreALSoundStream.h
trunk/python-ogre/ThirdParty/ogreal/OgreALWavSound.cpp
trunk/python-ogre/ThirdParty/ogreal/OgreALWavSound.h
trunk/python-ogre/ThirdParty/opcode/
trunk/python-ogre/ThirdParty/opcode/Ice/
trunk/python-ogre/ThirdParty/opcode/Ice/IceAABB.cpp
trunk/python-ogre/ThirdParty/opcode/Ice/IceAABB.h
trunk/python-ogre/ThirdParty/opcode/Ice/IceAxes.h
trunk/python-ogre/ThirdParty/opcode/Ice/IceBoundingSphere.h
trunk/python-ogre/ThirdParty/opcode/Ice/IceContainer.cpp
trunk/python-ogre/ThirdParty/opcode/Ice/IceContainer.h
trunk/python-ogre/ThirdParty/opcode/Ice/IceFPU.h
trunk/python-ogre/ThirdParty/opcode/Ice/IceHPoint.cpp
trunk/python-ogre/ThirdParty/opcode/Ice/IceHPoint.h
trunk/python-ogre/ThirdParty/opcode/Ice/IceIndexedTriangle.cpp
trunk/python-ogre/ThirdParty/opcode/Ice/IceIndexedTriangle.h
trunk/python-ogre/ThirdParty/opcode/Ice/IceLSS.h
trunk/python-ogre/ThirdParty/opcode/Ice/IceMatrix3x3.cpp
trunk/python-ogre/ThirdParty/opcode/Ice/IceMatrix3x3.h
trunk/python-ogre/ThirdParty/opcode/Ice/IceMatrix4x4.cpp
trunk/python-ogre/ThirdParty/opcode/Ice/IceMatrix4x4.h
trunk/python-ogre/ThirdParty/opcode/Ice/IceMemoryMacros.h
trunk/python-ogre/ThirdParty/opcode/Ice/IceOBB.cpp
trunk/python-ogre/ThirdParty/opcode/Ice/IceOBB.h
trunk/python-ogre/ThirdParty/opcode/Ice/IcePairs.h
trunk/python-ogre/ThirdParty/opcode/Ice/IcePlane.cpp
trunk/python-ogre/ThirdParty/opcode/Ice/IcePlane.h
trunk/python-ogre/ThirdParty/opcode/Ice/IcePoint.cpp
trunk/python-ogre/ThirdParty/opcode/Ice/IcePoint.h
trunk/python-ogre/ThirdParty/opcode/Ice/IcePreprocessor.h
trunk/python-ogre/ThirdParty/opcode/Ice/IceRandom.cpp
trunk/python-ogre/ThirdParty/opcode/Ice/IceRandom.h
trunk/python-ogre/ThirdParty/opcode/Ice/IceRay.cpp
trunk/python-ogre/ThirdParty/opcode/Ice/IceRay.h
trunk/python-ogre/ThirdParty/opcode/Ice/IceRevisitedRadix.cpp
trunk/python-ogre/ThirdParty/opcode/Ice/IceRevisitedRadix.h
trunk/python-ogre/ThirdParty/opcode/Ice/IceSegment.cpp
trunk/python-ogre/ThirdParty/opcode/Ice/IceSegment.h
trunk/python-ogre/ThirdParty/opcode/Ice/IceTriangle.cpp
trunk/python-ogre/ThirdParty/opcode/Ice/IceTriangle.h
trunk/python-ogre/ThirdParty/opcode/Ice/IceTrilist.h
trunk/python-ogre/ThirdParty/opcode/Ice/IceTypes.h
trunk/python-ogre/ThirdParty/opcode/Ice/IceUtils.cpp
trunk/python-ogre/ThirdParty/opcode/Ice/IceUtils.h
trunk/python-ogre/ThirdParty/opcode/IceAABB.cpp
trunk/python-ogre/ThirdParty/opcode/IceAABB.h
trunk/python-ogre/ThirdParty/opcode/IceAxes.h
trunk/python-ogre/ThirdParty/opcode/IceBoundingSphere.h
trunk/python-ogre/ThirdParty/opcode/IceContainer.cpp
trunk/python-ogre/ThirdParty/opcode/IceContainer.h
trunk/python-ogre/ThirdParty/opcode/IceFPU.h
trunk/python-ogre/ThirdParty/opcode/IceHPoint.cpp
trunk/python-ogre/ThirdParty/opcode/IceHPoint.h
trunk/python-ogre/ThirdParty/opcode/IceIndexedTriangle.cpp
trunk/python-ogre/ThirdParty/opcode/IceIndexedTriangle.h
trunk/python-ogre/ThirdParty/opcode/IceLSS.h
trunk/python-ogre/ThirdParty/opcode/IceMatrix3x3.cpp
trunk/python-ogre/ThirdParty/opcode/IceMatrix3x3.h
trunk/python-ogre/ThirdParty/opcode/IceMatrix4x4.cpp
trunk/python-ogre/ThirdParty/opcode/IceMatrix4x4.h
trunk/python-ogre/ThirdParty/opcode/IceMemoryMacros.h
trunk/python-ogre/ThirdParty/opcode/IceOBB.cpp
trunk/python-ogre/ThirdParty/opcode/IceOBB.h
trunk/python-ogre/ThirdParty/opcode/IcePairs.h
trunk/python-ogre/ThirdParty/opcode/IcePlane.cpp
trunk/python-ogre/ThirdParty/opcode/IcePlane.h
trunk/python-ogre/ThirdParty/opcode/IcePoint.cpp
trunk/python-ogre/ThirdParty/opcode/IcePoint.h
trunk/python-ogre/ThirdParty/opcode/IcePreprocessor.h
trunk/python-ogre/ThirdParty/opcode/IceRandom.cpp
trunk/python-ogre/ThirdParty/opcode/IceRandom.h
trunk/python-ogre/ThirdParty/opcode/IceRay.cpp
trunk/python-ogre/ThirdParty/opcode/IceRay.h
trunk/python-ogre/ThirdParty/opcode/IceRevisitedRadix.cpp
trunk/python-ogre/ThirdParty/opcode/IceRevisitedRadix.h
trunk/python-ogre/ThirdParty/opcode/IceSegment.cpp
trunk/python-ogre/ThirdParty/opcode/IceSegment.h
trunk/python-ogre/ThirdParty/opcode/IceTriangle.cpp
trunk/python-ogre/ThirdParty/opcode/IceTriangle.h
trunk/python-ogre/ThirdParty/opcode/IceTrilist.h
trunk/python-ogre/ThirdParty/opcode/IceTypes.h
trunk/python-ogre/ThirdParty/opcode/IceUtils.cpp
trunk/python-ogre/ThirdParty/opcode/IceUtils.h
trunk/python-ogre/ThirdParty/opcode/OPC_AABBCollider.cpp
trunk/python-ogre/ThirdParty/opcode/OPC_AABBCollider.h
trunk/python-ogre/ThirdParty/opcode/OPC_AABBTree.cpp
trunk/python-ogre/ThirdParty/opcode/OPC_AABBTree.h
trunk/python-ogre/ThirdParty/opcode/OPC_BaseModel.cpp
trunk/python-ogre/ThirdParty/opcode/OPC_BaseModel.h
trunk/python-ogre/ThirdParty/opcode/OPC_BoxBoxOverlap.h
trunk/python-ogre/ThirdParty/opcode/OPC_BoxPruning.cpp
trunk/python-ogre/ThirdParty/opcode/OPC_BoxPruning.h
trunk/python-ogre/ThirdParty/opcode/OPC_Collider.cpp
trunk/python-ogre/ThirdParty/opcode/OPC_Collider.h
trunk/python-ogre/ThirdParty/opcode/OPC_Common.cpp
trunk/python-ogre/ThirdParty/opcode/OPC_Common.h
trunk/python-ogre/ThirdParty/opcode/OPC_HybridModel.cpp
trunk/python-ogre/ThirdParty/opcode/OPC_HybridModel.h
trunk/python-ogre/ThirdParty/opcode/OPC_IceHook.h
trunk/python-ogre/ThirdParty/opcode/OPC_LSSAABBOverlap.h
trunk/python-ogre/ThirdParty/opcode/OPC_LSSCollider.cpp
trunk/python-ogre/ThirdParty/opcode/OPC_LSSCollider.h
trunk/python-ogre/ThirdParty/opcode/OPC_LSSTriOverlap.h
trunk/python-ogre/ThirdParty/opcode/OPC_MeshInterface.cpp
trunk/python-ogre/ThirdParty/opcode/OPC_MeshInterface.h
trunk/python-ogre/ThirdParty/opcode/OPC_Model.cpp
trunk/python-ogre/ThirdParty/opcode/OPC_Model.h
trunk/python-ogre/ThirdParty/opcode/OPC_OBBCollider.cpp
trunk/python-ogre/ThirdParty/opcode/OPC_OBBCollider.h
trunk/python-ogre/ThirdParty/opcode/OPC_OptimizedTree.cpp
trunk/python-ogre/ThirdParty/opcode/OPC_OptimizedTree.h
trunk/python-ogre/ThirdParty/opcode/OPC_Picking.cpp
trunk/python-ogre/ThirdParty/opcode/OPC_Picking.h
trunk/python-ogre/ThirdParty/opcode/OPC_PlanesAABBOverlap.h
trunk/python-ogre/ThirdParty/opcode/OPC_PlanesCollider.cpp
trunk/python-ogre/ThirdParty/opcode/OPC_PlanesCollider.h
trunk/python-ogre/ThirdParty/opcode/OPC_PlanesTriOverlap.h
trunk/python-ogre/ThirdParty/opcode/OPC_RayAABBOverlap.h
trunk/python-ogre/ThirdParty/opcode/OPC_RayCollider.cpp
trunk/python-ogre/ThirdParty/opcode/OPC_RayCollider.h
trunk/python-ogre/ThirdParty/opcode/OPC_RayTriOverlap.h
trunk/python-ogre/ThirdParty/opcode/OPC_Settings.h
trunk/python-ogre/ThirdParty/opcode/OPC_SphereAABBOverlap.h
trunk/python-ogre/ThirdParty/opcode/OPC_SphereCollider.cpp
trunk/python-ogre/ThirdParty/opcode/OPC_SphereCollider.h
trunk/python-ogre/ThirdParty/opcode/OPC_SphereTriOverlap.h
trunk/python-ogre/ThirdParty/opcode/OPC_SweepAndPrune.cpp
trunk/python-ogre/ThirdParty/opcode/OPC_SweepAndPrune.h
trunk/python-ogre/ThirdParty/opcode/OPC_TreeBuilders.cpp
trunk/python-ogre/ThirdParty/opcode/OPC_TreeBuilders.h
trunk/python-ogre/ThirdParty/opcode/OPC_TreeCollider.cpp
trunk/python-ogre/ThirdParty/opcode/OPC_TreeCollider.h
trunk/python-ogre/ThirdParty/opcode/OPC_TriBoxOverlap.h
trunk/python-ogre/ThirdParty/opcode/OPC_TriTriOverlap.h
trunk/python-ogre/ThirdParty/opcode/OPC_VolumeCollider.cpp
trunk/python-ogre/ThirdParty/opcode/OPC_VolumeCollider.h
trunk/python-ogre/ThirdParty/opcode/Opcode.cpp
trunk/python-ogre/ThirdParty/opcode/Opcode.h
trunk/python-ogre/ThirdParty/opcode/Opcode.ncb
trunk/python-ogre/ThirdParty/opcode/Opcode.opt
trunk/python-ogre/ThirdParty/opcode/Opcode.plg
trunk/python-ogre/ThirdParty/opcode/Opcode.sln
trunk/python-ogre/ThirdParty/opcode/Opcode.vcproj
trunk/python-ogre/ThirdParty/opcode/Opcode.vcproj.JNPR.amiller.user
trunk/python-ogre/ThirdParty/opcode/StdAfx.cpp
trunk/python-ogre/ThirdParty/opcode/StdAfx.h
trunk/python-ogre/ThirdParty/plib/
trunk/python-ogre/ThirdParty/plib/README
trunk/python-ogre/ThirdParty/plib/net.dsp
trunk/python-ogre/ThirdParty/plib/net.h
trunk/python-ogre/ThirdParty/plib/netBuffer.cxx
trunk/python-ogre/ThirdParty/plib/netBuffer.h
trunk/python-ogre/ThirdParty/plib/netChannel.cxx
trunk/python-ogre/ThirdParty/plib/netChannel.h
trunk/python-ogre/ThirdParty/plib/netChat.cxx
trunk/python-ogre/ThirdParty/plib/netChat.h
trunk/python-ogre/ThirdParty/plib/netMessage.cxx
trunk/python-ogre/ThirdParty/plib/netMessage.h
trunk/python-ogre/ThirdParty/plib/netMonitor.cxx
trunk/python-ogre/ThirdParty/plib/netMonitor.h
trunk/python-ogre/ThirdParty/plib/netSocket.cxx
trunk/python-ogre/ThirdParty/plib/netSocket.h
trunk/python-ogre/ThirdParty/plib/sl.dsp
trunk/python-ogre/ThirdParty/plib/sl.h
trunk/python-ogre/ThirdParty/plib/slDSP.cxx
trunk/python-ogre/ThirdParty/plib/slEnvelope.cxx
trunk/python-ogre/ThirdParty/plib/slMODPlayer.cxx
trunk/python-ogre/ThirdParty/plib/slMODPrivate.h
trunk/python-ogre/ThirdParty/plib/slMODdacio.cxx
trunk/python-ogre/ThirdParty/plib/slMODfile.cxx
trunk/python-ogre/ThirdParty/plib/slMODfile.h
trunk/python-ogre/ThirdParty/plib/slMODinst.cxx
trunk/python-ogre/ThirdParty/plib/slMODnote.cxx
trunk/python-ogre/ThirdParty/plib/slPlayer.cxx
trunk/python-ogre/ThirdParty/plib/slPortability.h
trunk/python-ogre/ThirdParty/plib/slSample.cxx
trunk/python-ogre/ThirdParty/plib/slSamplePlayer.cxx
trunk/python-ogre/ThirdParty/plib/slScheduler.cxx
trunk/python-ogre/ThirdParty/plib/sm.h
trunk/python-ogre/ThirdParty/plib/smMixer.cxx
trunk/python-ogre/ThirdParty/plib/ul.cxx
trunk/python-ogre/ThirdParty/plib/ul.dsp
trunk/python-ogre/ThirdParty/plib/ul.h
trunk/python-ogre/ThirdParty/plib/ulClock.cxx
trunk/python-ogre/ThirdParty/plib/ulError.cxx
trunk/python-ogre/ThirdParty/plib/ulLinkedList.cxx
trunk/python-ogre/ThirdParty/plib/ulList.cxx
trunk/python-ogre/ThirdParty/plib/ulLocal.h
trunk/python-ogre/ThirdParty/plib/ulRTTI.cxx
trunk/python-ogre/ThirdParty/plib/ulRTTI.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalScrollBar.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalScrollBar.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalTrackBar.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalTrackBar.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIPoint.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIPoint.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuad.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuad.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuadContainer.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuadContainer.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIRect.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIRect.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUISize.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUISize.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinSet.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinSet.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIUtility.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIUtility.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIVertex.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIVertexBuffer.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIVertexBuffer.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIVerticalScrollBar.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIVerticalScrollBar.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIVerticalTrackBar.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIVerticalTrackBar.h
Added: trunk/python-ogre/ThirdParty/ogreal/Makefile.am
===================================================================
--- trunk/python-ogre/ThirdParty/ogreal/Makefile.am (rev 0)
+++ trunk/python-ogre/ThirdParty/ogreal/Makefile.am 2007-09-22 11:41:04 UTC (rev 388)
@@ -0,0 +1 @@
+pkginclude_HEADERS = OgreAL.h OgreALListener.h OgreALOggSound.h OgreALOggSoundStream.h OgreALPrereqs.h OgreALSound.h OgreALSoundManager.h OgreALSoundStream.h OgreALWavSound.h
Added: trunk/python-ogre/ThirdParty/ogreal/OgreAL.h
===================================================================
--- trunk/python-ogre/ThirdParty/ogreal/OgreAL.h (rev 0)
+++ trunk/python-ogre/ThirdParty/ogreal/OgreAL.h 2007-09-22 11:41:04 UTC (rev 388)
@@ -0,0 +1,44 @@
+/*---------------------------------------------------------------------------*\
+** This source file is part of OgreAL **
+** an OpenAL plugin for the Ogre Rendering Engine. **
+** **
+** Copyright 2006 Casey Borders **
+** **
+** OgreAL is free software; you can redistribute it and/or modify it under **
+** the terms of the GNU Lesser General Public License as published by the **
+** Free Software Foundation; either version 2, or (at your option) any later **
+** version. **
+** **
+** The developer really likes screenshots and while he recognises that the **
+** fact that this is an AUDIO plugin means that the fruits of his labor will **
+** never been seen in these images he would like to kindly ask that you send **
+** screenshots of your application using his library to **
+** scr...@mo... **
+** **
+** Please bear in mind that the sending of these screenshots means that you **
+** are agreeing to allow the developer to display them in the media of his **
+** choice. They will, however, be fully credited to the person sending the **
+** email or, if you wish them to be credited differently, please state that **
+** in the body of the email. **
+** **
+** OgreAL 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 OgreAL; see the file LICENSE. If not, write to the **
+** Free Software Foundation, Inc., **
+** 59 Temple Place - Suite 330, **
+** Boston, MA 02111-1307, USA. **
+\*---------------------------------------------------------------------------*/
+
+#ifndef _OGRE_AL_H_
+#define _OGRE_AL_H_
+
+#include "OgreALListener.h"
+#include "OgreALOggSound.h"
+#include "OgreALSound.h"
+#include "OgreALSoundManager.h"
+
+#endif
Added: trunk/python-ogre/ThirdParty/ogreal/OgreALListener.cpp
===================================================================
--- trunk/python-ogre/ThirdParty/ogreal/OgreALListener.cpp (rev 0)
+++ trunk/python-ogre/ThirdParty/ogreal/OgreALListener.cpp 2007-09-22 11:41:04 UTC (rev 388)
@@ -0,0 +1,260 @@
+/*---------------------------------------------------------------------------*\
+** This source file is part of OgreAL **
+** an OpenAL plugin for the Ogre Rendering Engine. **
+** **
+** Copyright 2006 Casey Borders **
+** **
+** OgreAL is free software; you can redistribute it and/or modify it under **
+** the terms of the GNU Lesser General Public License as published by the **
+** Free Software Foundation; either version 2, or (at your option) any later **
+** version. **
+** **
+** The developer really likes screenshots and while he recognises that the **
+** fact that this is an AUDIO plugin means that the fruits of his labor will **
+** never been seen in these images he would like to kindly ask that you send **
+** screenshots of your application using his library to **
+** scr...@mo... **
+** **
+** Please bear in mind that the sending of these screenshots means that you **
+** are agreeing to allow the developer to display them in the media of his **
+** choice. They will, however, be fully credited to the person sending the **
+** email or, if you wish them to be credited differently, please state that **
+** in the body of the email. **
+** **
+** OgreAL 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 OgreAL; see the file LICENSE. If not, write to the **
+** Free Software Foundation, Inc., **
+** 59 Temple Place - Suite 330, **
+** Boston, MA 02111-1307, USA. **
+\*---------------------------------------------------------------------------*/
+
+#include "OgreALListener.h"
+
+template<> OgreAL::Listener* Ogre::Singleton<OgreAL::Listener>::ms_Singleton = 0;
+
+namespace OgreAL {
+ Listener::Listener() :
+ mGain(1.0),
+ mPosition(Ogre::Vector3::ZERO),
+ mDirection(Ogre::Vector3::NEGATIVE_UNIT_Z),
+ mVelocity(Ogre::Vector3::ZERO),
+ mUp(Ogre::Vector3::UNIT_Y),
+ mDerivedPosition(Ogre::Vector3::ZERO),
+ mDerivedDirection(Ogre::Vector3::NEGATIVE_UNIT_Z)
+ {
+ mParentNode = NULL;
+ mLocalTransformDirty = false;
+ initListener();
+ }
+
+ Listener::Listener(const Ogre::String& name) :
+ Ogre::MovableObject(name),
+ mGain(1.0),
+ mPosition(Ogre::Vector3::ZERO),
+ mDirection(Ogre::Vector3::NEGATIVE_UNIT_Z),
+ mVelocity(Ogre::Vector3::ZERO),
+ mUp(Ogre::Vector3::UNIT_Y),
+ mDerivedPosition(Ogre::Vector3::ZERO),
+ mDerivedDirection(Ogre::Vector3::NEGATIVE_UNIT_Z)
+ {
+ mParentNode = NULL;
+ initListener();
+ }
+
+ Listener::~Listener()
+ {}
+
+ Listener* Listener::getSingletonPtr(void)
+ {
+ return ms_Singleton;
+ }
+
+ Listener& Listener::getSingleton(void)
+ {
+ assert( ms_Singleton ); return ( *ms_Singleton );
+ }
+
+ void Listener::setGain(Ogre::Real gain)
+ {
+ mGain = gain;
+ alListenerf(AL_GAIN, mGain);
+ }
+
+ void Listener::setPosition(Ogre::Real x, Ogre::Real y, Ogre::Real z)
+ {
+ mPosition.x = x;
+ mPosition.y = y;
+ mPosition.z = z;
+ mLocalTransformDirty = true;
+ }
+
+ void Listener::setPosition(const Ogre::Vector3& vec)
+ {
+ mPosition = vec;
+ mLocalTransformDirty = true;
+ }
+
+ const Ogre::Vector3& Listener::getPosition() const
+ {
+ return mPosition;
+ }
+
+ void Listener::setDirection(Ogre::Real x, Ogre::Real y, Ogre::Real z)
+ {
+ mDirection.x = x;
+ mDirection.y = y;
+ mDirection.z = z;
+ mLocalTransformDirty = true;
+ }
+
+ void Listener::setDirection(const Ogre::Vector3& vec)
+ {
+ mDirection = vec;
+ mLocalTransformDirty = true;
+ }
+
+ const Ogre::Vector3& Listener::getDirection() const
+ {
+ return mDirection;
+ }
+
+ void Listener::setVelocity(Ogre::Real x, Ogre::Real y, Ogre::Real z)
+ {
+ mVelocity.x = x;
+ mVelocity.y = y;
+ mVelocity.z = z;
+ alListener3f(AL_VELOCITY, mVelocity.x, mVelocity.y, mVelocity.z);
+ }
+
+ void Listener::setVelocity(const Ogre::Vector3& vec)
+ {
+ mVelocity = vec;
+ alListener3f(AL_VELOCITY, mVelocity.x, mVelocity.y, mVelocity.z);
+ }
+
+ const Ogre::Vector3& Listener::getVelocity() const
+ {
+ return mVelocity;
+ }
+
+ const Ogre::Vector3& Listener::getDerivedPosition(void) const
+ {
+ update();
+ return mDerivedPosition;
+ }
+
+ const Ogre::Vector3& Listener::getDerivedDirection(void) const
+ {
+ update();
+ return mDerivedPosition;
+ }
+
+ void Listener::initListener()
+ {
+ mOrientation[0]= mDirection.x; // Forward.x
+ mOrientation[1]= mDirection.y; // Forward.y
+ mOrientation[2]= mDirection.z; // Forward.z
+
+ mOrientation[3]= mUp.x; // Up.x
+ mOrientation[4]= mUp.y; // Up.y
+ mOrientation[5]= mUp.z; // Up.z
+
+ alListener3f(AL_POSITION, mPosition.x, mPosition.y, mPosition.z);
+ alListenerfv(AL_ORIENTATION, mOrientation);
+ alListenerf (AL_GAIN, 1.0f);
+ alListener3f(AL_VELOCITY, 0.0f, 0.0f, 0.0f);
+ }
+
+ void Listener::update() const
+ {
+ if (mParentNode)
+ {
+ if (!(mParentNode->_getDerivedOrientation() == mLastParentOrientation &&
+ mParentNode->_getDerivedPosition() == mLastParentPosition)
+ || mLocalTransformDirty)
+ {
+ // Ok, we're out of date with SceneNode we're attached to
+ mLastParentOrientation = mParentNode->_getDerivedOrientation();
+ mLastParentPosition = mParentNode->_getDerivedPosition();
+ mDerivedDirection = mLastParentOrientation * mDirection;
+ mDerivedPosition = (mLastParentOrientation * mPosition) + mLastParentPosition;
+ }
+ }
+ else
+ {
+ mDerivedPosition = mPosition;
+ mDerivedDirection = mDirection;
+ }
+
+ mLocalTransformDirty = false;
+ }
+
+ void Listener::updateListener()
+ {
+ update();
+ if(mParentNode)
+ {
+ mPosition = mLastParentPosition;
+ mDirection = mLastParentOrientation.zAxis();
+ mUp = mLastParentOrientation.yAxis();
+ }
+ alListener3f(AL_POSITION, mPosition.x, mPosition.y, mPosition.z);
+ mOrientation[0]= -mDirection.x; // Forward.x
+ mOrientation[1]= -mDirection.y; // Forward.y
+ mOrientation[2]= -mDirection.z; // Forward.z
+
+ mOrientation[3]= mUp.x; // Up.x
+ mOrientation[4]= mUp.y; // Up.y
+ mOrientation[5]= mUp.z; // Up.z
+ alListenerfv(AL_ORIENTATION, mOrientation);
+ }
+
+ const Ogre::String& Listener::getMovableType() const
+ {
+ return ListenerFactory::FACTORY_TYPE_NAME;
+ }
+
+ const Ogre::AxisAlignedBox& Listener::getBoundingBox() const
+ {
+ // Null, Sounds are not visible
+ static Ogre::AxisAlignedBox box;
+ return box;
+ }
+
+ void Listener::_updateRenderQueue(Ogre::RenderQueue* queue)
+ {
+ // Do Nothing
+ }
+
+ void Listener::_notifyAttached(Ogre::Node* parent, bool isTagPoint)
+ {
+ mParentNode = parent;
+ }
+
+ Ogre::String ListenerFactory::FACTORY_TYPE_NAME = "OgreAL_Listener";
+
+ const Ogre::String& ListenerFactory::getType(void) const
+ {
+ return FACTORY_TYPE_NAME;
+ }
+
+ Ogre::MovableObject* ListenerFactory::createInstanceImpl(const Ogre::String& name,
+ const Ogre::NameValuePairList* params)
+ {
+ Listener *listener = Listener::getSingletonPtr();
+ if(listener)
+ return listener;
+ else
+ return new Listener(name);
+ }
+
+ void ListenerFactory::destroyInstance(Ogre::MovableObject* obj)
+ {
+ delete obj;
+ }
+}
Added: trunk/python-ogre/ThirdParty/ogreal/OgreALListener.h
===================================================================
--- trunk/python-ogre/ThirdParty/ogreal/OgreALListener.h (rev 0)
+++ trunk/python-ogre/ThirdParty/ogreal/OgreALListener.h 2007-09-22 11:41:04 UTC (rev 388)
@@ -0,0 +1,192 @@
+/*---------------------------------------------------------------------------*\
+** This source file is part of OgreAL **
+** an OpenAL plugin for the Ogre Rendering Engine. **
+** **
+** Copyright 2006 Casey Borders **
+** **
+** OgreAL is free software; you can redistribute it and/or modify it under **
+** the terms of the GNU Lesser General Public License as published by the **
+** Free Software Foundation; either version 2, or (at your option) any later **
+** version. **
+** **
+** The developer really likes screenshots and while he recognises that the **
+** fact that this is an AUDIO plugin means that the fruits of his labor will **
+** never been seen in these images he would like to kindly ask that you send **
+** screenshots of your application using his library to **
+** scr...@mo... **
+** **
+** Please bear in mind that the sending of these screenshots means that you **
+** are agreeing to allow the developer to display them in the media of his **
+** choice. They will, however, be fully credited to the person sending the **
+** email or, if you wish them to be credited differently, please state that **
+** in the body of the email. **
+** **
+** OgreAL 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 OgreAL; see the file LICENSE. If not, write to the **
+** Free Software Foundation, Inc., **
+** 59 Temple Place - Suite 330, **
+** Boston, MA 02111-1307, USA. **
+\*---------------------------------------------------------------------------*/
+
+#ifndef _OGRE_AL_LISTENER_H_
+#define _OGRE_AL_LISTENER_H_
+
+#include "OgreALPrereqs.h"
+
+namespace OgreAL {
+ /**
+ * Listener.
+ * @remarks
+ * There is only ever one listener in the scene and it is created
+ * when the SoundManager is initialized. To get the reference to
+ * the listener use SoundManager::getListener. The listener can
+ * be attached to an Ogre::SceneNode or placed at some point in space.
+ *
+ * @see Ogre::MovableObject
+ * @see Ogre::Singleton
+ */
+ class OgreAL_Export Listener : public Ogre::MovableObject, protected Ogre::Singleton<Listener>
+ {
+ protected:
+ /*
+ ** Constructors are protected to enforce the use of the
+ ** factory via SoundManager::createListener
+ */
+
+ /** Default Constructor. */
+ Listener();
+ /** Normal Constructor. Should not be called directly! Use SoundManager::getListener */
+ Listener(const Ogre::String& name);
+
+ public:
+ /** Standard Destructor */
+ virtual ~Listener();
+
+ /** Returns the Listener singleton object */
+ static Listener& getSingleton();
+ /** Returns a pointer to the Listener singleton object */
+ static Listener* getSingletonPtr();
+
+ /**
+ * Sets the gain.
+ * @param gain The gain where 1.0 is full volume and 0.0 is off
+ * @note Gain should be positive
+ */
+ void setGain(Ogre::Real gain);
+ /** Returns the gain. */
+ Ogre::Real getGain() const {return mGain;}
+ /**
+ * Sets the position of the listener.
+ * @param x The x part of the position
+ * @param y The y part of the position
+ * @param z The z part of the position
+ * @note The position will be overridden if the listener is attached to a SceneNode
+ */
+ void setPosition(Ogre::Real x, Ogre::Real y, Ogre::Real z);
+ /**
+ * Sets the position of the listener.
+ * @param vec The new postion for the listener.
+ * @note The position will be overridden if the listener is attached to a SceneNode
+ */
+ void setPosition(const Ogre::Vector3& vec);
+ /** Returns the position of the sound. */
+ const Ogre::Vector3& getPosition() const;
+ /**
+ * Sets the direction of the listener.
+ * @param x The x part of the direction vector
+ * @param y The y part of the direction vector
+ * @param z The z part of the direction vector
+ * @note The direction will be overridden if the listener is attached to a SceneNode
+ */
+ void setDirection(Ogre::Real x, Ogre::Real y, Ogre::Real z);
+ /**
+ * Sets the direction of the listener.
+ * @param vec The direction vector.
+ * @note The direction will be overridden if the listener is attached to a SceneNode
+ */
+ void setDirection(const Ogre::Vector3& vec);
+ /** Returns the direction of the sound. */
+ const Ogre::Vector3& getDirection() const;
+ /**
+ * Sets the velocity of the listener.
+ * @param x The x part of the velocity vector
+ * @param y The y part of the velocity vector
+ * @param z The z part of the velocity vector
+ */
+ void setVelocity(Ogre::Real x, Ogre::Real y, Ogre::Real z);
+ /**
+ * Sets the velocity of the listener.
+ * @param vec The velocity vector.
+ */
+ void setVelocity(const Ogre::Vector3& vec);
+ /** Returns the velocity of the sound. */
+ const Ogre::Vector3& getVelocity() const;
+ /** Returns the position of the sound including any transform from nodes it is attached to. */
+ const Ogre::Vector3& getDerivedPosition() const;
+ /** Returns the direction of the sound including any transform from nodes it is attached to. */
+ const Ogre::Vector3& getDerivedDirection() const;
+
+ /** Overridden from MovableObject */
+ const Ogre::String& getMovableType() const;
+ /** Overridden from MovableObject */
+ const Ogre::AxisAlignedBox& getBoundingBox() const;
+ /** Overridden from MovableObject */
+ Ogre::Real getBoundingRadius() const {return 0; /* Not Visible */}
+ /** Overridden from MovableObject */
+ void _updateRenderQueue(Ogre::RenderQueue* queue);
+ /** Overridden from MovableObject */
+ void _notifyAttached(Ogre::Node* parent, bool isTagPoint = false);
+
+ protected:
+ /// Internal method for synchronising with parent node (if any)
+ virtual void update() const;
+ /// This is called each frame to update the position, direction, etc
+ void updateListener();
+ /// Convienance method to reset the sound state
+ void initListener();
+
+ /// Postion taking into account the parent node
+ mutable Ogre::Vector3 mDerivedPosition;
+ /// Direction taking into account the parent node
+ mutable Ogre::Vector3 mDerivedDirection;
+ /// Stored versions of parent orientation
+ mutable Ogre::Quaternion mLastParentOrientation;
+ /// Stored versions of parent position
+ mutable Ogre::Vector3 mLastParentPosition;
+
+ Ogre::Real mGain;
+ Ogre::Vector3 mPosition;
+ Ogre::Vector3 mDirection;
+ Ogre::Vector3 mVelocity;
+ Ogre::Vector3 mUp;
+ ALfloat mOrientation[6];
+ /// Is the local transform dirty?
+ mutable bool mLocalTransformDirty;
+
+ friend class SoundManager;
+ friend class ListenerFactory;
+ };
+
+ /** Factory object for creating the listener */
+ class OgreAL_Export ListenerFactory : public Ogre::MovableObjectFactory
+ {
+ public:
+ ListenerFactory() {}
+ ~ListenerFactory() {}
+
+ static Ogre::String FACTORY_TYPE_NAME;
+
+ const Ogre::String& getType() const;
+ void destroyInstance(Ogre::MovableObject* obj);
+
+ protected:
+ Ogre::MovableObject* createInstanceImpl(const Ogre::String& name,
+ const Ogre::NameValuePairList* params = 0);
+ };
+} // Namespace
+#endif
Added: trunk/python-ogre/ThirdParty/ogreal/OgreALOggSound.cpp
===================================================================
--- trunk/python-ogre/ThirdParty/ogreal/OgreALOggSound.cpp (rev 0)
+++ trunk/python-ogre/ThirdParty/ogreal/OgreALOggSound.cpp 2007-09-22 11:41:04 UTC (rev 388)
@@ -0,0 +1,161 @@
+/*---------------------------------------------------------------------------*\
+** This source file is part of OgreAL **
+** an OpenAL plugin for the Ogre Rendering Engine. **
+** **
+** Copyright 2006 Casey Borders **
+** **
+** OgreAL is free software; you can redistribute it and/or modify it under **
+** the terms of the GNU Lesser General Public License as published by the **
+** Free Software Foundation; either version 2, or (at your option) any later **
+** version. **
+** **
+** The developer really likes screenshots and while he recognises that the **
+** fact that this is an AUDIO plugin means that the fruits of his labor will **
+** never been seen in these images he would like to kindly ask that you send **
+** screenshots of your application using his library to **
+** scr...@mo... **
+** **
+** Please bear in mind that the sending of these screenshots means that you **
+** are agreeing to allow the developer to display them in the media of his **
+** choice. They will, however, be fully credited to the person sending the **
+** email or, if you wish them to be credited differently, please state that **
+** in the body of the email. **
+** **
+** OgreAL 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 OgreAL; see the file LICENSE. If not, write to the **
+** Free Software Foundation, Inc., **
+** 59 Temple Place - Suite 330, **
+** Boston, MA 02111-1307, USA. **
+\*---------------------------------------------------------------------------*/
+
+#include "OgreALOggSound.h"
+#include "OgreALSoundManager.h"
+
+namespace OgreAL {
+ OggSound::OggSound(const Ogre::String& name, const Ogre::String& soundFile, bool loop, AudioFormat format) :
+ Sound(name, soundFile),
+ mOggFile(0),
+ mVorbisInfo(0),
+ mVorbisComment(0)
+ {
+ if(!(mOggFile = fopen(soundFile.c_str(), "rb")))
+ {
+ throw Ogre::Exception(1, "Could not open Ogg file.", "OgreAL::OggSound::ctor");
+ }
+
+ if(ov_open(mOggFile, &mOggStream, NULL, 0) < 0)
+ {
+ fclose(mOggFile);
+ throw Ogre::Exception(1, "Could not open Ogg stream.", "OgreAL::OggSound::ctor");
+ }
+
+ mVorbisInfo = ov_info(&mOggStream, -1);
+
+ unsigned long channels = mVorbisInfo->channels;
+ mFreq = mVorbisInfo->rate;
+ mLoop = loop;
+
+ if(channels == 1)
+ {
+ mFormat = AL_FORMAT_MONO16;
+ // Set BufferSize to 250ms (Frequency * 2 (16bit) divided by 4 (quarter of a second))
+ mBufferSize = mFreq >> 1;
+ // IMPORTANT : The Buffer Size must be an exact multiple of the BlockAlignment ...
+ mBufferSize -= (mBufferSize % 2);
+ }
+ else if(channels == 2)
+ {
+ mFormat = AL_FORMAT_STEREO16;
+ // Set BufferSize to 250ms (Frequency * 4 (16bit stereo) divided by 4 (quarter of a second))
+ mBufferSize = mFreq;
+ // IMPORTANT : The Buffer Size must be an exact multiple of the BlockAlignment ...
+ mBufferSize -= (mBufferSize % 4);
+ }
+ else if(channels == 4)
+ {
+ mFormat = alGetEnumValue("AL_FORMAT_QUAD16");
+ // Set BufferSize to 250ms (Frequency * 8 (16bit 4-channel) divided by 4 (quarter of a second))
+ mBufferSize = mFreq * 2;
+ // IMPORTANT : The Buffer Size must be an exact multiple of the BlockAlignment ...
+ mBufferSize -= (mBufferSize % 8);
+ }
+ else if(channels == 6)
+ {
+ mFormat = alGetEnumValue("AL_FORMAT_51CHN16");
+ // Set BufferSize to 250ms (Frequency * 12 (16bit 6-channel) divided by 4 (quarter of a second))
+ mBufferSize = mFreq * 3;
+ // IMPORTANT : The Buffer Size must be an exact multiple of the BlockAlignment ...
+ mBufferSize -= (mBufferSize % 12);
+ }
+ else if(channels == 7)
+ {
+ mFormat = alGetEnumValue("AL_FORMAT_61CHN16");
+ // Set BufferSize to 250ms (Frequency * 16 (16bit 7-channel) divided by 4 (quarter of a second))
+ mBufferSize = mFreq * 4;
+ // IMPORTANT : The Buffer Size must be an exact multiple of the BlockAlignment ...
+ mBufferSize -= (mBufferSize % 16);
+ }
+ else if(channels == 8)
+ {
+ mFormat = alGetEnumValue("AL_FORMAT_71CHN16");
+ // Set BufferSize to 250ms (Frequency * 20 (16bit 8-channel) divided by 4 (quarter of a second))
+ mBufferSize = mFreq * 5;
+ // IMPORTANT : The Buffer Size must be an exact multiple of the BlockAlignment ...
+ mBufferSize -= (mBufferSize % 20);
+ }
+ else
+ {
+ // Couldn't determine buffer format so log the error and default to mono
+ Ogre::LogManager::getSingleton().logMessage("!!WARNING!! Could not determine buffer format! Defaulting to MONO");
+
+ mFormat = AL_FORMAT_MONO16;
+ // Set BufferSize to 250ms (Frequency * 2 (16bit) divided by 4 (quarter of a second))
+ mBufferSize = mFreq >> 1;
+ // IMPORTANT : The Buffer Size must be an exact multiple of the BlockAlignment ...
+ mBufferSize -= (mBufferSize % 2);
+ }
+
+ alGenBuffers(1, &mBuffer);
+ int currSection;
+ long size = 0;
+ char data[4096*8];
+ std::vector<char> buffer;
+ do
+ {
+ size = ov_read(&mOggStream, data, sizeof(data), 0, 2, 1, &currSection);
+ buffer.insert(buffer.end(), data, data + size);
+ }while(size > 0);
+
+ ov_clear(&mOggStream);
+ alBufferData(mBuffer, mFormat, &buffer[0], static_cast<ALsizei>(buffer.size()), mFreq);
+
+ createAndBindSource();
+ }
+
+ OggSound::~OggSound()
+ {}
+
+ Ogre::String OggSound::errorToString(int error) const
+ {
+ switch(error)
+ {
+ case OV_EREAD:
+ return Ogre::String("Read from media.");
+ case OV_ENOTVORBIS:
+ return Ogre::String("Not Vorbis data.");
+ case OV_EVERSION:
+ return Ogre::String("Vorbis version mismatch.");
+ case OV_EBADHEADER:
+ return Ogre::String("Invalid Vorbis header.");
+ case OV_EFAULT:
+ return Ogre::String("Internal logic fault (bug or heap/stack corruption.");
+ default:
+ return Sound::errorToString(error);
+ }
+ }
+} // Namespace
Added: trunk/python-ogre/ThirdParty/ogreal/OgreALOggSound.h
===================================================================
--- trunk/python-ogre/ThirdParty/ogreal/OgreALOggSound.h (rev 0)
+++ trunk/python-ogre/ThirdParty/ogreal/OgreALOggSound.h 2007-09-22 11:41:04 UTC (rev 388)
@@ -0,0 +1,91 @@
+/*---------------------------------------------------------------------------*\
+** This source file is part of OgreAL **
+** an OpenAL plugin for the Ogre Rendering Engine. **
+** **
+** Copyright 2006 Casey Borders **
+** **
+** OgreAL is free software; you can redistribute it and/or modify it under **
+** the terms of the GNU Lesser General Public License as published by the **
+** Free Software Foundation; either version 2, or (at your option) any later **
+** version. **
+** **
+** The developer really likes screenshots and while he recognises that the **
+** fact that this is an AUDIO plugin means that the fruits of his labor will **
+** never been seen in these images he would like to kindly ask that you send **
+** screenshots of your application using his library to **
+** scr...@mo... **
+** **
+** Please bear in mind that the sending of these screenshots means that you **
+** are agreeing to allow the developer to display them in the media of his **
+** choice. They will, however, be fully credited to the person sending the **
+** email or, if you wish them to be credited differently, please state that **
+** in the body of the email. **
+** **
+** OgreAL 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 OgreAL; see the file LICENSE. If not, write to the **
+** Free Software Foundation, Inc., **
+** 59 Temple Place - Suite 330, **
+** Boston, MA 02111-1307, USA. **
+\*---------------------------------------------------------------------------*/
+
+#ifndef _OGRE_AL_OGG_SOUND_H_
+#define _OGRE_AL_OGG_SOUND_H_
+
+#include <string>
+#include <vector>
+
+#include "ogg/ogg.h"
+#include "vorbis/codec.h"
+#include "vorbis/vorbisfile.h"
+#include "OgreALPrereqs.h"
+#include "OgreALSound.h"
+
+namespace OgreAL {
+ /**
+ * OggSound.
+ * @note
+ * This object is only to be instantiated using the SoundManager::createSound
+ * method.
+ * @remark This is a sound that plays OggVorbis files
+ *
+ * @see OgreAL::Sound
+ */
+ class OgreAL_Export OggSound : public Sound
+ {
+ protected:
+ /*
+ ** Constructor is protected to enforce the use of the
+ ** factory via SoundManager::createSound
+ */
+
+ /**
+ * Constructor.
+ * @param name The name used to reference this sound
+ * @param soundFile The name of the file to load
+ * @param loop Should the sound loop once it has played
+ */
+ OggSound(const Ogre::String& name, const Ogre::String& soundFile, bool loop, AudioFormat format);
+
+ public:
+ /** Standard Destructor. */
+ virtual ~OggSound();
+
+ protected:
+ /// Translate the OpenAL error code to a string
+ virtual Ogre::String errorToString(int error) const;
+
+ friend class SoundFactory;
+
+ private:
+ FILE* mOggFile; // file handle
+ OggVorbis_File mOggStream; // stream handle
+ vorbis_info* mVorbisInfo; // some formatting data
+ vorbis_comment* mVorbisComment; // user comments
+ };
+} // Namespace
+#endif
Added: trunk/python-ogre/ThirdParty/ogreal/OgreALOggSoundStream.cpp
===================================================================
--- trunk/python-ogre/ThirdParty/ogreal/OgreALOggSoundStream.cpp (rev 0)
+++ trunk/python-ogre/ThirdParty/ogreal/OgreALOggSoundStream.cpp 2007-09-22 11:41:04 UTC (rev 388)
@@ -0,0 +1,295 @@
+/*---------------------------------------------------------------------------*\
+** This source file is part of OgreAL **
+** an OpenAL plugin for the Ogre Rendering Engine. **
+** **
+** Copyright 2006 Casey Borders **
+** **
+** OgreAL is free software; you can redistribute it and/or modify it under **
+** the terms of the GNU Lesser General Public License as published by the **
+** Free Software Foundation; either version 2, or (at your option) any later **
+** version. **
+** **
+** The developer really likes screenshots and while he recognises that the **
+** fact that this is an AUDIO plugin means that the fruits of his labor will **
+** never been seen in these images he would like to kindly ask that you send **
+** screenshots of your application using his library to **
+** scr...@mo... **
+** **
+** Please bear in mind that the sending of these screenshots means that you **
+** are agreeing to allow the developer to display them in the media of his **
+** choice. They will, however, be fully credited to the person sending the **
+** email or, if you wish them to be credited differently, please state that **
+** in the body of the email. **
+** **
+** OgreAL 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 OgreAL; see the file LICENSE. If not, write to the **
+** Free Software Foundation, Inc., **
+** 59 Temple Place - Suite 330, **
+** Boston, MA 02111-1307, USA. **
+\*---------------------------------------------------------------------------*/
+
+#include "OgreALOggSoundStream.h"
+#include "OgreALSoundManager.h"
+
+namespace OgreAL {
+ OggSoundStream::OggSoundStream(const Ogre::String& name, const Ogre::String& soundFile, bool loop, AudioFormat format) :
+ SoundStream(name, soundFile),
+ mOggFile(0),
+ mVorbisInfo(0),
+ mVorbisComment(0)
+ {
+ if(!(mOggFile = fopen(soundFile.c_str(), "rb")))
+ {
+ throw Ogre::Exception(1, "Could not open Ogg file.", "OgreAL::OggSound::ctor");
+ }
+
+ if(ov_open(mOggFile, &mOggStream, NULL, 0) < 0)
+ {
+ fclose(mOggFile);
+ throw Ogre::Exception(1, "Could not open Ogg stream. ", "OgreAL::OggSound::ctor");
+ }
+
+ mVorbisInfo = ov_info(&mOggStream, -1);
+
+ unsigned long channels = mVorbisInfo->channels;
+ mFreq = mVorbisInfo->rate;
+ mLoop = loop;
+
+ if(channels == 1)
+ {
+ mFormat = AL_FORMAT_MONO16;
+ // Set BufferSize to 250ms (Frequency * 2 (16bit) divided by 4 (quarter of a second))
+ mBufferSize = mFreq >> 1;
+ // IMPORTANT : The Buffer Size must be an exact multiple of the BlockAlignment ...
+ mBufferSize -= (mBufferSize % 2);
+ }
+ else if(channels == 2)
+ {
+ mFormat = AL_FORMAT_STEREO16;
+ // Set BufferSize to 250ms (Frequency * 4 (16bit stereo) divided by 4 (quarter of a second))
+ mBufferSize = mFreq;
+ // IMPORTANT : The Buffer Size must be an exact multiple of the BlockAlignment ...
+ mBufferSize -= (mBufferSize % 4);
+ }
+ else if(channels == 4)
+ {
+ mFormat = alGetEnumValue("AL_FORMAT_QUAD16");
+ // Set BufferSize to 250ms (Frequency * 8 (16bit 4-channel) divided by 4 (quarter of a second))
+ mBufferSize = mFreq * 2;
+ // IMPORTANT : The Buffer Size must be an exact multiple of the BlockAlignment ...
+ mBufferSize -= (mBufferSize % 8);
+ }
+ else if(channels == 6)
+ {
+ mFormat = alGetEnumValue("AL_FORMAT_51CHN16");
+ // Set BufferSize to 250ms (Frequency * 12 (16bit 6-channel) divided by 4 (quarter of a second))
+ mBufferSize = mFreq * 3;
+ // IMPORTANT : The Buffer Size must be an exact multiple of the BlockAlignment ...
+ mBufferSize -= (mBufferSize % 12);
+ }
+ else if(channels == 7)
+ {
+ mFormat = alGetEnumValue("AL_FORMAT_61CHN16");
+ // Set BufferSize to 250ms (Frequency * 16 (16bit 7-channel) divided by 4 (quarter of a second))
+ mBufferSize = mFreq * 4;
+ // IMPORTANT : The Buffer Size must be an exact multiple of the BlockAlignment ...
+ mBufferSize -= (mBufferSize % 16);
+ }
+ else if(channels == 8)
+ {
+ mFormat = alGetEnumValue("AL_FORMAT_71CHN16");
+ // Set BufferSize to 250ms (Frequency * 20 (16bit 8-channel) divided by 4 (quarter of a second))
+ mBufferSize = mFreq * 5;
+ // IMPORTANT : The Buffer Size must be an exact multiple of the BlockAlignment ...
+ mBufferSize -= (mBufferSize % 20);
+ }
+ else
+ {
+ // Couldn't determine buffer format so log the error and default to mono
+ Ogre::LogManager::getSingleton().logMessage("!!WARNING!! Could not determine buffer format! Defaulting to MONO");
+
+ mFormat = AL_FORMAT_MONO16;
+ // Set BufferSize to 250ms (Frequency * 2 (16bit) divided by 4 (quarter of a second))
+ mBufferSize = mFreq >> 1;
+ // IMPORTANT : The Buffer Size must be an exact multiple of the BlockAlignment ...
+ mBufferSize -= (mBufferSize % 2);
+ }
+
+ alGenBuffers(2, mBuffers);
+ alGenSources(1, &mSource);
+ checkError(__FUNCTION__);
+
+ if(SoundManager::getSingleton().xRamSupport())
+ {
+ SoundManager::getSingleton().eaxSetBufferMode(2, mBuffers, SoundManager::xRamAccessible);
+ }
+
+ for(int i = 0; i < 2; i++)
+ {
+ if(!stream(mBuffers[i]))
+ {
+ throw Ogre::Exception(1, "Could not open Ogg file.", "OgreAL::OggSound::ctor");
+ }
+ }
+
+ alSourceQueueBuffers(mSource, 2, mBuffers);
+ checkError(__FUNCTION__);
+
+ initSource();
+
+ // There is an issue with looping Ogg streams in OpenAL
+ // so we'll do it manually in the update method
+ alSourcei(mSource, AL_LOOPING, AL_FALSE);
+ checkError(__FUNCTION__);
+ }
+
+ OggSoundStream::~OggSoundStream()
+ {
+ emptyQueue();
+ alDeleteBuffers(2, mBuffers);
+ ov_clear(&mOggStream);
+
+ mOggFile = 0;
+ mVorbisInfo = 0;
+ mVorbisComment = 0;
+ }
+
+ bool OggSoundStream::play()
+ {
+ if(isPlaying())
+ {
+ return true;
+ }
+ else if(isStopped())
+ {
+ for(int i = 0; i < 2; i++)
+ {
+ if(!stream(mBuffers[i])) return false;
+ }
+
+ alSourceQueueBuffers(mSource, 2, mBuffers);
+ alSourcePlay(mSource);
+ checkError(__FUNCTION__);
+ return true;
+ }
+ else
+ {
+ alSourcePlay(mSource);
+ checkError(__FUNCTION__);
+ return true;
+ }
+ }
+
+ bool OggSoundStream::stop()
+ {
+ if(isStopped() || isInitial()) return true;
+
+ int queued;
+ alGetSourcei(mSource, AL_BUFFERS_QUEUED, &queued);
+ checkError(__FUNCTION__);
+ alSourceStop(mSource);
+ checkError(__FUNCTION__);
+ alSourceUnqueueBuffers(mSource, queued, mBuffers);
+ checkError(__FUNCTION__);
+
+ ov_time_seek(&mOggStream, 0);
+
+ return true;
+ }
+
+ bool OggSoundStream::_updateSound()
+ {
+ // Call the parent method to update the position
+ Sound::_updateSound();
+
+ // Update the stream
+ int processed;
+ bool active = true;
+
+ alGetSourcei(mSource, AL_BUFFERS_PROCESSED, &processed);
+ checkError(__FUNCTION__);
+
+ while(processed--)
+ {
+ ALuint buffer;
+
+ alSourceUnqueueBuffers(mSource, 1, &buffer);
+ checkError(__FUNCTION__);
+
+ active = stream(buffer);
+
+ alSourceQueueBuffers(mSource, 1, &buffer);
+ checkError(__FUNCTION__);
+
+ if(!active)
+ {
+ if(mLoop)
+ {
+ active = true;
+ ov_time_seek(&mOggStream, 0);
+ }
+ else
+ {
+ stop();
+ }
+ }
+ }
+
+ return active;
+ }
+
+ bool OggSoundStream::stream(ALuint buffer)
+ {
+ char *data = new char[mBufferSize];
+ int size = 0;
+ int section;
+ int result;
+
+ while(size < mBufferSize)
+ {
+ result = ov_read(&mOggStream, data+size, mBufferSize-size, 0, 2, 1, §ion);
+
+ if(result > 0)
+ size += result;
+ else
+ if(result < 0)
+ throw Ogre::Exception(6, "Ogg Error: " + errorToString(result), "OgreAL::OggSoundStream::stream");
+ else
+ break;
+ }
+
+ checkError(__FUNCTION__);
+
+ if(size == 0)
+ return false;
+
+ alBufferData(buffer, mFormat, data, size, mFreq);
+ checkError(__FUNCTION__);
+
+ return true;
+ }
+
+ Ogre::String OggSoundStream::errorToString(int error) const
+ {
+ switch(error)
+ {
+ case OV_EREAD:
+ return Ogre::String("Read from media.");
+ case OV_ENOTVORBIS:
+ return Ogre::String("Not Vorbis data.");
+ case OV_EVERSION:
+ return Ogre::String("Vorbis version mismatch.");
+ case OV_EBADHEADER:
+ return Ogre::String("Invalid Vorbis header.");
+ case OV_EFAULT:
+ return Ogre::String("Internal logic fault (bug or heap/stack corruption.");
+ default:
+ return Sound::errorToString(error);
+ }
+ }
+} // Namespace
Added: trunk/python-ogre/ThirdParty/ogreal/OgreALOggSoundStream.h
===================================================================
--- trunk/python-ogre/ThirdParty/ogreal/OgreALOggSoundStream.h (rev 0)
+++ trunk/python-ogre/ThirdParty/ogreal/OgreALOggSoundStream.h 2007-09-22 11:41:04 UTC (rev 388)
@@ -0,0 +1,100 @@
+/*---------------------------------------------------------------------------*\
+** This source file is part of OgreAL **
+** an OpenAL plugin for the Ogre Rendering Engine. **
+** **
+** Copyright 2006 Casey Borders **
+** **
+** OgreAL is free software; you can redistribute it and/or modify it under **
+** the terms of the GNU Lesser General Public License as published by the **
+** Free Software Foundation; either version 2, or (at your option) any later **
+** version. **
+** **
+** The developer really likes screenshots and while he recognises that the **
+** fact that this is an AUDIO plugin means that the fruits of his labor will **
+** never been seen in these images he would like to kindly ...
[truncated message content] |