More unicode fixes.
Fixed more unicode stuff I missed the first time around.
This commit is contained in:
parent
6e02974b10
commit
3397d41ba8
|
@ -240,15 +240,15 @@ namespace cAudio
|
|||
audioIndex[audioName] = audio;
|
||||
|
||||
audioSources.push_back(audio);
|
||||
getLogger()->logInfo("AudioManager", "Audio Source (%s) created from Data Source %s.", audioName.c_str(), dataSource.c_str());
|
||||
getLogger()->logInfo("AudioManager", "Audio Source (%s) created from Data Source %s.", toUTF8(audioName), toUTF8(dataSource));
|
||||
return audio;
|
||||
}
|
||||
|
||||
getLogger()->logError("AudioManager", "Failed to create Audio Source (%s): Error creating audio source.", audioName.c_str());
|
||||
getLogger()->logError("AudioManager", "Failed to create Audio Source (%s): Error creating audio source.", toUTF8(audioName));
|
||||
audio->drop();
|
||||
return NULL;
|
||||
}
|
||||
getLogger()->logError("AudioManager", "Failed to create Audio Source (%s): Audio data could not be decoded by (.%s) decoder.", audioName.c_str(), decoder->getType().c_str());
|
||||
getLogger()->logError("AudioManager", "Failed to create Audio Source (%s): Audio data could not be decoded by (.%s) decoder.", toUTF8(audioName), toUTF8(decoder->getType()));
|
||||
decoder->drop();
|
||||
return NULL;
|
||||
}
|
||||
|
@ -264,7 +264,7 @@ namespace cAudio
|
|||
IAudioDecoderFactory* factory = getAudioDecoderFactory(toUTF8(ext));
|
||||
|
||||
if(!factory) {
|
||||
getLogger()->logError("AudioManager", "Failed to create Audio Source (%s): No decoder could be found for (.%s).", audioName.c_str(), ext.c_str());
|
||||
getLogger()->logError("AudioManager", "Failed to create Audio Source (%s): No decoder could be found for (.%s).", toUTF8(audioName), toUTF8(ext));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -304,7 +304,7 @@ namespace cAudio
|
|||
IAudioDecoderFactory* factory = getAudioDecoderFactory(toUTF8(ext));
|
||||
|
||||
if(!factory) {
|
||||
getLogger()->logError("AudioManager", "Failed to create Audio Source (%s): Codec (.%s) is not supported.", audioName.c_str(), ext.c_str());
|
||||
getLogger()->logError("AudioManager", "Failed to create Audio Source (%s): Codec (.%s) is not supported.", toUTF8(audioName), toUTF8(ext));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -338,7 +338,7 @@ namespace cAudio
|
|||
IAudioDecoderFactory* factory = getAudioDecoderFactory("raw");
|
||||
|
||||
if(!factory) {
|
||||
getLogger()->logError("AudioManager", "Failed to create Audio Source (%s): Codec (.raw) is not supported.", audioName.c_str());
|
||||
getLogger()->logError("AudioManager", "Failed to create Audio Source (%s): Codec (.raw) is not supported.", toUTF8(audioName));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -363,7 +363,7 @@ namespace cAudio
|
|||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString ext = fromUTF8(extension);
|
||||
decodermap[ext] = factory;
|
||||
getLogger()->logInfo("AudioManager", "Audio Decoder for extension .%s registered.", ext.c_str());
|
||||
getLogger()->logInfo("AudioManager", "Audio Decoder for extension .%s registered.", toUTF8(ext));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -375,7 +375,7 @@ namespace cAudio
|
|||
if(it != decodermap.end())
|
||||
{
|
||||
decodermap.erase(it);
|
||||
getLogger()->logInfo("AudioManager", "Audio Decoder for extension .%s unregistered.", ext.c_str());
|
||||
getLogger()->logInfo("AudioManager", "Audio Decoder for extension .%s unregistered.", toUTF8(ext));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -418,7 +418,7 @@ namespace cAudio
|
|||
dataSourcePriorityList.push_back(std::pair<int, cAudioString>(priority, safeName));
|
||||
std::sort(dataSourcePriorityList.begin(), dataSourcePriorityList.end(), compareDataSourcePriorities);
|
||||
|
||||
getLogger()->logInfo("AudioManager", "Data Source named %s registered (Priority %i).", safeName.c_str(), priority);
|
||||
getLogger()->logInfo("AudioManager", "Data Source named %s registered (Priority %i).", toUTF8(safeName), priority);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -430,7 +430,7 @@ namespace cAudio
|
|||
if(it != datasourcemap.end())
|
||||
{
|
||||
datasourcemap.erase(it);
|
||||
getLogger()->logInfo("AudioManager", "Data Source named %s unregistered.", safeName.c_str());
|
||||
getLogger()->logInfo("AudioManager", "Data Source named %s unregistered.", toUTF8(safeName));
|
||||
}
|
||||
|
||||
for(size_t i=0; i<dataSourcePriorityList.size(); ++i)
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace cAudio
|
|||
it->first->drop();
|
||||
if(DYNLIB_UNLOAD(it->second))
|
||||
{
|
||||
getLogger()->logError("cPluginManager", "Plugin Error: %s.", getError().c_str());
|
||||
getLogger()->logError("cPluginManager", "Plugin Error: %s.", toUTF8(getError()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ namespace cAudio
|
|||
{
|
||||
if(plugin)
|
||||
{
|
||||
cAudioString theName = safeCStr(name);
|
||||
cAudioString theName = fromUTF8(name);
|
||||
if(theName.empty())
|
||||
theName = plugin->getPluginName();
|
||||
|
||||
|
@ -70,7 +70,7 @@ namespace cAudio
|
|||
}
|
||||
}
|
||||
else
|
||||
getLogger()->logError("cPluginManager", "installPlugin Error: %s.", getError().c_str());
|
||||
getLogger()->logError("cPluginManager", "installPlugin Error: %s.", toUTF8(getError()));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ namespace cAudio
|
|||
it2->first->drop();
|
||||
if(DYNLIB_UNLOAD(it2->second))
|
||||
{
|
||||
getLogger()->logError("cPluginManager", "Plugin Error: %s.", getError().c_str());
|
||||
getLogger()->logError("cPluginManager", "Plugin Error: %s.", fromUTF8(getError()));
|
||||
}
|
||||
DynamicallyLoadedPlugins.erase(it2->first);
|
||||
}
|
||||
|
@ -146,10 +146,10 @@ namespace cAudio
|
|||
cAudioVector<cAudioString>::Type fileList = getFilesInDirectory(".");
|
||||
for(size_t i=0; i<fileList.size(); ++i)
|
||||
{
|
||||
if(fileList[i].substr(0, 4) == "cAp_")
|
||||
if(fileList[i].substr(0, 4) == _CTEXT("cAp_"))
|
||||
{
|
||||
#ifdef CAUDIO_PLATFORM_WIN
|
||||
if(fileList[i].substr(fileList[i].length()-4, 4) == ".dll")
|
||||
if(fileList[i].substr(fileList[i].length()-4, 4) == _CTEXT(".dll"))
|
||||
#elif defined(CAUDIO_PLATFORM_LINUX)
|
||||
if(fileList[i].substr(fileList[i].length()-3, 3) == ".so")
|
||||
#elif defined(CAUDIO_PLATFORM_MAC)
|
||||
|
@ -157,7 +157,7 @@ namespace cAudio
|
|||
#endif
|
||||
{
|
||||
//Found a plugin, load it
|
||||
installPlugin(cAudioString("./" + fileList[i]).c_str(), NULL);
|
||||
installPlugin(toUTF8(cAudioString(_CTEXT("./") + fileList[i])), NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -179,7 +179,7 @@ namespace cAudio
|
|||
NULL
|
||||
);
|
||||
|
||||
cAudioString ret = (char*)lpMsgBuf;
|
||||
cAudioString ret = fromUTF8((char*)lpMsgBuf);
|
||||
// remove line break
|
||||
ret = ret.substr(0, ret.length()-2);
|
||||
LocalFree(lpMsgBuf);
|
||||
|
|
Loading…
Reference in New Issue