Added functions to ActorUtil for converting the extension to a file type and changed various places that had lists of extensions to use ActorUtil instead of duplicating the list of extensions. Added webm and wmv to list of video types.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include "RageSoundReader_FileReader.h"
|
||||
#include "RageUtil.h"
|
||||
#include "RageLog.h"
|
||||
#include "ActorUtil.h"
|
||||
|
||||
#include <set>
|
||||
#ifndef NO_WAV_SUPPORT
|
||||
@@ -122,10 +123,12 @@ RageSoundReader_FileReader *RageSoundReader_FileReader::OpenFile( RString filena
|
||||
}
|
||||
}
|
||||
set<RString> FileTypes;
|
||||
FileTypes.insert("oga");
|
||||
FileTypes.insert("ogg");
|
||||
FileTypes.insert("mp3");
|
||||
FileTypes.insert("wav");
|
||||
vector<RString> const& sound_exts= ActorUtil::GetTypeExtensionList(FT_Sound);
|
||||
for(vector<RString>::const_iterator curr= sound_exts.begin();
|
||||
curr != sound_exts.end(); ++curr)
|
||||
{
|
||||
FileTypes.insert(*curr);
|
||||
}
|
||||
|
||||
RString format = GetExtension( filename );
|
||||
format.MakeLower();
|
||||
|
||||
Reference in New Issue
Block a user