Revision: 30145
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30145
Author:   nexyon
Date:     2010-07-09 10:56:25 +0200 (Fri, 09 Jul 2010)

Log Message:
-----------
Audaspace:
* Comment fix for PingPongFactory
* Added 2 new factory types: Superpose and Double

Modified Paths:
--------------
    branches/soc-2010-nexyon/intern/audaspace/FX/AUD_PingPongFactory.h

Added Paths:
-----------
    branches/soc-2010-nexyon/intern/audaspace/FX/AUD_DoubleFactory.cpp
    branches/soc-2010-nexyon/intern/audaspace/FX/AUD_DoubleFactory.h
    branches/soc-2010-nexyon/intern/audaspace/FX/AUD_SuperposeFactory.cpp
    branches/soc-2010-nexyon/intern/audaspace/FX/AUD_SuperposeFactory.h
    branches/soc-2010-nexyon/intern/audaspace/FX/AUD_SuperposeReader.cpp
    branches/soc-2010-nexyon/intern/audaspace/FX/AUD_SuperposeReader.h

Added: branches/soc-2010-nexyon/intern/audaspace/FX/AUD_DoubleFactory.cpp
===================================================================
--- branches/soc-2010-nexyon/intern/audaspace/FX/AUD_DoubleFactory.cpp          
                (rev 0)
+++ branches/soc-2010-nexyon/intern/audaspace/FX/AUD_DoubleFactory.cpp  
2010-07-09 08:56:25 UTC (rev 30145)
@@ -0,0 +1,55 @@
+/*
+ * $Id$
+ *
+ * ***** BEGIN LGPL LICENSE BLOCK *****
+ *
+ * Copyright 2009 Jörg Hermann Müller
+ *
+ * This file is part of AudaSpace.
+ *
+ * AudaSpace 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AudaSpace 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with AudaSpace.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * ***** END LGPL LICENSE BLOCK *****
+ */
+
+#include "AUD_DoubleFactory.h"
+#include "AUD_DoubleReader.h"
+
+AUD_DoubleFactory::AUD_DoubleFactory(AUD_IFactory* factory1, AUD_IFactory* 
factory2) :
+               m_factory1(factory1), m_factory2(factory2) {}
+
+AUD_IReader* AUD_DoubleFactory::createReader()
+{
+       AUD_IReader* reader1 = m_factory1->createReader();
+       if(!reader1)
+               return 0;
+       AUD_IReader* reader2;
+       try
+       {
+               reader2 = m_factory2->createReader();
+               if(!reader2)
+               {
+                       delete reader1; AUD_DELETE("reader")
+                       return 0;
+               }
+       }
+       catch(AUD_Exception&)
+       {
+               delete reader1; AUD_DELETE("reader")
+               throw;
+       }
+
+       AUD_IReader* reader = new AUD_DoubleReader(reader1, reader2);
+       return reader;
+}


Property changes on: 
branches/soc-2010-nexyon/intern/audaspace/FX/AUD_DoubleFactory.cpp
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: branches/soc-2010-nexyon/intern/audaspace/FX/AUD_DoubleFactory.h
===================================================================
--- branches/soc-2010-nexyon/intern/audaspace/FX/AUD_DoubleFactory.h            
                (rev 0)
+++ branches/soc-2010-nexyon/intern/audaspace/FX/AUD_DoubleFactory.h    
2010-07-09 08:56:25 UTC (rev 30145)
@@ -0,0 +1,59 @@
+/*
+ * $Id$
+ *
+ * ***** BEGIN LGPL LICENSE BLOCK *****
+ *
+ * Copyright 2009 Jörg Hermann Müller
+ *
+ * This file is part of AudaSpace.
+ *
+ * AudaSpace 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AudaSpace 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with AudaSpace.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * ***** END LGPL LICENSE BLOCK *****
+ */
+
+#ifndef AUD_DOUBLEFACTORY
+#define AUD_DOUBLEFACTORY
+
+#include "AUD_IFactory.h"
+
+/**
+ * This factory plays two other factories behind each other.
+ * \note Readers from the underlying factories must have the same sample rate 
and channel count.
+ */
+class AUD_DoubleFactory : public AUD_IFactory
+{
+private:
+       /**
+        * First played factory.
+        */
+       AUD_IFactory* m_factory1;
+
+       /**
+        * Second played factory.
+        */
+       AUD_IFactory* m_factory2;
+
+public:
+       /**
+        * Creates a new double factory.
+        * \param factory1 The first input factory.
+        * \param factory2 The second input factory.
+        */
+       AUD_DoubleFactory(AUD_IFactory* factory1, AUD_IFactory* factory2);
+
+       virtual AUD_IReader* createReader();
+};
+
+#endif //AUD_DOUBLEFACTORY


Property changes on: 
branches/soc-2010-nexyon/intern/audaspace/FX/AUD_DoubleFactory.h
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Modified: branches/soc-2010-nexyon/intern/audaspace/FX/AUD_PingPongFactory.h
===================================================================
--- branches/soc-2010-nexyon/intern/audaspace/FX/AUD_PingPongFactory.h  
2010-07-09 08:23:31 UTC (rev 30144)
+++ branches/soc-2010-nexyon/intern/audaspace/FX/AUD_PingPongFactory.h  
2010-07-09 08:56:25 UTC (rev 30145)
@@ -41,10 +41,6 @@
         */
        AUD_PingPongFactory(AUD_IFactory* factory = 0);
 
-       /**
-        * Destroys the factory.
-        */
-
        virtual AUD_IReader* createReader();
 };
 

Added: branches/soc-2010-nexyon/intern/audaspace/FX/AUD_SuperposeFactory.cpp
===================================================================
--- branches/soc-2010-nexyon/intern/audaspace/FX/AUD_SuperposeFactory.cpp       
                        (rev 0)
+++ branches/soc-2010-nexyon/intern/audaspace/FX/AUD_SuperposeFactory.cpp       
2010-07-09 08:56:25 UTC (rev 30145)
@@ -0,0 +1,55 @@
+/*
+ * $Id$
+ *
+ * ***** BEGIN LGPL LICENSE BLOCK *****
+ *
+ * Copyright 2009 Jörg Hermann Müller
+ *
+ * This file is part of AudaSpace.
+ *
+ * AudaSpace 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AudaSpace 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with AudaSpace.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * ***** END LGPL LICENSE BLOCK *****
+ */
+
+#include "AUD_SuperposeFactory.h"
+#include "AUD_SuperposeReader.h"
+
+AUD_SuperposeFactory::AUD_SuperposeFactory(AUD_IFactory* factory1, 
AUD_IFactory* factory2) :
+               m_factory1(factory1), m_factory2(factory2) {}
+
+AUD_IReader* AUD_SuperposeFactory::createReader()
+{
+       AUD_IReader* reader1 = m_factory1->createReader();
+       if(!reader1)
+               return 0;
+       AUD_IReader* reader2;
+       try
+       {
+               reader2 = m_factory2->createReader();
+               if(!reader2)
+               {
+                       delete reader1; AUD_DELETE("reader")
+                       return 0;
+               }
+       }
+       catch(AUD_Exception&)
+       {
+               delete reader1; AUD_DELETE("reader")
+               throw;
+       }
+
+       AUD_IReader* reader = new AUD_SuperposeReader(reader1, reader2);
+       return reader;
+}


Property changes on: 
branches/soc-2010-nexyon/intern/audaspace/FX/AUD_SuperposeFactory.cpp
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: branches/soc-2010-nexyon/intern/audaspace/FX/AUD_SuperposeFactory.h
===================================================================
--- branches/soc-2010-nexyon/intern/audaspace/FX/AUD_SuperposeFactory.h         
                (rev 0)
+++ branches/soc-2010-nexyon/intern/audaspace/FX/AUD_SuperposeFactory.h 
2010-07-09 08:56:25 UTC (rev 30145)
@@ -0,0 +1,59 @@
+/*
+ * $Id$
+ *
+ * ***** BEGIN LGPL LICENSE BLOCK *****
+ *
+ * Copyright 2009 Jörg Hermann Müller
+ *
+ * This file is part of AudaSpace.
+ *
+ * AudaSpace 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AudaSpace 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with AudaSpace.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * ***** END LGPL LICENSE BLOCK *****
+ */
+
+#ifndef AUD_SUPERPOSEFACTORY
+#define AUD_SUPERPOSEFACTORY
+
+#include "AUD_IFactory.h"
+
+/**
+ * This factory plays two other factories behind each other.
+ * \note Readers from the underlying factories must have the same sample rate 
and channel count.
+ */
+class AUD_SuperposeFactory : public AUD_IFactory
+{
+private:
+       /**
+        * First played factory.
+        */
+       AUD_IFactory* m_factory1;
+
+       /**
+        * Second played factory.
+        */
+       AUD_IFactory* m_factory2;
+
+public:
+       /**
+        * Creates a new superpose factory.
+        * \param factory1 The first input factory.
+        * \param factory2 The second input factory.
+        */
+       AUD_SuperposeFactory(AUD_IFactory* factory1, AUD_IFactory* factory2);
+
+       virtual AUD_IReader* createReader();
+};
+
+#endif //AUD_SUPERPOSEFACTORY


Property changes on: 
branches/soc-2010-nexyon/intern/audaspace/FX/AUD_SuperposeFactory.h
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: branches/soc-2010-nexyon/intern/audaspace/FX/AUD_SuperposeReader.cpp
===================================================================
--- branches/soc-2010-nexyon/intern/audaspace/FX/AUD_SuperposeReader.cpp        
                        (rev 0)
+++ branches/soc-2010-nexyon/intern/audaspace/FX/AUD_SuperposeReader.cpp        
2010-07-09 08:56:25 UTC (rev 30145)
@@ -0,0 +1,144 @@
+/*
+ * $Id$
+ *
+ * ***** BEGIN LGPL LICENSE BLOCK *****
+ *
+ * Copyright 2009 Jörg Hermann Müller
+ *
+ * This file is part of AudaSpace.
+ *
+ * AudaSpace 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AudaSpace 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with AudaSpace.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * ***** END LGPL LICENSE BLOCK *****
+ */
+
+#include "AUD_SuperposeReader.h"

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to