summaryrefslogtreecommitdiff
path: root/indra/llaudio
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-07-30 19:13:45 -0700
committerRichard Linden <none@none>2013-07-30 19:13:45 -0700
commita2e22732f195dc075a733c79f15156752f522a43 (patch)
treec708db3a28ae578b3b6d8f1cc94935937efd9a1e /indra/llaudio
parent19f7fb6ccce52224cc067e496d1480191badb165 (diff)
Summer cleaning - removed a lot of llcommon dependencies to speed up build times
consolidated most indra-specific constants in llcommon under indra_constants.h fixed issues with operations on mixed unit types (implicit and explicit) made LL_INFOS() style macros variadic in order to subsume other logging methods such as ll_infos added optional tag output to error recorders
Diffstat (limited to 'indra/llaudio')
-rwxr-xr-xindra/llaudio/llaudiodecodemgr.cpp16
-rwxr-xr-xindra/llaudio/llaudiodecodemgr.h1
-rwxr-xr-xindra/llaudio/llaudioengine.cpp2
-rwxr-xr-xindra/llaudio/llaudioengine.h4
-rw-r--r--indra/llaudio/llstreamingaudio_fmodex.h4
5 files changed, 14 insertions, 13 deletions
diff --git a/indra/llaudio/llaudiodecodemgr.cpp b/indra/llaudio/llaudiodecodemgr.cpp
index bcff03ceaa..e7b9fa6b18 100755
--- a/indra/llaudio/llaudiodecodemgr.cpp
+++ b/indra/llaudio/llaudiodecodemgr.cpp
@@ -41,6 +41,7 @@
#include "vorbis/codec.h"
#include "vorbis/vorbisfile.h"
#include <iterator>
+#include <deque>
extern LLAudioEngine *gAudiop;
@@ -114,7 +115,7 @@ size_t vfs_read(void *ptr, size_t size, size_t nmemb, void *datasource)
}
}
-int vfs_seek(void *datasource, ogg_int64_t offset, int whence)
+S32 vfs_seek(void *datasource, ogg_int64_t offset, S32 whence)
{
LLVFile *file = (LLVFile *)datasource;
@@ -150,7 +151,7 @@ int vfs_seek(void *datasource, ogg_int64_t offset, int whence)
}
}
-int vfs_close (void *datasource)
+S32 vfs_close (void *datasource)
{
LLVFile *file = (LLVFile *)datasource;
delete file;
@@ -209,7 +210,7 @@ BOOL LLVorbisDecodeState::initDecode()
return FALSE;
}
- int r = ov_open_callbacks(mInFilep, &mVF, NULL, 0, vfs_callbacks);
+ S32 r = ov_open_callbacks(mInFilep, &mVF, NULL, 0, vfs_callbacks);
if(r < 0)
{
llwarns << r << " Input to vorbis decode does not appear to be an Ogg bitstream: " << mUUID << llendl;
@@ -542,7 +543,7 @@ public:
void processQueue(const F32 num_secs = 0.005);
protected:
- LLLinkedQueue<LLUUID> mDecodeQueue;
+ std::deque<LLUUID> mDecodeQueue;
LLPointer<LLVorbisDecodeState> mCurrentDecodep;
};
@@ -617,7 +618,7 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
if (!done)
{
- if (!mDecodeQueue.getLength())
+ if (mDecodeQueue.empty())
{
// Nothing else on the queue.
done = TRUE;
@@ -625,7 +626,8 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
else
{
LLUUID uuid;
- mDecodeQueue.pop(uuid);
+ uuid = mDecodeQueue.front();
+ mDecodeQueue.pop_front();
if (gAudiop->hasDecodedFile(uuid))
{
// This file has already been decoded, don't decode it again.
@@ -683,7 +685,7 @@ BOOL LLAudioDecodeMgr::addDecodeRequest(const LLUUID &uuid)
{
// Just put it on the decode queue.
//llinfos << "addDecodeRequest for " << uuid << " has local asset file already" << llendl;
- mImpl->mDecodeQueue.push(uuid);
+ mImpl->mDecodeQueue.push_back(uuid);
return TRUE;
}
diff --git a/indra/llaudio/llaudiodecodemgr.h b/indra/llaudio/llaudiodecodemgr.h
index e42fe8a40d..7a9b807d04 100755
--- a/indra/llaudio/llaudiodecodemgr.h
+++ b/indra/llaudio/llaudiodecodemgr.h
@@ -28,7 +28,6 @@
#include "stdtypes.h"
-#include "lllinkedqueue.h"
#include "lluuid.h"
#include "llassettype.h"
diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp
index 06e752cf34..9c72515a0f 100755
--- a/indra/llaudio/llaudioengine.cpp
+++ b/indra/llaudio/llaudioengine.cpp
@@ -187,7 +187,7 @@ void LLAudioEngine::stopInternetStream()
}
// virtual
-void LLAudioEngine::pauseInternetStream(int pause)
+void LLAudioEngine::pauseInternetStream(S32 pause)
{
if (mStreamingAudioImpl)
mStreamingAudioImpl->pause(pause);
diff --git a/indra/llaudio/llaudioengine.h b/indra/llaudio/llaudioengine.h
index da1629a1db..f1e1b4e308 100755
--- a/indra/llaudio/llaudioengine.h
+++ b/indra/llaudio/llaudioengine.h
@@ -88,7 +88,7 @@ public:
enum LLAudioPlayState
{
- // isInternetStreamPlaying() returns an *int*, with
+ // isInternetStreamPlaying() returns an *S32*, with
// 0 = stopped, 1 = playing, 2 = paused.
AUDIO_STOPPED = 0,
AUDIO_PLAYING = 1,
@@ -160,7 +160,7 @@ public:
// Internet stream methods - these will call down into the *mStreamingAudioImpl if it exists
void startInternetStream(const std::string& url);
void stopInternetStream();
- void pauseInternetStream(int pause);
+ void pauseInternetStream(S32 pause);
void updateInternetStream(); // expected to be called often
LLAudioPlayState isInternetStreamPlaying();
// use a value from 0.0 to 1.0, inclusive
diff --git a/indra/llaudio/llstreamingaudio_fmodex.h b/indra/llaudio/llstreamingaudio_fmodex.h
index 1dee18ae7d..2787840ba1 100644
--- a/indra/llaudio/llstreamingaudio_fmodex.h
+++ b/indra/llaudio/llstreamingaudio_fmodex.h
@@ -49,9 +49,9 @@ class LLStreamingAudio_FMODEX : public LLStreamingAudioInterface
/*virtual*/ void start(const std::string& url);
/*virtual*/ void stop();
- /*virtual*/ void pause(int pause);
+ /*virtual*/ void pause(S32 pause);
/*virtual*/ void update();
- /*virtual*/ int isPlaying();
+ /*virtual*/ S32 isPlaying();
/*virtual*/ void setGain(F32 vol);
/*virtual*/ F32 getGain();
/*virtual*/ std::string getURL();