aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llaudio
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:56 -0500
committerJacek Antonelli2008-08-15 23:44:56 -0500
commitc07901e29ed545bbb02e3bddf148fe1104b94e9f (patch)
treef1ada64ce834acd7d92a425efb96c4b86bcf16b1 /linden/indra/llaudio
parentSecond Life viewer sources 1.15.0.2 (diff)
downloadmeta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.zip
meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.tar.gz
meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.tar.bz2
meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.tar.xz
Second Life viewer sources 1.15.1.3
Diffstat (limited to 'linden/indra/llaudio')
-rw-r--r--linden/indra/llaudio/audioengine.cpp24
-rw-r--r--linden/indra/llaudio/audioengine_fmod.cpp2
2 files changed, 10 insertions, 16 deletions
diff --git a/linden/indra/llaudio/audioengine.cpp b/linden/indra/llaudio/audioengine.cpp
index edfa123..d5c2a40 100644
--- a/linden/indra/llaudio/audioengine.cpp
+++ b/linden/indra/llaudio/audioengine.cpp
@@ -134,28 +134,22 @@ void LLAudioEngine::shutdown()
134 134
135 // Clean up channels 135 // Clean up channels
136 S32 i; 136 S32 i;
137 if (mChannels) 137 for (i = 0; i < MAX_CHANNELS; i++)
138 { 138 {
139 for (i = 0; i < MAX_CHANNELS; i++) 139 if (mChannels[i])
140 { 140 {
141 if (mChannels[i]) 141 delete mChannels[i];
142 { 142 mChannels[i] = NULL;
143 delete mChannels[i];
144 mChannels[i] = NULL;
145 }
146 } 143 }
147 } 144 }
148 145
149 // Clean up buffers 146 // Clean up buffers
150 if (mBuffers) 147 for (i = 0; i < MAX_BUFFERS; i++)
151 { 148 {
152 for (i = 0; i < MAX_BUFFERS; i++) 149 if (mBuffers[i])
153 { 150 {
154 if (mBuffers[i]) 151 delete mBuffers[i];
155 { 152 mBuffers[i] = NULL;
156 delete mBuffers[i];
157 mBuffers[i] = NULL;
158 }
159 } 153 }
160 } 154 }
161} 155}
@@ -575,7 +569,7 @@ LLAudioChannel * LLAudioEngine::getFreeChannel(const F32 priority)
575 } 569 }
576 } 570 }
577 571
578 if (min_priority > priority) 572 if (min_priority > priority || !min_channelp)
579 { 573 {
580 // All playing channels have higher priority, return. 574 // All playing channels have higher priority, return.
581 return NULL; 575 return NULL;
diff --git a/linden/indra/llaudio/audioengine_fmod.cpp b/linden/indra/llaudio/audioengine_fmod.cpp
index 485b95b..4574a57 100644
--- a/linden/indra/llaudio/audioengine_fmod.cpp
+++ b/linden/indra/llaudio/audioengine_fmod.cpp
@@ -950,7 +950,7 @@ void LLAudioEngine_FMOD::pauseInternetStream(int pause)
950 stopInternetStream(); 950 stopInternetStream();
951 } 951 }
952 } 952 }
953 else if (mInternetStreamURL) 953 else
954 { 954 {
955 startInternetStream(mInternetStreamURL); 955 startInternetStream(mInternetStreamURL);
956 } 956 }