Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 19, 2009, 12:18:41 AM (16 years ago)
Author:
rgrieder
Message:

Several small changes in sound:

  • Fixed a bug that caused a sound source to be initialised on pause() even it already existed
  • The XML parameter is now called "looping" instead of "loop" because looping was used really all over the code
  • The "play" XML parameter doesn't exist anymore, use "playOnLoad" for AmbientSound only.
  • Added "pitch" XML parameter
  • Changes in synchronisation policy: Ambient sound should not synchronise the state but instead th new playOnLoad parameter
File:
1 edited

Legend:

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

    r6372 r6382  
    5151        this->registerVariables();
    5252    }
    53 
    54     WorldSound::~WorldSound()
    55     {
    56     }
    5753   
    5854    void WorldSound::registerVariables()
    5955    {
    60         registerVariable(volume_, ObjectDirection::ToClient, new NetworkCallback<WorldSound>(this, &WorldSound::volumeChanged));
    61         registerVariable(source_, ObjectDirection::ToClient, new NetworkCallback<WorldSound>(this, &WorldSound::sourceChanged));
     56        registerVariable(volume_,   ObjectDirection::ToClient, new NetworkCallback<WorldSound>(this, &WorldSound::volumeChanged));
     57        registerVariable(source_,   ObjectDirection::ToClient, new NetworkCallback<WorldSound>(this, &WorldSound::sourceChanged));
    6258        registerVariable(bLooping_, ObjectDirection::ToClient, new NetworkCallback<WorldSound>(this, &WorldSound::loopingChanged));
     59        registerVariable(pitch_,    ObjectDirection::ToClient, new NetworkCallback<WorldSound>(this, &WorldSound::pitchChanged));
    6360        registerVariable((int&)(BaseSound::state_), ObjectDirection::ToClient, new NetworkCallback<WorldSound>(this, &WorldSound::stateChanged));
    64         registerVariable(pitch_, ObjectDirection::ToClient, new NetworkCallback<WorldSound>(this, &WorldSound::pitchChanged));
    6561    }
    6662
     
    125121    float WorldSound::getRealVolume()
    126122    {
     123        assert(GameMode::playsSound());
    127124        return SoundManager::getInstance().getRealVolume(SoundType::Effects);
    128125    }
Note: See TracChangeset for help on using the changeset viewer.