Changeset 20865

Show
Ignore:
Timestamp:
09/25/07 16:36:26 (1 year ago)
Author:
patrick
Message:

Do not pass fundamental types by const reference. Doing so is more expensive
than copying them because of the derefernece that is needed. This changes the
signature of methods in snx::ISoundImplementation.

Bumped the version to 1.3.5.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • juggler/trunk/modules/sonix/ChangeLog

    r20864 r20865  
    11DATE        AUTHOR      CHANGE 
    22----------- ----------- ------------------------------------------------------- 
     3Sep-25-2007 patrick     Changed method signatures to remove passing of 
     4                        fundamental types by const reference. 
     5                        NEW VERSION: 1.3.5 
    36Sep-25-2007 patrick     The methods of snx::sonix are no longer virtual. 
    47                        NEW VERSION: 1.3.4 
  • juggler/trunk/modules/sonix/VERSION

    r20864 r20865  
     11.3.5-0 @09/25/2007 21:35:00 UTC@ 
    121.3.4-0 @09/25/2007 21:30:00 UTC@ 
    231.3.3-0 @09/05/2007 03:00:00 UTC@ 
  • juggler/trunk/modules/sonix/plugins/Audiere/AudiereSoundImplementation.cpp

    r19729 r20865  
    8181#endif 
    8282 
    83 void AudiereSoundImplementation::step( const float & timeElapsed
     83void AudiereSoundImplementation::step(const float timeElapsed
    8484{ 
    8585   vprASSERT(mDev.get() != NULL && 
     
    115115 */ 
    116116void AudiereSoundImplementation::trigger(const std::string& alias, 
    117                                          const int& looping) 
     117                                         const int looping) 
    118118{ 
    119119   vprASSERT(mDev.get() != NULL && 
  • juggler/trunk/modules/sonix/plugins/Audiere/AudiereSoundImplementation.h

    r19729 r20865  
    8989    * @semantics Triggers a sound 
    9090    */ 
    91    virtual void trigger( const std::string& alias, const int& looping = 0); 
     91   virtual void trigger(const std::string& alias, const int looping = 0); 
    9292 
    9393   /** 
     
    249249    * @input time elapsed since last frame 
    250250    */ 
    251    virtual void step( const float & timeElapsed ); 
     251   virtual void step(const float timeElapsed); 
    252252 
    253253   /** 
  • juggler/trunk/modules/sonix/plugins/AudioWorks/AudioWorksSoundImplementation.cpp

    r19729 r20865  
    123123    * @semantics Triggers a sound 
    124124    */ 
    125    void AudioWorksSoundImplementation::trigger( const std::string & alias, const int & looping ) 
     125   void AudioWorksSoundImplementation::trigger(const std::string& alias, 
     126                                               const int looping) 
    126127   { 
    127128      snx::SoundImplementation::trigger( alias, looping ); 
     
    700701    * @input time elapsed since last frame 
    701702    */ 
    702    void AudioWorksSoundImplementation::step( const float & timeElapsed
     703   void AudioWorksSoundImplementation::step(const float timeElapsed
    703704   { 
    704705      if (this->isStarted() == true) 
  • juggler/trunk/modules/sonix/plugins/AudioWorks/AudioWorksSoundImplementation.h

    r19729 r20865  
    8383    * @semantics Triggers a sound 
    8484    */ 
    85    virtual void trigger( const std::string & alias, const int & looping = 0 ); 
     85   virtual void trigger(const std::string& alias, const int looping = 0); 
    8686 
    8787   /** 
     
    222222    * @input time elapsed since last frame 
    223223    */ 
    224    virtual void step( const float & timeElapsed ); 
     224   virtual void step(const float timeElapsed); 
    225225 
    226226   /** 
  • juggler/trunk/modules/sonix/plugins/OpenAL/OpenALSoundImplementation.cpp

    r20863 r20865  
    178178 */ 
    179179void OpenALSoundImplementation::trigger(const std::string& alias, 
    180                                         const int& looping) 
     180                                        const int looping) 
    181181{ 
    182182   vprASSERT(mContextId != NULL && mDev != NULL && 
     
    898898} 
    899899 
    900 void OpenALSoundImplementation::step(const float& timeElapsed) 
     900void OpenALSoundImplementation::step(const float timeElapsed) 
    901901{ 
    902902   vprASSERT(mContextId != NULL && mDev != NULL && 
  • juggler/trunk/modules/sonix/plugins/OpenAL/OpenALSoundImplementation.h

    r20862 r20865  
    101101    * @semantics Triggers a sound 
    102102    */ 
    103    virtual void trigger( const std::string& alias, const int& looping = 0); 
     103   virtual void trigger( const std::string& alias, const int looping = 0); 
    104104 
    105105   /** 
     
    261261    * @input time elapsed since last frame 
    262262    */ 
    263    virtual void step( const float & timeElapsed ); 
     263   virtual void step(const float& timeElapsed); 
    264264 
    265265   /** 
  • juggler/trunk/modules/sonix/plugins/Subsynth/SubsynthSoundImplementation.cpp

    r19729 r20865  
    8787#endif 
    8888 
    89 void SubsynthSoundImplementation::step( const float & timeElapsed
     89void SubsynthSoundImplementation::step(const float timeElapsed
    9090{ 
    9191   snx::SoundImplementation::step( timeElapsed ); 
     
    113113 * @semantics Triggers a sound 
    114114 */ 
    115 void SubsynthSoundImplementation::trigger( const std::string& alias, const int& looping ) 
     115void SubsynthSoundImplementation::trigger(const std::string& alias, 
     116                                          const int looping) 
    116117{ 
    117118   // do nothing if not started. 
  • juggler/trunk/modules/sonix/plugins/Subsynth/SubsynthSoundImplementation.h

    r19729 r20865  
    9898    * @semantics Triggers a sound 
    9999    */ 
    100    virtual void trigger( const std::string& alias, const int& looping = 0); 
     100   virtual void trigger( const std::string& alias, const int looping = 0); 
    101101 
    102102   /** 
     
    249249    * @input time elapsed since last frame 
    250250    */ 
    251    virtual void step( const float & timeElapsed ); 
     251   virtual void step(const float timeElapsed); 
    252252 
    253253   /** 
  • juggler/trunk/modules/sonix/plugins/configure.ac

    r20579 r20865  
    143143VPR_PATH([1.1.23], ,[AC_MSG_ERROR([*** VPR required for Sonix plug-ins ***])]) 
    144144 
    145 SNX_PATH([1.1.4], [BUILD_PLUGINS='Y'], 
     145SNX_PATH([1.3.5], [BUILD_PLUGINS='Y'], 
    146146         [AC_MSG_WARN([*** Sonix required for Sonix plug-ins ***]) 
    147147          BUILD_PLUGINS='N' 
  • juggler/trunk/modules/sonix/snx/ISoundImplementation.h

    r19729 r20865  
    8181    *              -1 is repeat infinitely. 
    8282    */ 
    83    virtual void trigger( const std::string & alias, const int & repeat = 1 ) = 0; 
     83   virtual void trigger(const std::string& alias, const int repeat = 1) = 0; 
    8484 
    8585   /** 
     
    230230    * @param timeElapsed The time elapsed since the last sound frame. 
    231231    */ 
    232    virtual void step( const float& timeElapsed ) = 0; 
     232   virtual void step(const float timeElapsed) = 0; 
    233233 
    234234   /** 
  • juggler/trunk/modules/sonix/snx/SoundHandle.h

    r19729 r20865  
    132132       *               (single shot) is default. 
    133133       */ 
    134       virtual void trigger( const int& repeat = 1
     134      virtual void trigger(const int repeat = 1
    135135      { 
    136136         sonix::instance()->trigger( mAlias, repeat ); 
     
    259259       * @param z The Z coordinate of the sound in 3D OpenGL coordinates. 
    260260       */ 
    261       virtual void setPosition( const float& x, const float& y, const float& z
     261      virtual void setPosition(const float x, const float y, const float z
    262262      { 
    263263         sonix::instance()->setPosition( mAlias, x, y, z ); 
  • juggler/trunk/modules/sonix/snx/SoundImplementation.h

    r19729 r20865  
    105105    * @param repeat The number of times to play.  Use -1 to repeat forever. 
    106106    */ 
    107    virtual void trigger( const std::string & alias, const int & repeat = 1
     107   virtual void trigger(const std::string& alias, const int repeat = 1
    108108   { 
    109109      vprASSERT(this->isStarted() == true && "must call startAPI prior to this function"); 
     
    387387    * @param timeElapsed The time elapsed since the last sound frame. 
    388388    */ 
    389    virtual void step( const float& timeElapsed
     389   virtual void step(const float timeElapsed
    390390   { 
    391391      boost::ignore_unused_variable_warning(timeElapsed); 
  • juggler/trunk/modules/sonix/snx/StubSoundImplementation.h

    r19729 r20865  
    9898    *              -1 is repeat infinitely. 
    9999    */ 
    100    virtual void trigger( const std::string & alias, const int & looping = 0
     100   virtual void trigger(const std::string& alias, const int looping = 0
    101101   { 
    102102      snx::SoundImplementation::trigger( alias, looping ); 
     
    283283    * @param timeElapsed The time elapsed since the last sound frame. 
    284284    */ 
    285    virtual void step( const float & timeElapsed
     285   virtual void step(const float timeElapsed
    286286   { 
    287287      snx::SoundImplementation::step( timeElapsed ); 
  • juggler/trunk/modules/sonix/snx/sonix.cpp

    r19729 r20865  
    7979 * @semantics Triggers a sound 
    8080 */ 
    81 void sonix::trigger( const std::string& alias, const int& repeat
     81void sonix::trigger(const std::string& alias, const int repeat
    8282{ 
    8383   this->impl().trigger( alias, repeat ); 
     
    148148} 
    149149 
    150 void sonix::setPosition(const std::string& alias, const float& x, 
    151                         const float& y, const float& z) 
     150void sonix::setPosition(const std::string& alias, const float x, 
     151                        const float y, const float z) 
    152152{ 
    153153   this->impl().setPosition( alias, x, y, z ); 
     
    260260 * @input time elapsed since last frame 
    261261 */ 
    262 void sonix::step(const float& timeElapsed) 
     262void sonix::step(const float timeElapsed) 
    263263{ 
    264264   this->impl().step( timeElapsed ); 
  • juggler/trunk/modules/sonix/snx/sonix.h

    r20864 r20865  
    8282    *              -1 to repeat infinately, 1 (single shot) is default. 
    8383    */ 
    84    void trigger(const std::string& alias, const int& repeat = 1); 
     84   void trigger(const std::string& alias, const int repeat = 1); 
    8585 
    8686   /** 
     
    196196    * @param z     The Z coordinate of the sound in 3D OpenGL coordinates. 
    197197    */ 
    198    void setPosition(const std::string& alias, const float& x, const float& y, 
    199                     const float& z); 
     198   void setPosition(const std::string& alias, const float x, const float y, 
     199                    const float z); 
    200200 
    201201   /** 
     
    283283    * @param timeElapsed Time elapsed since the last sound frame. 
    284284    */ 
    285    void step(const float& timeElapsed); 
     285   void step(const float timeElapsed); 
    286286 
    287287protected: