Added: Support for having individual configurations for multiple devices. This is possible via the new command "Device" that allows to select the output devices to which the following commands (filters etc.) should be applied. The Configurator got a new button to generate a Device command for the selected connection(s).

This commit is contained in:
jthedering committed 2013-02-03 12:54:20 +00:00
1 parent 7758366b58
commit ef61580c19
17 files changed
+290 -92

No files matched your search

+56
View File
@@ -0,0 +1,56 @@
#include <string>
#include <sstream>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include "StringHelper.h"
using namespace std;
wstring StringHelper::replaceCharacters(std::wstring s, std::wstring chars, wchar_t replacement)
{
wstring result;
result.reserve(s.length());
for(unsigned i=0; i<s.length(); i++)
{
wchar_t c = s[i];
if(chars.find(c) != -1)
c = replacement;
result += c;
}
return result;
}
wstring StringHelper::replaceIllegalCharacters(wstring filename)
{
return replaceCharacters(filename, L"<>:\"/\\|?*", '_');
}
wstring StringHelper::toWString(string s, unsigned codepage)
{
int length = MultiByteToWideChar(codepage, 0, s.c_str(), -1, NULL, 0);
wchar_t* charBuf = new wchar_t[length];
MultiByteToWideChar(codepage, 0, s.c_str(), -1, charBuf, length);
wstring result = charBuf;
delete charBuf;
return result;
}
wstring StringHelper::toLowerCase(wstring s)
{
wchar_t* charBuf = new wchar_t[s.length() + 1];
memcpy(charBuf, s.c_str(), (s.length() + 1) * sizeof(wchar_t));
errno_t err = _wcslwr_s(charBuf, s.length() + 1);
wstring result = charBuf;
delete charBuf;
if(err == 0)
return result;
else
return s;
}