aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llaudio/llaudioengine.cpp
diff options
context:
space:
mode:
authorArmin Weatherwax2011-01-04 00:25:35 +0100
committerArmin Weatherwax2011-01-04 00:36:19 +0100
commitb4959214023db77c6048036cc924075c4271ba74 (patch)
treebfc899fae639c2187088d3802e2404a7d689ed88 /linden/indra/llaudio/llaudioengine.cpp
parentload unloaded-avatar-cloud particle system from LLSD file. (diff)
downloadmeta-impy-b4959214023db77c6048036cc924075c4271ba74.zip
meta-impy-b4959214023db77c6048036cc924075c4271ba74.tar.gz
meta-impy-b4959214023db77c6048036cc924075c4271ba74.tar.bz2
meta-impy-b4959214023db77c6048036cc924075c4271ba74.tar.xz
move streaming audio out of gAudiop into its own class.
* might solve several issues with streaming audio, like: streaming audio not working when the sound effects driver fails. * breaks fmod. Sorry. If you want fmod go fix it, its probably not difficult.
Diffstat (limited to 'linden/indra/llaudio/llaudioengine.cpp')
-rw-r--r--linden/indra/llaudio/llaudioengine.cpp79
1 files changed, 0 insertions, 79 deletions
diff --git a/linden/indra/llaudio/llaudioengine.cpp b/linden/indra/llaudio/llaudioengine.cpp
index bed791a..6b0003a 100644
--- a/linden/indra/llaudio/llaudioengine.cpp
+++ b/linden/indra/llaudio/llaudioengine.cpp
@@ -36,7 +36,6 @@
36#include "linden_common.h" 36#include "linden_common.h"
37 37
38#include "llaudioengine.h" 38#include "llaudioengine.h"
39#include "llstreamingaudio.h"
40 39
41#include "llerror.h" 40#include "llerror.h"
42#include "llmath.h" 41#include "llmath.h"
@@ -48,7 +47,6 @@
48#include "llaudiodecodemgr.h" 47#include "llaudiodecodemgr.h"
49#include "llassetstorage.h" 48#include "llassetstorage.h"
50 49
51
52// necessary for grabbing sounds from sim (implemented in viewer) 50// necessary for grabbing sounds from sim (implemented in viewer)
53extern void request_sound(const LLUUID &sound_guid); 51extern void request_sound(const LLUUID &sound_guid);
54 52
@@ -70,16 +68,6 @@ LLAudioEngine::~LLAudioEngine()
70{ 68{
71} 69}
72 70
73LLStreamingAudioInterface* LLAudioEngine::getStreamingAudioImpl()
74{
75 return mStreamingAudioImpl;
76}
77
78void LLAudioEngine::setStreamingAudioImpl(LLStreamingAudioInterface *impl)
79{
80 mStreamingAudioImpl = impl;
81}
82
83void LLAudioEngine::setDefaults() 71void LLAudioEngine::setDefaults()
84{ 72{
85 mMaxWindGain = 1.f; 73 mMaxWindGain = 1.f;
@@ -108,8 +96,6 @@ void LLAudioEngine::setDefaults()
108 mInternalGain = 0.f; 96 mInternalGain = 0.f;
109 mNextWindUpdate = 0.f; 97 mNextWindUpdate = 0.f;
110 98
111 mStreamingAudioImpl = NULL;
112
113 for (U32 i = 0; i < LLAudioEngine::AUDIO_TYPE_COUNT; i++) 99 for (U32 i = 0; i < LLAudioEngine::AUDIO_TYPE_COUNT; i++)
114 mSecondaryGain[i] = 1.0f; 100 mSecondaryGain[i] = 1.0f;
115} 101}
@@ -174,62 +160,6 @@ void LLAudioEngine::shutdown()
174 } 160 }
175} 161}
176 162
177
178// virtual
179void LLAudioEngine::startInternetStream(const std::string& url)
180{
181 if (mStreamingAudioImpl)
182 mStreamingAudioImpl->start(url);
183}
184
185
186// virtual
187void LLAudioEngine::stopInternetStream()
188{
189 if (mStreamingAudioImpl)
190 mStreamingAudioImpl->stop();
191}
192
193// virtual
194void LLAudioEngine::pauseInternetStream(int pause)
195{
196 if (mStreamingAudioImpl)
197 mStreamingAudioImpl->pause(pause);
198}
199
200// virtual
201void LLAudioEngine::updateInternetStream()
202{
203 if (mStreamingAudioImpl)
204 mStreamingAudioImpl->update();
205}
206
207// virtual
208int LLAudioEngine::isInternetStreamPlaying()
209{
210 if (mStreamingAudioImpl)
211 return mStreamingAudioImpl->isPlaying();
212
213 return 0; // Stopped
214}
215
216
217// virtual
218void LLAudioEngine::setInternetStreamGain(F32 vol)
219{
220 if (mStreamingAudioImpl)
221 mStreamingAudioImpl->setGain(vol);
222}
223
224// virtual
225std::string LLAudioEngine::getInternetStreamURL()
226{
227 if (mStreamingAudioImpl)
228 return mStreamingAudioImpl->getURL();
229 else return std::string();
230}
231
232
233void LLAudioEngine::updateChannels() 163void LLAudioEngine::updateChannels()
234{ 164{
235 S32 i; 165 S32 i;
@@ -512,7 +442,6 @@ void LLAudioEngine::idle(F32 max_decode_time)
512 // or request new data. 442 // or request new data.
513 startNextTransfer(); 443 startNextTransfer();
514 444
515 updateInternetStream();
516} 445}
517 446
518 447
@@ -754,14 +683,6 @@ F32 LLAudioEngine::getSecondaryGain(S32 type)
754 return mSecondaryGain[type]; 683 return mSecondaryGain[type];
755} 684}
756 685
757F32 LLAudioEngine::getInternetStreamGain()
758{
759 if (mStreamingAudioImpl)
760 return mStreamingAudioImpl->getGain();
761 else
762 return 1.0f;
763}
764
765void LLAudioEngine::setMaxWindGain(F32 gain) 686void LLAudioEngine::setMaxWindGain(F32 gain)
766{ 687{
767 mMaxWindGain = gain; 688 mMaxWindGain = gain;