|
Revision 20852, 3.0 kB
(checked in by patrick, 1 year ago)
|
Removed commented out code that has no obvious value.
|
- Property svn:eol-style set to
native
- Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
#include <snx/snxConfig.h> |
|---|
| 37 |
|
|---|
| 38 |
#include <gmtl/Math.h> |
|---|
| 39 |
#include <gmtl/Vec.h> |
|---|
| 40 |
#include <gmtl/MatrixOps.h> |
|---|
| 41 |
#include <gmtl/VecOps.h> |
|---|
| 42 |
#include <gmtl/Xforms.h> |
|---|
| 43 |
#include <vpr/Util/Assert.h> |
|---|
| 44 |
|
|---|
| 45 |
#include <snx/SoundImplementation.h> |
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 |
namespace snx |
|---|
| 49 |
{ |
|---|
| 50 |
|
|---|
| 51 |
void SoundImplementation::copy( const SoundImplementation& si ) |
|---|
| 52 |
{ |
|---|
| 53 |
|
|---|
| 54 |
mName = si.mName; |
|---|
| 55 |
mSounds = si.mSounds; |
|---|
| 56 |
mListenerPos = si.mListenerPos; |
|---|
| 57 |
mSoundAPIInfo = si.mSoundAPIInfo; |
|---|
| 58 |
} |
|---|
| 59 |
|
|---|
| 60 |
void SoundImplementation::configure( const std::string& alias, const snx::SoundInfo& description ) |
|---|
| 61 |
{ |
|---|
| 62 |
this->unbind( alias ); |
|---|
| 63 |
snx::SoundInfo temp = mSounds[alias]; |
|---|
| 64 |
mSounds[alias] = description; |
|---|
| 65 |
|
|---|
| 66 |
|
|---|
| 67 |
mSounds[alias].triggerOnNextBind = temp.triggerOnNextBind; |
|---|
| 68 |
|
|---|
| 69 |
|
|---|
| 70 |
if (this->isStarted()) |
|---|
| 71 |
{ |
|---|
| 72 |
this->bind( alias ); |
|---|
| 73 |
} |
|---|
| 74 |
} |
|---|
| 75 |
|
|---|
| 76 |
void SoundImplementation::remove(const std::string& alias) |
|---|
| 77 |
{ |
|---|
| 78 |
if (this->isStarted()) |
|---|
| 79 |
{ |
|---|
| 80 |
this->unbind( alias ); |
|---|
| 81 |
} |
|---|
| 82 |
mSounds.erase( alias ); |
|---|
| 83 |
} |
|---|
| 84 |
|
|---|
| 85 |
void SoundImplementation::bindAll() |
|---|
| 86 |
{ |
|---|
| 87 |
std::map< std::string, snx::SoundInfo >::iterator it; |
|---|
| 88 |
for( it = mSounds.begin(); it != mSounds.end(); ++it) |
|---|
| 89 |
{ |
|---|
| 90 |
|
|---|
| 91 |
this->bind( (*it).first ); |
|---|
| 92 |
} |
|---|
| 93 |
} |
|---|
| 94 |
|
|---|
| 95 |
void SoundImplementation::unbindAll() |
|---|
| 96 |
{ |
|---|
| 97 |
std::map< std::string, snx::SoundInfo >::iterator it; |
|---|
| 98 |
for( it = mSounds.begin(); it != mSounds.end(); ++it) |
|---|
| 99 |
{ |
|---|
| 100 |
|
|---|
| 101 |
this->unbind( (*it).first ); |
|---|
| 102 |
} |
|---|
| 103 |
} |
|---|
| 104 |
|
|---|
| 105 |
} |
|---|
| 106 |
|
|---|