Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 9, 2009, 10:09:27 PM (14 years ago)
Author:
scheusso
Message:

Approach to make sounds synchronisable (not yet working)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/orxonox/sound/WorldSound.cc

    r6269 r6307  
    3636#include "core/XMLPort.h"
    3737#include "SoundManager.h"
     38#include <core/ConsoleCommandCompilation.h>
    3839
    3940namespace orxonox
     
    4748        // WorldSound buffers should be pooled when they're not used anymore
    4849        this->bPooling_ = true;
     50        this->registerVariables();
    4951    }
    5052
    5153    WorldSound::~WorldSound()
    5254    {
     55    }
     56   
     57    void WorldSound::registerVariables()
     58    {
     59        registerVariable(volume_, ObjectDirection::ToClient, new NetworkCallback<BaseSound>(static_cast<BaseSound*>(this), &BaseSound::volumeChanged));
     60        registerVariable(source_, ObjectDirection::ToClient, new NetworkCallback<BaseSound>(static_cast<BaseSound*>(this), &BaseSound::sourceChanged));
     61        registerVariable(bLooping_, ObjectDirection::ToClient, new NetworkCallback<BaseSound>(static_cast<BaseSound*>(this), &BaseSound::loopingChanged));
     62        registerVariable((int&)(BaseSound::state_), ObjectDirection::ToClient);
     63        registerVariable(pitch_, ObjectDirection::ToClient, new NetworkCallback<BaseSound>(static_cast<BaseSound*>(this), &BaseSound::pitchChanged));
    5364    }
    5465
Note: See TracChangeset for help on using the changeset viewer.