summaryrefslogtreecommitdiff
path: root/indra/llaudio/llaudiodecodemgr.cpp
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/llaudiodecodemgr.cpp
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/llaudiodecodemgr.cpp')
-rwxr-xr-xindra/llaudio/llaudiodecodemgr.cpp16
1 files changed, 9 insertions, 7 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;
}