diff options
author | Jacek Antonelli | 2009-01-11 16:10:10 -0600 |
---|---|---|
committer | Jacek Antonelli | 2009-01-11 16:10:15 -0600 |
commit | 6156baad67c744ed03ea47798bfeb8a77698efc6 (patch) | |
tree | 872d35ff6df740462d8cb574d03f746dfd5dd1ae /linden/indra/llaudio | |
parent | Second Life viewer sources 1.22.3-RC (diff) | |
download | meta-impy-6156baad67c744ed03ea47798bfeb8a77698efc6.zip meta-impy-6156baad67c744ed03ea47798bfeb8a77698efc6.tar.gz meta-impy-6156baad67c744ed03ea47798bfeb8a77698efc6.tar.bz2 meta-impy-6156baad67c744ed03ea47798bfeb8a77698efc6.tar.xz |
Second Life viewer sources 1.22.4-RC
Diffstat (limited to 'linden/indra/llaudio')
-rw-r--r-- | linden/indra/llaudio/audioengine.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/linden/indra/llaudio/audioengine.cpp b/linden/indra/llaudio/audioengine.cpp index 298ab1d..baea815 100644 --- a/linden/indra/llaudio/audioengine.cpp +++ b/linden/indra/llaudio/audioengine.cpp | |||
@@ -170,13 +170,6 @@ void LLAudioEngine::updateChannels() | |||
170 | { | 170 | { |
171 | if (mChannels[i]) | 171 | if (mChannels[i]) |
172 | { | 172 | { |
173 | // set secondary gain if type is available | ||
174 | LLAudioSource* source = mChannels[i]->getSource(); | ||
175 | if (source) | ||
176 | { | ||
177 | mChannels[i]->setSecondaryGain(mSecondaryGain[source->getType()]); | ||
178 | } | ||
179 | |||
180 | mChannels[i]->updateBuffer(); | 173 | mChannels[i]->updateBuffer(); |
181 | mChannels[i]->update3DPosition(); | 174 | mChannels[i]->update3DPosition(); |
182 | mChannels[i]->updateLoop(); | 175 | mChannels[i]->updateLoop(); |
@@ -1578,6 +1571,8 @@ void LLAudioChannel::setSource(LLAudioSource *sourcep) | |||
1578 | } | 1571 | } |
1579 | 1572 | ||
1580 | mCurrentSourcep = sourcep; | 1573 | mCurrentSourcep = sourcep; |
1574 | |||
1575 | |||
1581 | updateBuffer(); | 1576 | updateBuffer(); |
1582 | update3DPosition(); | 1577 | update3DPosition(); |
1583 | } | 1578 | } |
@@ -1592,6 +1587,12 @@ BOOL LLAudioChannel::updateBuffer() | |||
1592 | return FALSE; | 1587 | return FALSE; |
1593 | } | 1588 | } |
1594 | 1589 | ||
1590 | // Initialize the channel's gain setting for this sound. | ||
1591 | if(gAudiop) | ||
1592 | { | ||
1593 | setSecondaryGain(gAudiop->getSecondaryGain(mCurrentSourcep->getType())); | ||
1594 | } | ||
1595 | |||
1595 | LLAudioBuffer *bufferp = mCurrentSourcep->getCurrentBuffer(); | 1596 | LLAudioBuffer *bufferp = mCurrentSourcep->getCurrentBuffer(); |
1596 | if (bufferp == mCurrentBufferp) | 1597 | if (bufferp == mCurrentBufferp) |
1597 | { | 1598 | { |