aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llaudio/audioengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llaudio/audioengine.cpp15
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 {