Index: code/branches/sound3/data/levels/sound.oxw
===================================================================
--- code/branches/sound3/data/levels/sound.oxw	(revision 6101)
+++ code/branches/sound3/data/levels/sound.oxw	(revision 6102)
@@ -18,6 +18,6 @@
   >
 
-  <AmbientSound source="Mars.ogg" loop="true" play="true" />
-  <AmbientSound source="Asteroid_rocks.ogg" loop="true" play="false">
+  <AmbientSound ambientSource="Mars.ogg" loop="true" play="true" />
+  <AmbientSound ambientSource="Asteroid_rocks.ogg" loop="true" play="false">
 	<events>
 		<activity>
Index: code/branches/sound3/src/libraries/core/XMLPort.h
===================================================================
--- code/branches/sound3/src/libraries/core/XMLPort.h	(revision 6101)
+++ code/branches/sound3/src/libraries/core/XMLPort.h	(revision 6102)
@@ -184,5 +184,5 @@
         ClassIdentifier<classname>::getIdentifier()->addXMLPortParamContainer(paramname, containername); \
     } \
-    containername->port(static_cast<BaseObject*>(this), object, xmlelement, mode)
+    containername->port(dynamic_cast<BaseObject*>(this), object, xmlelement, mode)
 
 // --------------------
Index: code/branches/sound3/src/orxonox/sound/AmbientSound.cc
===================================================================
--- code/branches/sound3/src/orxonox/sound/AmbientSound.cc	(revision 6101)
+++ code/branches/sound3/src/orxonox/sound/AmbientSound.cc	(revision 6102)
@@ -57,8 +57,6 @@
     {
         SUPER(AmbientSound, XMLPort, xmlelement, mode);
-        XMLPortParamExtern(AmbientSound, BaseSound, this, "volume", setVolume, getVolume, xmlelement, mode);
-        XMLPortParamExtern(AmbientSound, BaseSound, this, "loop", setLooping, getLooping, xmlelement, mode);
-        XMLPortParamExtern(AmbientSound, BaseSound, this, "play", play, isPlaying, xmlelement, mode);
-        XMLPortParam(AmbientSound, "source", setAmbientSource, getAmbientSource, xmlelement, mode);
+        BaseSound::XMLPortExtern(xmlelement, mode);
+        XMLPortParam(AmbientSound, "ambientsource", setAmbientSource, getAmbientSource, xmlelement, mode);
     }
 
Index: code/branches/sound3/src/orxonox/sound/BaseSound.cc
===================================================================
--- code/branches/sound3/src/orxonox/sound/BaseSound.cc	(revision 6101)
+++ code/branches/sound3/src/orxonox/sound/BaseSound.cc	(revision 6102)
@@ -37,4 +37,5 @@
 #include "core/GameMode.h"
 #include "core/Resource.h"
+#include "core/XMLPort.h"
 
 namespace orxonox
@@ -60,4 +61,12 @@
         if (GameMode::playsSound())
             alDeleteSources(1, &this->audioSource_);
+    }
+
+    void BaseSound::XMLPortExtern(Element& xmlelement, XMLPort::Mode mode)
+    {
+        XMLPortParam(BaseSound, "volume", setVolume,  getVolume,  xmlelement, mode);
+        XMLPortParam(BaseSound, "loop",   setLooping, getLooping, xmlelement, mode);
+        XMLPortParam(BaseSound, "play",   play,       isPlaying,  xmlelement, mode);
+        XMLPortParam(BaseSound, "source", setSource,  getSource,  xmlelement, mode);
     }
 
Index: code/branches/sound3/src/orxonox/sound/BaseSound.h
===================================================================
--- code/branches/sound3/src/orxonox/sound/BaseSound.h	(revision 6101)
+++ code/branches/sound3/src/orxonox/sound/BaseSound.h	(revision 6102)
@@ -49,4 +49,6 @@
         virtual ~BaseSound();
 
+        void XMLPortExtern(Element& xmlelement, XMLPort::Mode mode);
+
         virtual void play();
         virtual void stop();
Index: code/branches/sound3/src/orxonox/sound/WorldSound.cc
===================================================================
--- code/branches/sound3/src/orxonox/sound/WorldSound.cc	(revision 6101)
+++ code/branches/sound3/src/orxonox/sound/WorldSound.cc	(revision 6102)
@@ -53,8 +53,5 @@
     {
         SUPER(WorldSound, XMLPort, xmlelement, mode);
-        XMLPortParamExtern(WorldSound, BaseSound, this, "volume", setVolume, getVolume, xmlelement, mode);
-        XMLPortParamExtern(WorldSound, BaseSound, this, "loop", setLooping, getLooping, xmlelement, mode);
-        XMLPortParamExtern(WorldSound, BaseSound, this, "play", play, isPlaying, xmlelement, mode);
-        XMLPortParamExtern(WorldSound, BaseSound, this, "source", setSource, getSource, xmlelement, mode);
+        BaseSound::XMLPortExtern(xmlelement, mode);
     }
 
