Changeset 6102 for code/branches/sound3/src/orxonox
- Timestamp:
- Nov 20, 2009, 11:11:32 AM (15 years ago)
- Location:
- code/branches/sound3/src/orxonox/sound
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/sound3/src/orxonox/sound/AmbientSound.cc
r6100 r6102 57 57 { 58 58 SUPER(AmbientSound, XMLPort, xmlelement, mode); 59 XMLPortParamExtern(AmbientSound, BaseSound, this, "volume", setVolume, getVolume, xmlelement, mode); 60 XMLPortParamExtern(AmbientSound, BaseSound, this, "loop", setLooping, getLooping, xmlelement, mode); 61 XMLPortParamExtern(AmbientSound, BaseSound, this, "play", play, isPlaying, xmlelement, mode); 62 XMLPortParam(AmbientSound, "source", setAmbientSource, getAmbientSource, xmlelement, mode); 59 BaseSound::XMLPortExtern(xmlelement, mode); 60 XMLPortParam(AmbientSound, "ambientsource", setAmbientSource, getAmbientSource, xmlelement, mode); 63 61 } 64 62 -
code/branches/sound3/src/orxonox/sound/BaseSound.cc
r6071 r6102 37 37 #include "core/GameMode.h" 38 38 #include "core/Resource.h" 39 #include "core/XMLPort.h" 39 40 40 41 namespace orxonox … … 60 61 if (GameMode::playsSound()) 61 62 alDeleteSources(1, &this->audioSource_); 63 } 64 65 void BaseSound::XMLPortExtern(Element& xmlelement, XMLPort::Mode mode) 66 { 67 XMLPortParam(BaseSound, "volume", setVolume, getVolume, xmlelement, mode); 68 XMLPortParam(BaseSound, "loop", setLooping, getLooping, xmlelement, mode); 69 XMLPortParam(BaseSound, "play", play, isPlaying, xmlelement, mode); 70 XMLPortParam(BaseSound, "source", setSource, getSource, xmlelement, mode); 62 71 } 63 72 -
code/branches/sound3/src/orxonox/sound/BaseSound.h
r6074 r6102 49 49 virtual ~BaseSound(); 50 50 51 void XMLPortExtern(Element& xmlelement, XMLPort::Mode mode); 52 51 53 virtual void play(); 52 54 virtual void stop(); -
code/branches/sound3/src/orxonox/sound/WorldSound.cc
r6100 r6102 53 53 { 54 54 SUPER(WorldSound, XMLPort, xmlelement, mode); 55 XMLPortParamExtern(WorldSound, BaseSound, this, "volume", setVolume, getVolume, xmlelement, mode); 56 XMLPortParamExtern(WorldSound, BaseSound, this, "loop", setLooping, getLooping, xmlelement, mode); 57 XMLPortParamExtern(WorldSound, BaseSound, this, "play", play, isPlaying, xmlelement, mode); 58 XMLPortParamExtern(WorldSound, BaseSound, this, "source", setSource, getSource, xmlelement, mode); 55 BaseSound::XMLPortExtern(xmlelement, mode); 59 56 } 60 57
Note: See TracChangeset
for help on using the changeset viewer.