mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
This commit is contained in:
parent
bfdb48d4bc
commit
6264cdcc2b
36 changed files with 150 additions and 145 deletions
|
|
@ -135,7 +135,7 @@ public:
|
||||||
|
|
||||||
ASIOAudioIODevice (const String& name_, CLSID classId_)
|
ASIOAudioIODevice (const String& name_, CLSID classId_)
|
||||||
: AudioIODevice (name_, T("ASIO")),
|
: AudioIODevice (name_, T("ASIO")),
|
||||||
Thread (T("Juce ASIO")),
|
Thread ("Juce ASIO"),
|
||||||
classId (classId_),
|
classId (classId_),
|
||||||
currentBitDepth (16),
|
currentBitDepth (16),
|
||||||
currentSampleRate (0),
|
currentSampleRate (0),
|
||||||
|
|
|
||||||
|
|
@ -153,60 +153,60 @@ BEGIN_JUCE_NAMESPACE
|
||||||
|
|
||||||
static const String getDSErrorMessage (HRESULT hr)
|
static const String getDSErrorMessage (HRESULT hr)
|
||||||
{
|
{
|
||||||
const tchar* result = 0;
|
const char* result = 0;
|
||||||
|
|
||||||
switch (hr)
|
switch (hr)
|
||||||
{
|
{
|
||||||
case MAKE_HRESULT(1, 0x878, 10):
|
case MAKE_HRESULT(1, 0x878, 10):
|
||||||
result = T("Device already allocated");
|
result = "Device already allocated";
|
||||||
break;
|
break;
|
||||||
case MAKE_HRESULT(1, 0x878, 30):
|
case MAKE_HRESULT(1, 0x878, 30):
|
||||||
result = T("Control unavailable");
|
result = "Control unavailable";
|
||||||
break;
|
break;
|
||||||
case E_INVALIDARG:
|
case E_INVALIDARG:
|
||||||
result = T("Invalid parameter");
|
result = "Invalid parameter";
|
||||||
break;
|
break;
|
||||||
case MAKE_HRESULT(1, 0x878, 50):
|
case MAKE_HRESULT(1, 0x878, 50):
|
||||||
result = T("Invalid call");
|
result = "Invalid call";
|
||||||
break;
|
break;
|
||||||
case E_FAIL:
|
case E_FAIL:
|
||||||
result = T("Generic error");
|
result = "Generic error";
|
||||||
break;
|
break;
|
||||||
case MAKE_HRESULT(1, 0x878, 70):
|
case MAKE_HRESULT(1, 0x878, 70):
|
||||||
result = T("Priority level error");
|
result = "Priority level error";
|
||||||
break;
|
break;
|
||||||
case E_OUTOFMEMORY:
|
case E_OUTOFMEMORY:
|
||||||
result = T("Out of memory");
|
result = "Out of memory";
|
||||||
break;
|
break;
|
||||||
case MAKE_HRESULT(1, 0x878, 100):
|
case MAKE_HRESULT(1, 0x878, 100):
|
||||||
result = T("Bad format");
|
result = "Bad format";
|
||||||
break;
|
break;
|
||||||
case E_NOTIMPL:
|
case E_NOTIMPL:
|
||||||
result = T("Unsupported function");
|
result = "Unsupported function";
|
||||||
break;
|
break;
|
||||||
case MAKE_HRESULT(1, 0x878, 120):
|
case MAKE_HRESULT(1, 0x878, 120):
|
||||||
result = T("No driver");
|
result = "No driver";
|
||||||
break;
|
break;
|
||||||
case MAKE_HRESULT(1, 0x878, 130):
|
case MAKE_HRESULT(1, 0x878, 130):
|
||||||
result = T("Already initialised");
|
result = "Already initialised";
|
||||||
break;
|
break;
|
||||||
case CLASS_E_NOAGGREGATION:
|
case CLASS_E_NOAGGREGATION:
|
||||||
result = T("No aggregation");
|
result = "No aggregation";
|
||||||
break;
|
break;
|
||||||
case MAKE_HRESULT(1, 0x878, 150):
|
case MAKE_HRESULT(1, 0x878, 150):
|
||||||
result = T("Buffer lost");
|
result = "Buffer lost";
|
||||||
break;
|
break;
|
||||||
case MAKE_HRESULT(1, 0x878, 160):
|
case MAKE_HRESULT(1, 0x878, 160):
|
||||||
result = T("Another app has priority");
|
result = "Another app has priority";
|
||||||
break;
|
break;
|
||||||
case MAKE_HRESULT(1, 0x878, 170):
|
case MAKE_HRESULT(1, 0x878, 170):
|
||||||
result = T("Uninitialised");
|
result = "Uninitialised";
|
||||||
break;
|
break;
|
||||||
case E_NOINTERFACE:
|
case E_NOINTERFACE:
|
||||||
result = T("No interface");
|
result = "No interface";
|
||||||
break;
|
break;
|
||||||
case S_OK:
|
case S_OK:
|
||||||
result = T("No error");
|
result = "No error";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
@ -982,7 +982,7 @@ public:
|
||||||
const int index,
|
const int index,
|
||||||
const int inputIndex_)
|
const int inputIndex_)
|
||||||
: AudioIODevice (deviceName, T("DirectSound")),
|
: AudioIODevice (deviceName, T("DirectSound")),
|
||||||
Thread (T("Juce DSound")),
|
Thread ("Juce DSound"),
|
||||||
isOpen_ (false),
|
isOpen_ (false),
|
||||||
isStarted (false),
|
isStarted (false),
|
||||||
deviceIndex (index),
|
deviceIndex (index),
|
||||||
|
|
|
||||||
|
|
@ -211,9 +211,9 @@ void Font::getDefaultFontNames (String& defaultSans,
|
||||||
String& defaultSerif,
|
String& defaultSerif,
|
||||||
String& defaultFixed)
|
String& defaultFixed)
|
||||||
{
|
{
|
||||||
defaultSans = T("Verdana");
|
defaultSans = "Verdana";
|
||||||
defaultSerif = T("Times");
|
defaultSerif = "Times";
|
||||||
defaultFixed = T("Lucida Console");
|
defaultFixed = "Lucida Console";
|
||||||
}
|
}
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
|
|
|
||||||
|
|
@ -208,7 +208,7 @@ static const String getMessageWindowClassName()
|
||||||
if (number == 0)
|
if (number == 0)
|
||||||
number = 0x7fffffff & (int) Time::getHighResolutionTicks();
|
number = 0x7fffffff & (int) Time::getHighResolutionTicks();
|
||||||
|
|
||||||
return T("JUCEWindowClass_") + String (number);
|
return T("JUCEcs_") + String (number);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MessageManager::doPlatformSpecificInitialisation()
|
void MessageManager::doPlatformSpecificInitialisation()
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ public:
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
MidiInThread (MidiInput* const input_,
|
MidiInThread (MidiInput* const input_,
|
||||||
MidiInputCallback* const callback_)
|
MidiInputCallback* const callback_)
|
||||||
: Thread (T("Juce Midi")),
|
: Thread ("Juce Midi"),
|
||||||
hIn (0),
|
hIn (0),
|
||||||
input (input_),
|
input (input_),
|
||||||
callback (callback_),
|
callback (callback_),
|
||||||
|
|
|
||||||
|
|
@ -226,7 +226,7 @@ static int getMACAddressViaGetAdaptersInfo (int64* addresses, int maxNum)
|
||||||
{
|
{
|
||||||
int numFound = 0;
|
int numFound = 0;
|
||||||
|
|
||||||
DynamicLibraryLoader dll (T("iphlpapi.dll"));
|
DynamicLibraryLoader dll ("iphlpapi.dll");
|
||||||
DynamicLibraryImport (GetAdaptersInfo, getAdaptersInfo, DWORD, dll, (PIP_ADAPTER_INFO, PULONG))
|
DynamicLibraryImport (GetAdaptersInfo, getAdaptersInfo, DWORD, dll, (PIP_ADAPTER_INFO, PULONG))
|
||||||
|
|
||||||
if (getAdaptersInfo != 0)
|
if (getAdaptersInfo != 0)
|
||||||
|
|
@ -266,7 +266,7 @@ static int getMACAddressesViaNetBios (int64* addresses, int maxNum)
|
||||||
{
|
{
|
||||||
int numFound = 0;
|
int numFound = 0;
|
||||||
|
|
||||||
DynamicLibraryLoader dll (T("netapi32.dll"));
|
DynamicLibraryLoader dll ("netapi32.dll");
|
||||||
DynamicLibraryImport (Netbios, NetbiosCall, UCHAR, dll, (PNCB))
|
DynamicLibraryImport (Netbios, NetbiosCall, UCHAR, dll, (PNCB))
|
||||||
|
|
||||||
if (NetbiosCall != 0)
|
if (NetbiosCall != 0)
|
||||||
|
|
|
||||||
|
|
@ -993,7 +993,7 @@ private:
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
JUCE_CALLTYPE WindowClassHolder()
|
JUCE_CALLTYPE WindowClassHolder()
|
||||||
: windowClassName (T("JUCE_"))
|
: windowClassName ("JUCE_")
|
||||||
{
|
{
|
||||||
// this name has to be different for each app/dll instance because otherwise
|
// this name has to be different for each app/dll instance because otherwise
|
||||||
// poor old Win32 can get a bit confused (even despite it not being a process-global
|
// poor old Win32 can get a bit confused (even despite it not being a process-global
|
||||||
|
|
|
||||||
|
|
@ -138,7 +138,7 @@ public:
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
glOrtho (0.0, getWidth(), 0.0, getHeight(), 0, 1);
|
glOrtho (0.0, getWidth(), 0.0, getHeight(), 0, 1);
|
||||||
|
|
||||||
glColor4f (1.0f, 1.0f, 1.0f, fabsf (sinf (rotation / 100.0f)));
|
glColor4f (1.0f, 1.0f, 1.0f, fabsf (::sinf (rotation / 100.0f)));
|
||||||
glBegin(GL_QUADS);
|
glBegin(GL_QUADS);
|
||||||
glTexCoord2i (0, 0); glVertex2f (50.0f, getHeight() - 50.0f);
|
glTexCoord2i (0, 0); glVertex2f (50.0f, getHeight() - 50.0f);
|
||||||
glTexCoord2i (1, 0); glVertex2f (getWidth() - 50.0f, getHeight() - 50.0f);
|
glTexCoord2i (1, 0); glVertex2f (getWidth() - 50.0f, getHeight() - 50.0f);
|
||||||
|
|
|
||||||
|
|
@ -134,9 +134,9 @@ void JUCEApplication::getCommandInfo (const CommandID commandID, ApplicationComm
|
||||||
{
|
{
|
||||||
if (commandID == StandardApplicationCommandIDs::quit)
|
if (commandID == StandardApplicationCommandIDs::quit)
|
||||||
{
|
{
|
||||||
result.setInfo (T("Quit"),
|
result.setInfo ("Quit",
|
||||||
T("Quits the application"),
|
"Quits the application",
|
||||||
T("Application"),
|
"Application",
|
||||||
0);
|
0);
|
||||||
|
|
||||||
result.defaultKeypresses.add (KeyPress (T('q'), ModifierKeys::commandModifier, 0));
|
result.defaultKeypresses.add (KeyPress (T('q'), ModifierKeys::commandModifier, 0));
|
||||||
|
|
@ -199,7 +199,7 @@ int JUCEApplication::main (String& commandLine, JUCEApplication* const app)
|
||||||
|
|
||||||
JUCE_TRY
|
JUCE_TRY
|
||||||
{
|
{
|
||||||
juce_setCurrentThreadName (T("Juce Message Thread"));
|
juce_setCurrentThreadName ("Juce Message Thread");
|
||||||
|
|
||||||
// let the app do its setting-up..
|
// let the app do its setting-up..
|
||||||
app->initialise (commandLine.trim());
|
app->initialise (commandLine.trim());
|
||||||
|
|
|
||||||
|
|
@ -415,9 +415,9 @@ bool OggVorbisAudioFormat::isCompressed()
|
||||||
const StringArray OggVorbisAudioFormat::getQualityOptions()
|
const StringArray OggVorbisAudioFormat::getQualityOptions()
|
||||||
{
|
{
|
||||||
StringArray s;
|
StringArray s;
|
||||||
s.add (T("Low Quality"));
|
s.add ("Low Quality");
|
||||||
s.add (T("Medium Quality"));
|
s.add ("Medium Quality");
|
||||||
s.add (T("High Quality"));
|
s.add ("High Quality");
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -974,13 +974,13 @@ const String MidiMessage::getMidiNoteName (int note,
|
||||||
bool includeOctaveNumber,
|
bool includeOctaveNumber,
|
||||||
int octaveNumForMiddleC) throw()
|
int octaveNumForMiddleC) throw()
|
||||||
{
|
{
|
||||||
static const tchar* sharpNoteNames[] = { T("C"), T("C#"), T("D"), T("D#"), T("E"),
|
static const char* const sharpNoteNames[] = { "C", "C#", "D", "D#", "E",
|
||||||
T("F"), T("F#"), T("G"), T("G#"), T("A"),
|
"F", "F#", "G", "G#", "A",
|
||||||
T("A#"), T("B") };
|
"A#", "B" };
|
||||||
|
|
||||||
static const tchar* flatNoteNames[] = { T("C"), T("Db"), T("D"), T("Eb"), T("E"),
|
static const char* const flatNoteNames[] = { "C", "Db", "D", "Eb", "E",
|
||||||
T("F"), T("Gb"), T("G"), T("Ab"), T("A"),
|
"F", "Gb", "G", "Ab", "A",
|
||||||
T("Bb"), T("B") };
|
"Bb", "B" };
|
||||||
|
|
||||||
if (note >= 0 && note < 128)
|
if (note >= 0 && note < 128)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ bool FileBasedDocument::loadFrom (const File& newFile,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
error = T("The file doesn't exist");
|
error = "The file doesn't exist";
|
||||||
}
|
}
|
||||||
|
|
||||||
documentFile = oldFile;
|
documentFile = oldFile;
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ BEGIN_JUCE_NAMESPACE
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
InterprocessConnection::InterprocessConnection (const bool callbacksOnMessageThread,
|
InterprocessConnection::InterprocessConnection (const bool callbacksOnMessageThread,
|
||||||
const uint32 magicMessageHeaderNumber)
|
const uint32 magicMessageHeaderNumber)
|
||||||
: Thread (T("Juce IPC connection")),
|
: Thread ("Juce IPC connection"),
|
||||||
socket (0),
|
socket (0),
|
||||||
pipe (0),
|
pipe (0),
|
||||||
callbackConnectionState (false),
|
callbackConnectionState (false),
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ BEGIN_JUCE_NAMESPACE
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
InterprocessConnectionServer::InterprocessConnectionServer()
|
InterprocessConnectionServer::InterprocessConnectionServer()
|
||||||
: Thread (T("Juce IPC server")),
|
: Thread ("Juce IPC server"),
|
||||||
socket (0)
|
socket (0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,7 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
InternalTimerThread()
|
InternalTimerThread()
|
||||||
: Thread (T("Juce Timer")),
|
: Thread ("Juce Timer"),
|
||||||
firstTimer (0),
|
firstTimer (0),
|
||||||
callbackNeeded (false)
|
callbackNeeded (false)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -106,9 +106,9 @@ const String Button::getTooltip()
|
||||||
String key (keyPresses.getUnchecked(i).getTextDescription());
|
String key (keyPresses.getUnchecked(i).getTextDescription());
|
||||||
|
|
||||||
if (key.length() == 1)
|
if (key.length() == 1)
|
||||||
tt << T(" [shortcut: '") << key << T("']");
|
tt << " [shortcut: '" << key << "']";
|
||||||
else
|
else
|
||||||
tt << T(" [") << key << T(']');
|
tt << " [" << key << ']';
|
||||||
}
|
}
|
||||||
|
|
||||||
return tt;
|
return tt;
|
||||||
|
|
|
||||||
|
|
@ -450,7 +450,7 @@ const BitArray FileBrowserComponent::getRoots (StringArray& rootNames, StringArr
|
||||||
if (volume.isEmpty())
|
if (volume.isEmpty())
|
||||||
volume = TRANS("Hard Drive");
|
volume = TRANS("Hard Drive");
|
||||||
|
|
||||||
name << T(" [") << drive->getVolumeLabel() << T(']');
|
name << " [" << drive->getVolumeLabel() << ']';
|
||||||
}
|
}
|
||||||
else if (drive->isOnCDRomDrive())
|
else if (drive->isOnCDRomDrive())
|
||||||
{
|
{
|
||||||
|
|
@ -463,18 +463,18 @@ const BitArray FileBrowserComponent::getRoots (StringArray& rootNames, StringArr
|
||||||
separators.setBit (rootPaths.size());
|
separators.setBit (rootPaths.size());
|
||||||
|
|
||||||
rootPaths.add (File::getSpecialLocation (File::userDocumentsDirectory).getFullPathName());
|
rootPaths.add (File::getSpecialLocation (File::userDocumentsDirectory).getFullPathName());
|
||||||
rootNames.add (T("Documents"));
|
rootNames.add ("Documents");
|
||||||
rootPaths.add (File::getSpecialLocation (File::userDesktopDirectory).getFullPathName());
|
rootPaths.add (File::getSpecialLocation (File::userDesktopDirectory).getFullPathName());
|
||||||
rootNames.add (T("Desktop"));
|
rootNames.add ("Desktop");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef JUCE_MAC
|
#ifdef JUCE_MAC
|
||||||
rootPaths.add (File::getSpecialLocation (File::userHomeDirectory).getFullPathName());
|
rootPaths.add (File::getSpecialLocation (File::userHomeDirectory).getFullPathName());
|
||||||
rootNames.add (T("Home folder"));
|
rootNames.add ("Home folder");
|
||||||
rootPaths.add (File::getSpecialLocation (File::userDocumentsDirectory).getFullPathName());
|
rootPaths.add (File::getSpecialLocation (File::userDocumentsDirectory).getFullPathName());
|
||||||
rootNames.add (T("Documents"));
|
rootNames.add ("Documents");
|
||||||
rootPaths.add (File::getSpecialLocation (File::userDesktopDirectory).getFullPathName());
|
rootPaths.add (File::getSpecialLocation (File::userDesktopDirectory).getFullPathName());
|
||||||
rootNames.add (T("Desktop"));
|
rootNames.add ("Desktop");
|
||||||
|
|
||||||
separators.setBit (rootPaths.size());
|
separators.setBit (rootPaths.size());
|
||||||
|
|
||||||
|
|
@ -495,12 +495,12 @@ const BitArray FileBrowserComponent::getRoots (StringArray& rootNames, StringArr
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef JUCE_LINUX
|
#ifdef JUCE_LINUX
|
||||||
rootPaths.add (T("/"));
|
rootPaths.add ("/");
|
||||||
rootNames.add (T("/"));
|
rootNames.add ("/");
|
||||||
rootPaths.add (File::getSpecialLocation (File::userHomeDirectory).getFullPathName());
|
rootPaths.add (File::getSpecialLocation (File::userHomeDirectory).getFullPathName());
|
||||||
rootNames.add (T("Home folder"));
|
rootNames.add ("Home folder");
|
||||||
rootPaths.add (File::getSpecialLocation (File::userDesktopDirectory).getFullPathName());
|
rootPaths.add (File::getSpecialLocation (File::userDesktopDirectory).getFullPathName());
|
||||||
rootNames.add (T("Desktop"));
|
rootNames.add ("Desktop");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return separators;
|
return separators;
|
||||||
|
|
|
||||||
|
|
@ -96,9 +96,9 @@ void ImagePreviewComponent::timerCallback()
|
||||||
int h = currentThumbnail->getHeight();
|
int h = currentThumbnail->getHeight();
|
||||||
|
|
||||||
currentDetails
|
currentDetails
|
||||||
<< fileToLoad.getFileName() << T("\n")
|
<< fileToLoad.getFileName() << "\n"
|
||||||
<< format->getFormatName() << T("\n")
|
<< format->getFormatName() << "\n"
|
||||||
<< w << T(" x ") << h << T(" pixels\n")
|
<< w << " x " << h << " pixels\n"
|
||||||
<< File::descriptionOfSizeInBytes (fileToLoad.getSize());
|
<< File::descriptionOfSizeInBytes (fileToLoad.getSize());
|
||||||
|
|
||||||
getThumbSize (w, h);
|
getThumbSize (w, h);
|
||||||
|
|
|
||||||
|
|
@ -229,22 +229,22 @@ const String KeyPress::getTextDescription() const
|
||||||
if (keyCode > 0)
|
if (keyCode > 0)
|
||||||
{
|
{
|
||||||
if (mods.isCtrlDown())
|
if (mods.isCtrlDown())
|
||||||
desc += T("ctrl + ");
|
desc << "ctrl + ";
|
||||||
|
|
||||||
if (mods.isShiftDown())
|
if (mods.isShiftDown())
|
||||||
desc += T("shift + ");
|
desc << "shift + ";
|
||||||
|
|
||||||
#ifdef JUCE_MAC
|
#ifdef JUCE_MAC
|
||||||
// only do this on the mac, because on Windows ctrl and command are the same,
|
// only do this on the mac, because on Windows ctrl and command are the same,
|
||||||
// and this would get confusing
|
// and this would get confusing
|
||||||
if (mods.isCommandDown())
|
if (mods.isCommandDown())
|
||||||
desc += T("command + ");
|
desc << "command + ";
|
||||||
|
|
||||||
if (mods.isAltDown())
|
if (mods.isAltDown())
|
||||||
desc += T("option + ");
|
desc << "option + ";
|
||||||
#else
|
#else
|
||||||
if (mods.isAltDown())
|
if (mods.isAltDown())
|
||||||
desc += T("alt + ");
|
desc << "alt + ";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (int i = 0; i < numElementsInArray (keyNameTranslations); ++i)
|
for (int i = 0; i < numElementsInArray (keyNameTranslations); ++i)
|
||||||
|
|
@ -252,13 +252,13 @@ const String KeyPress::getTextDescription() const
|
||||||
return desc + keyNameTranslations[i].name;
|
return desc + keyNameTranslations[i].name;
|
||||||
|
|
||||||
if (keyCode >= F1Key && keyCode <= F16Key)
|
if (keyCode >= F1Key && keyCode <= F16Key)
|
||||||
desc << T("F") << (1 + keyCode - F1Key);
|
desc << 'F' << (1 + keyCode - F1Key);
|
||||||
else if (keyCode >= numberPad0 && keyCode <= numberPad9)
|
else if (keyCode >= numberPad0 && keyCode <= numberPad9)
|
||||||
desc << numberPadPrefix << (keyCode - numberPad0);
|
desc << numberPadPrefix << (keyCode - numberPad0);
|
||||||
else if (keyCode >= 33 && keyCode < 176)
|
else if (keyCode >= 33 && keyCode < 176)
|
||||||
desc += CharacterFunctions::toUpperCase ((tchar) keyCode);
|
desc += CharacterFunctions::toUpperCase ((tchar) keyCode);
|
||||||
else
|
else
|
||||||
desc << T('#') << String::toHexString (keyCode);
|
desc << '#' << String::toHexString (keyCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
return desc;
|
return desc;
|
||||||
|
|
|
||||||
|
|
@ -1346,7 +1346,7 @@ Button* LookAndFeel::createDocumentWindowButton (int buttonType)
|
||||||
shape.addLineSegment (0.0f, 0.0f, 1.0f, 1.0f, 0.35f);
|
shape.addLineSegment (0.0f, 0.0f, 1.0f, 1.0f, 0.35f);
|
||||||
shape.addLineSegment (1.0f, 0.0f, 0.0f, 1.0f, 0.35f);
|
shape.addLineSegment (1.0f, 0.0f, 0.0f, 1.0f, 0.35f);
|
||||||
|
|
||||||
ShapeButton* const b = new ShapeButton (T("close"),
|
ShapeButton* const b = new ShapeButton ("close",
|
||||||
Colour (0x7fff3333),
|
Colour (0x7fff3333),
|
||||||
Colour (0xd7ff3333),
|
Colour (0xd7ff3333),
|
||||||
Colour (0xf7ff3333));
|
Colour (0xf7ff3333));
|
||||||
|
|
@ -1358,7 +1358,7 @@ Button* LookAndFeel::createDocumentWindowButton (int buttonType)
|
||||||
{
|
{
|
||||||
shape.addLineSegment (0.0f, 0.5f, 1.0f, 0.5f, 0.25f);
|
shape.addLineSegment (0.0f, 0.5f, 1.0f, 0.5f, 0.25f);
|
||||||
|
|
||||||
DrawableButton* b = new DrawableButton (T("minimise"), DrawableButton::ImageFitted);
|
DrawableButton* b = new DrawableButton ("minimise", DrawableButton::ImageFitted);
|
||||||
DrawablePath dp;
|
DrawablePath dp;
|
||||||
dp.setPath (shape);
|
dp.setPath (shape);
|
||||||
dp.setSolidFill (Colours::black.withAlpha (0.3f));
|
dp.setSolidFill (Colours::black.withAlpha (0.3f));
|
||||||
|
|
@ -1370,7 +1370,7 @@ Button* LookAndFeel::createDocumentWindowButton (int buttonType)
|
||||||
shape.addLineSegment (0.5f, 0.0f, 0.5f, 1.0f, 0.25f);
|
shape.addLineSegment (0.5f, 0.0f, 0.5f, 1.0f, 0.25f);
|
||||||
shape.addLineSegment (0.0f, 0.5f, 1.0f, 0.5f, 0.25f);
|
shape.addLineSegment (0.0f, 0.5f, 1.0f, 0.5f, 0.25f);
|
||||||
|
|
||||||
DrawableButton* b = new DrawableButton (T("maximise"), DrawableButton::ImageFitted);
|
DrawableButton* b = new DrawableButton ("maximise", DrawableButton::ImageFitted);
|
||||||
DrawablePath dp;
|
DrawablePath dp;
|
||||||
dp.setPath (shape);
|
dp.setPath (shape);
|
||||||
dp.setSolidFill (Colours::black.withAlpha (0.3f));
|
dp.setSolidFill (Colours::black.withAlpha (0.3f));
|
||||||
|
|
|
||||||
|
|
@ -553,7 +553,7 @@ void ShinyLookAndFeel::drawLinearSlider (Graphics& g,
|
||||||
|
|
||||||
Button* ShinyLookAndFeel::createSliderButton (const bool isIncrement)
|
Button* ShinyLookAndFeel::createSliderButton (const bool isIncrement)
|
||||||
{
|
{
|
||||||
return new TextButton (isIncrement ? T("+") : T("-"), String::empty);
|
return new TextButton (isIncrement ? "+" : "-", String::empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageEffectFilter* ShinyLookAndFeel::getSliderEffect()
|
ImageEffectFilter* ShinyLookAndFeel::getSliderEffect()
|
||||||
|
|
@ -735,13 +735,13 @@ Button* ShinyLookAndFeel::createDocumentWindowButton (int buttonType)
|
||||||
shape.addLineSegment (0.0f, 0.0f, 1.0f, 1.0f, crossThickness * 1.4f);
|
shape.addLineSegment (0.0f, 0.0f, 1.0f, 1.0f, crossThickness * 1.4f);
|
||||||
shape.addLineSegment (1.0f, 0.0f, 0.0f, 1.0f, crossThickness * 1.4f);
|
shape.addLineSegment (1.0f, 0.0f, 0.0f, 1.0f, crossThickness * 1.4f);
|
||||||
|
|
||||||
return new GlassWindowButton (T("close"), Colour (0xffdd1100), shape, shape);
|
return new GlassWindowButton ("close", Colour (0xffdd1100), shape, shape);
|
||||||
}
|
}
|
||||||
else if (buttonType == DocumentWindow::minimiseButton)
|
else if (buttonType == DocumentWindow::minimiseButton)
|
||||||
{
|
{
|
||||||
shape.addLineSegment (0.0f, 0.5f, 1.0f, 0.5f, crossThickness);
|
shape.addLineSegment (0.0f, 0.5f, 1.0f, 0.5f, crossThickness);
|
||||||
|
|
||||||
return new GlassWindowButton (T("minimise"), Colour (0xffaa8811), shape, shape);
|
return new GlassWindowButton ("minimise", Colour (0xffaa8811), shape, shape);
|
||||||
}
|
}
|
||||||
else if (buttonType == DocumentWindow::maximiseButton)
|
else if (buttonType == DocumentWindow::maximiseButton)
|
||||||
{
|
{
|
||||||
|
|
@ -757,7 +757,7 @@ Button* ShinyLookAndFeel::createDocumentWindowButton (int buttonType)
|
||||||
fullscreenShape.addRectangle (45.0f, 45.0f, 100.0f, 100.0f);
|
fullscreenShape.addRectangle (45.0f, 45.0f, 100.0f, 100.0f);
|
||||||
PathStrokeType (30.0f).createStrokedPath (fullscreenShape, fullscreenShape);
|
PathStrokeType (30.0f).createStrokedPath (fullscreenShape, fullscreenShape);
|
||||||
|
|
||||||
return new GlassWindowButton (T("maximise"), Colour (0xff119911), shape, fullscreenShape);
|
return new GlassWindowButton ("maximise", Colour (0xff119911), shape, fullscreenShape);
|
||||||
}
|
}
|
||||||
|
|
||||||
jassertfalse
|
jassertfalse
|
||||||
|
|
|
||||||
|
|
@ -115,10 +115,10 @@ public:
|
||||||
const String key (keyPresses.getUnchecked(i).getTextDescription());
|
const String key (keyPresses.getUnchecked(i).getTextDescription());
|
||||||
|
|
||||||
if (shortcutKey.isNotEmpty())
|
if (shortcutKey.isNotEmpty())
|
||||||
shortcutKey << T(", ");
|
shortcutKey << ", ";
|
||||||
|
|
||||||
if (key.length() == 1)
|
if (key.length() == 1)
|
||||||
shortcutKey << T("shortcut: '") << key << T("'");
|
shortcutKey << "shortcut: '" << key << '\'';
|
||||||
else
|
else
|
||||||
shortcutKey << key;
|
shortcutKey << key;
|
||||||
}
|
}
|
||||||
|
|
@ -126,7 +126,7 @@ public:
|
||||||
shortcutKey = shortcutKey.trim();
|
shortcutKey = shortcutKey.trim();
|
||||||
|
|
||||||
if (shortcutKey.isNotEmpty())
|
if (shortcutKey.isNotEmpty())
|
||||||
text << T("<end>") << shortcutKey;
|
text << "<end>" << shortcutKey;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -277,7 +277,7 @@ AudioDeviceSelectorComponent::AudioDeviceSelectorComponent (AudioDeviceManager&
|
||||||
jassert (minOutputChannels >= 0 && minOutputChannels <= maxOutputChannels);
|
jassert (minOutputChannels >= 0 && minOutputChannels <= maxOutputChannels);
|
||||||
jassert (minInputChannels >= 0 && minInputChannels <= maxInputChannels);
|
jassert (minInputChannels >= 0 && minInputChannels <= maxInputChannels);
|
||||||
|
|
||||||
audioDeviceDropDown = new ComboBox (T("device"));
|
audioDeviceDropDown = new ComboBox ("device");
|
||||||
deviceManager_.addDeviceNamesToComboBox (*audioDeviceDropDown);
|
deviceManager_.addDeviceNamesToComboBox (*audioDeviceDropDown);
|
||||||
audioDeviceDropDown->setSelectedId (-1, true);
|
audioDeviceDropDown->setSelectedId (-1, true);
|
||||||
|
|
||||||
|
|
@ -287,7 +287,7 @@ AudioDeviceSelectorComponent::AudioDeviceSelectorComponent (AudioDeviceManager&
|
||||||
audioDeviceDropDown->addListener (this);
|
audioDeviceDropDown->addListener (this);
|
||||||
addAndMakeVisible (audioDeviceDropDown);
|
addAndMakeVisible (audioDeviceDropDown);
|
||||||
|
|
||||||
Label* label = new Label (T("l1"), TRANS ("audio device:"));
|
Label* label = new Label ("l1", TRANS ("audio device:"));
|
||||||
label->attachToComponent (audioDeviceDropDown, true);
|
label->attachToComponent (audioDeviceDropDown, true);
|
||||||
|
|
||||||
if (showMidiOptions)
|
if (showMidiOptions)
|
||||||
|
|
@ -298,7 +298,7 @@ AudioDeviceSelectorComponent::AudioDeviceSelectorComponent (AudioDeviceManager&
|
||||||
TRANS("(no midi inputs available)"),
|
TRANS("(no midi inputs available)"),
|
||||||
0, 0));
|
0, 0));
|
||||||
|
|
||||||
midiInputsLabel = new Label (T("lm"), TRANS ("active midi inputs:"));
|
midiInputsLabel = new Label ("lm", TRANS ("active midi inputs:"));
|
||||||
midiInputsLabel->setJustificationType (Justification::topRight);
|
midiInputsLabel->setJustificationType (Justification::topRight);
|
||||||
midiInputsLabel->attachToComponent (midiInputsList, true);
|
midiInputsLabel->attachToComponent (midiInputsList, true);
|
||||||
}
|
}
|
||||||
|
|
@ -458,8 +458,8 @@ void AudioDeviceSelectorComponent::changeListenerCallback (void*)
|
||||||
if (currentDevice != 0)
|
if (currentDevice != 0)
|
||||||
{
|
{
|
||||||
// sample rate
|
// sample rate
|
||||||
addAndMakeVisible (sampleRateDropDown = new ComboBox (T("samplerate")));
|
addAndMakeVisible (sampleRateDropDown = new ComboBox ("samplerate"));
|
||||||
sampleRateLabel = new Label (T("l2"), TRANS ("sample rate:"));
|
sampleRateLabel = new Label ("l2", TRANS ("sample rate:"));
|
||||||
sampleRateLabel->attachToComponent (sampleRateDropDown, true);
|
sampleRateLabel->attachToComponent (sampleRateDropDown, true);
|
||||||
|
|
||||||
const int numRates = currentDevice->getNumSampleRates();
|
const int numRates = currentDevice->getNumSampleRates();
|
||||||
|
|
@ -476,8 +476,8 @@ void AudioDeviceSelectorComponent::changeListenerCallback (void*)
|
||||||
sampleRateDropDown->addListener (this);
|
sampleRateDropDown->addListener (this);
|
||||||
|
|
||||||
// buffer size
|
// buffer size
|
||||||
addAndMakeVisible (bufferSizeDropDown = new ComboBox (T("buffersize")));
|
addAndMakeVisible (bufferSizeDropDown = new ComboBox ("buffersize"));
|
||||||
bufferSizeLabel = new Label (T("l2"), TRANS ("audio buffer size:"));
|
bufferSizeLabel = new Label ("l2", TRANS ("audio buffer size:"));
|
||||||
bufferSizeLabel->attachToComponent (bufferSizeDropDown, true);
|
bufferSizeLabel->attachToComponent (bufferSizeDropDown, true);
|
||||||
|
|
||||||
const int numBufferSizes = currentDevice->getNumBufferSizesAvailable();
|
const int numBufferSizes = currentDevice->getNumBufferSizesAvailable();
|
||||||
|
|
@ -509,10 +509,10 @@ void AudioDeviceSelectorComponent::changeListenerCallback (void*)
|
||||||
addAndMakeVisible (outputChansBox
|
addAndMakeVisible (outputChansBox
|
||||||
= new AudioDeviceSelectorComponentListBox (deviceManager,
|
= new AudioDeviceSelectorComponentListBox (deviceManager,
|
||||||
AudioDeviceSelectorComponentListBox::audioOutputType,
|
AudioDeviceSelectorComponentListBox::audioOutputType,
|
||||||
TRANS("(no audio output channels found)"),
|
TRANS ("(no audio output channels found)"),
|
||||||
minOutputChannels, maxOutputChannels));
|
minOutputChannels, maxOutputChannels));
|
||||||
|
|
||||||
outputsLabel = new Label (T("l3"), TRANS ("active output channels:"));
|
outputsLabel = new Label ("l3", TRANS ("active output channels:"));
|
||||||
outputsLabel->attachToComponent (outputChansBox, true);
|
outputsLabel->attachToComponent (outputChansBox, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -522,10 +522,10 @@ void AudioDeviceSelectorComponent::changeListenerCallback (void*)
|
||||||
addAndMakeVisible (inputChansBox
|
addAndMakeVisible (inputChansBox
|
||||||
= new AudioDeviceSelectorComponentListBox (deviceManager,
|
= new AudioDeviceSelectorComponentListBox (deviceManager,
|
||||||
AudioDeviceSelectorComponentListBox::audioInputType,
|
AudioDeviceSelectorComponentListBox::audioInputType,
|
||||||
TRANS("(no audio input channels found)"),
|
TRANS ("(no audio input channels found)"),
|
||||||
minInputChannels, maxInputChannels));
|
minInputChannels, maxInputChannels));
|
||||||
|
|
||||||
inputsLabel = new Label (T("l4"), TRANS("active input channels:"));
|
inputsLabel = new Label ("l4", TRANS ("active input channels:"));
|
||||||
inputsLabel->attachToComponent (inputChansBox, true);
|
inputsLabel->attachToComponent (inputChansBox, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ ThreadWithProgressWindow::ThreadWithProgressWindow (const String& title,
|
||||||
const bool hasProgressBar,
|
const bool hasProgressBar,
|
||||||
const bool hasCancelButton,
|
const bool hasCancelButton,
|
||||||
const int timeOutMsWhenCancelling_)
|
const int timeOutMsWhenCancelling_)
|
||||||
: Thread (T("Juce Progress Window")),
|
: Thread ("Juce Progress Window"),
|
||||||
progress (0.0),
|
progress (0.0),
|
||||||
alertWindow (title, String::empty, AlertWindow::NoIcon),
|
alertWindow (title, String::empty, AlertWindow::NoIcon),
|
||||||
timeOutMsWhenCancelling (timeOutMsWhenCancelling_)
|
timeOutMsWhenCancelling (timeOutMsWhenCancelling_)
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ BEGIN_JUCE_NAMESPACE
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
TooltipWindow::TooltipWindow (Component* const parentComponent,
|
TooltipWindow::TooltipWindow (Component* const parentComponent,
|
||||||
const int millisecondsBeforeTipAppears_)
|
const int millisecondsBeforeTipAppears_)
|
||||||
: Component (T("tooltip")),
|
: Component ("tooltip"),
|
||||||
millisecondsBeforeTipAppears (millisecondsBeforeTipAppears_),
|
millisecondsBeforeTipAppears (millisecondsBeforeTipAppears_),
|
||||||
mouseX (0),
|
mouseX (0),
|
||||||
mouseY (0),
|
mouseY (0),
|
||||||
|
|
|
||||||
|
|
@ -58,11 +58,13 @@ FileLogger::FileLogger (const File& logFile_,
|
||||||
logStream = logFile_.createOutputStream (256);
|
logStream = logFile_.createOutputStream (256);
|
||||||
jassert (logStream != 0);
|
jassert (logStream != 0);
|
||||||
|
|
||||||
logMessage (T("\r\n**********************************************************\r\n")
|
String welcome;
|
||||||
+ welcomeMessage
|
welcome << "\r\n**********************************************************\r\n"
|
||||||
+ T("\r\nLog started: ")
|
<< welcomeMessage
|
||||||
+ Time::getCurrentTime().toString (true, true)
|
<< "\r\nLog started: " << Time::getCurrentTime().toString (true, true)
|
||||||
+ T("\r\n"));
|
<< "\r\n";
|
||||||
|
|
||||||
|
logMessage (welcome);
|
||||||
}
|
}
|
||||||
|
|
||||||
FileLogger::~FileLogger()
|
FileLogger::~FileLogger()
|
||||||
|
|
|
||||||
|
|
@ -69,8 +69,8 @@ void Logger::writeToLog (const String& message)
|
||||||
#if JUCE_LOG_ASSERTIONS
|
#if JUCE_LOG_ASSERTIONS
|
||||||
void juce_LogAssertion (const char* filename, const int lineNum) throw()
|
void juce_LogAssertion (const char* filename, const int lineNum) throw()
|
||||||
{
|
{
|
||||||
String m (T("JUCE Assertion failure in "));
|
String m ("JUCE Assertion failure in ");
|
||||||
m << filename << T(", line ") << lineNum;
|
m << filename << ", line " << lineNum;
|
||||||
|
|
||||||
Logger::writeToLog (m);
|
Logger::writeToLog (m);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ BEGIN_JUCE_NAMESPACE
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
const String SystemStats::getJUCEVersion() throw()
|
const String SystemStats::getJUCEVersion() throw()
|
||||||
{
|
{
|
||||||
return T("JUCE v") + String (JUCE_MAJOR_VERSION) + T(".") + String (JUCE_MINOR_VERSION);
|
return T("JUCE v") + String (JUCE_MAJOR_VERSION) + "." + String (JUCE_MINOR_VERSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -447,25 +447,25 @@ const String Time::getWeekdayName (const bool threeLetterVersion) const throw()
|
||||||
const String Time::getMonthName (int monthNumber,
|
const String Time::getMonthName (int monthNumber,
|
||||||
const bool threeLetterVersion) throw()
|
const bool threeLetterVersion) throw()
|
||||||
{
|
{
|
||||||
const tchar* const shortMonthNames[] = { T("Jan"), T("Feb"), T("Mar"), T("Apr"), T("May"), T("Jun"), T("Jul"), T("Aug"), T("Sep"), T("Oct"), T("Nov"), T("Dec") };
|
const char* const shortMonthNames[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
|
||||||
const tchar* const longMonthNames[] = { T("January"), T("February"), T("March"), T("April"), T("May"), T("June"), T("July"), T("August"), T("September"), T("October"), T("November"), T("December") };
|
const char* const longMonthNames[] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" };
|
||||||
|
|
||||||
monthNumber %= 12;
|
monthNumber %= 12;
|
||||||
|
|
||||||
return TRANS((threeLetterVersion) ? shortMonthNames [monthNumber]
|
return TRANS (threeLetterVersion ? shortMonthNames [monthNumber]
|
||||||
: longMonthNames [monthNumber]);
|
: longMonthNames [monthNumber]);
|
||||||
}
|
}
|
||||||
|
|
||||||
const String Time::getWeekdayName (int day,
|
const String Time::getWeekdayName (int day,
|
||||||
const bool threeLetterVersion) throw()
|
const bool threeLetterVersion) throw()
|
||||||
{
|
{
|
||||||
const tchar* const shortDayNames[] = { T("Sun"), T("Mon"), T("Tue"), T("Wed"), T("Thu"), T("Fri"), T("Sat") };
|
const char* const shortDayNames[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
|
||||||
const tchar* const longDayNames[] = { T("Sunday"), T("Monday"), T("Tuesday"), T("Wednesday"), T("Thursday"), T("Friday"), T("Saturday") };
|
const char* const longDayNames[] = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" };
|
||||||
|
|
||||||
day %= 7;
|
day %= 7;
|
||||||
|
|
||||||
return TRANS((threeLetterVersion) ? shortDayNames [day]
|
return TRANS (threeLetterVersion ? shortDayNames [day]
|
||||||
: longDayNames [day]);
|
: longDayNames [day]);
|
||||||
}
|
}
|
||||||
|
|
||||||
END_JUCE_NAMESPACE
|
END_JUCE_NAMESPACE
|
||||||
|
|
|
||||||
|
|
@ -514,23 +514,23 @@ const String JUCE_CALLTYPE File::descriptionOfSizeInBytes (const int64 bytes)
|
||||||
{
|
{
|
||||||
if (bytes == 1)
|
if (bytes == 1)
|
||||||
{
|
{
|
||||||
return T("1 byte");
|
return "1 byte";
|
||||||
}
|
}
|
||||||
else if (bytes < 1024)
|
else if (bytes < 1024)
|
||||||
{
|
{
|
||||||
return String ((int) bytes) + T(" bytes");
|
return String ((int) bytes) + " bytes";
|
||||||
}
|
}
|
||||||
else if (bytes < 1024 * 1024)
|
else if (bytes < 1024 * 1024)
|
||||||
{
|
{
|
||||||
return String (bytes / 1024.0, 1) + T(" KB");
|
return String (bytes / 1024.0, 1) + " KB";
|
||||||
}
|
}
|
||||||
else if (bytes < 1024 * 1024 * 1024)
|
else if (bytes < 1024 * 1024 * 1024)
|
||||||
{
|
{
|
||||||
return String (bytes / (1024.0 * 1024.0), 1) + T(" MB");
|
return String (bytes / (1024.0 * 1024.0), 1) + " MB";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return String (bytes / (1024.0 * 1024.0 * 1024.0), 1) + T(" GB");
|
return String (bytes / (1024.0 * 1024.0 * 1024.0), 1) + " GB";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -325,7 +325,7 @@ bool Socket::createListener (int newPortNumber)
|
||||||
if (connected)
|
if (connected)
|
||||||
close();
|
close();
|
||||||
|
|
||||||
hostName = T("listener");
|
hostName = "listener";
|
||||||
portNumber = newPortNumber;
|
portNumber = newPortNumber;
|
||||||
isListener = true;
|
isListener = true;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,9 +50,11 @@ PerformanceCounter::PerformanceCounter (const String& name_,
|
||||||
{
|
{
|
||||||
if (outputFile != File::nonexistent)
|
if (outputFile != File::nonexistent)
|
||||||
{
|
{
|
||||||
String s (T("**** Counter for \""));
|
String s ("**** Counter for \"");
|
||||||
s += name_ + T("\" started at: ");
|
s << name_ << "\" started at: "
|
||||||
s += Time::getCurrentTime().toString (true, true) + T("\r\n");
|
<< Time::getCurrentTime().toString (true, true)
|
||||||
|
<< "\r\n";
|
||||||
|
|
||||||
outputFile.appendText (s, false, false);
|
outputFile.appendText (s, false, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -81,22 +83,24 @@ void PerformanceCounter::printStatistics()
|
||||||
{
|
{
|
||||||
if (numRuns > 0)
|
if (numRuns > 0)
|
||||||
{
|
{
|
||||||
String s (T("Performance count for \""));
|
String s ("Performance count for \"");
|
||||||
s << name << T("\" - average over ") << numRuns << T(" run(s) = ");
|
s << name << "\" - average over " << numRuns << " run(s) = ";
|
||||||
|
|
||||||
const int micros = (int)(totalTime * (1000.0 / numRuns));
|
const int micros = (int) (totalTime * (1000.0 / numRuns));
|
||||||
|
|
||||||
if (micros > 10000)
|
if (micros > 10000)
|
||||||
s << (micros/1000) << T(" millisecs");
|
s << (micros/1000) << " millisecs";
|
||||||
else
|
else
|
||||||
s << micros << T(" microsecs");
|
s << micros << " microsecs";
|
||||||
|
|
||||||
s << (", total = ") << String (totalTime / 1000, 5) << T(" seconds");
|
s << ", total = " << String (totalTime / 1000, 5) << " seconds";
|
||||||
|
|
||||||
Logger::outputDebugString (s);
|
Logger::outputDebugString (s);
|
||||||
|
|
||||||
|
s << "\r\n";
|
||||||
|
|
||||||
if (outputFile != File::nonexistent)
|
if (outputFile != File::nonexistent)
|
||||||
outputFile.appendText (s + T("\r\n"), false, false);
|
outputFile.appendText (s, false, false);
|
||||||
|
|
||||||
numRuns = 0;
|
numRuns = 0;
|
||||||
totalTime = 0;
|
totalTime = 0;
|
||||||
|
|
|
||||||
|
|
@ -1922,7 +1922,6 @@ const String JUCE_CALLTYPE String::toHexString (const unsigned char* data,
|
||||||
String s (numChars, (int) 0);
|
String s (numChars, (int) 0);
|
||||||
|
|
||||||
tchar* d = s.text->text;
|
tchar* d = s.text->text;
|
||||||
static const tchar* hexDigits = T("0123456789abcdef");
|
|
||||||
|
|
||||||
for (int i = 0; i < size; ++i)
|
for (int i = 0; i < size; ++i)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -375,7 +375,7 @@ void XmlDocument::readQuotedString (String& result) throw()
|
||||||
else if (character == 0)
|
else if (character == 0)
|
||||||
{
|
{
|
||||||
outOfData = true;
|
outOfData = true;
|
||||||
setLastError (T("unmatched quotes"), false);
|
setLastError ("unmatched quotes", false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -408,7 +408,7 @@ XmlElement* XmlDocument::readNextElement (const bool alsoParseSubElements) throw
|
||||||
|
|
||||||
if (tagLen == 0)
|
if (tagLen == 0)
|
||||||
{
|
{
|
||||||
setLastError (T("tag name missing"), false);
|
setLastError ("tag name missing", false);
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -484,7 +484,7 @@ XmlElement* XmlDocument::readNextElement (const bool alsoParseSubElements) throw
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (! outOfData)
|
if (! outOfData)
|
||||||
setLastError (T("illegal characters found"), false);
|
setLastError ("illegal characters found", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
@ -504,7 +504,7 @@ void XmlDocument::readChildElements (XmlElement* parent) throw()
|
||||||
|
|
||||||
if (outOfData)
|
if (outOfData)
|
||||||
{
|
{
|
||||||
setLastError (T("unmatched tags"), false);
|
setLastError ("unmatched tags", false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -535,7 +535,7 @@ void XmlDocument::readChildElements (XmlElement* parent) throw()
|
||||||
{
|
{
|
||||||
if (*input == 0)
|
if (*input == 0)
|
||||||
{
|
{
|
||||||
setLastError (T("unterminated CDATA section"), false);
|
setLastError ("unterminated CDATA section", false);
|
||||||
outOfData = true;
|
outOfData = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -604,7 +604,7 @@ void XmlDocument::readChildElements (XmlElement* parent) throw()
|
||||||
|
|
||||||
if (c == 0)
|
if (c == 0)
|
||||||
{
|
{
|
||||||
setLastError (T("unmatched tags"), false);
|
setLastError ("unmatched tags", false);
|
||||||
outOfData = true;
|
outOfData = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -660,7 +660,7 @@ void XmlDocument::readChildElements (XmlElement* parent) throw()
|
||||||
}
|
}
|
||||||
else if (c == 0)
|
else if (c == 0)
|
||||||
{
|
{
|
||||||
setLastError (T("unmatched tags"), false);
|
setLastError ("unmatched tags", false);
|
||||||
outOfData = true;
|
outOfData = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -727,7 +727,7 @@ void XmlDocument::readEntity (String& result) throw()
|
||||||
|
|
||||||
if (hexValue < 0 || ++numChars > 8)
|
if (hexValue < 0 || ++numChars > 8)
|
||||||
{
|
{
|
||||||
setLastError (T("illegal escape sequence"), true);
|
setLastError ("illegal escape sequence", true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -745,7 +745,7 @@ void XmlDocument::readEntity (String& result) throw()
|
||||||
{
|
{
|
||||||
if (++numChars > 12)
|
if (++numChars > 12)
|
||||||
{
|
{
|
||||||
setLastError (T("illegal escape sequence"), true);
|
setLastError ("illegal escape sequence", true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -757,7 +757,7 @@ void XmlDocument::readEntity (String& result) throw()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setLastError (T("illegal escape sequence"), true);
|
setLastError ("illegal escape sequence", true);
|
||||||
result += T("&");
|
result += T("&");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -817,7 +817,7 @@ const String XmlDocument::expandEntity (const String& ent)
|
||||||
return String::charToString ((tchar) ent.substring (1).getIntValue());
|
return String::charToString ((tchar) ent.substring (1).getIntValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
setLastError (T("illegal escape sequence"), false);
|
setLastError ("illegal escape sequence", false);
|
||||||
return T("&");
|
return T("&");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -902,7 +902,7 @@ const String XmlDocument::expandExternalEntity (const String& entity)
|
||||||
|
|
||||||
if (semiColon < 0)
|
if (semiColon < 0)
|
||||||
{
|
{
|
||||||
setLastError (T("entity without terminating semi-colon"), false);
|
setLastError ("entity without terminating semi-colon", false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -920,7 +920,7 @@ const String XmlDocument::expandExternalEntity (const String& entity)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setLastError (T("unknown entity"), true);
|
setLastError ("unknown entity", true);
|
||||||
|
|
||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -393,21 +393,21 @@ const String XmlElement::createDocument (const String& dtd,
|
||||||
|
|
||||||
if (includeXmlHeader)
|
if (includeXmlHeader)
|
||||||
{
|
{
|
||||||
doc << T("<?xml version=\"1.0\" encoding=\"")
|
doc << "<?xml version=\"1.0\" encoding=\""
|
||||||
<< encoding;
|
<< encoding;
|
||||||
|
|
||||||
if (allOnOneLine)
|
if (allOnOneLine)
|
||||||
doc += T("\"?> ");
|
doc += "\"?> ";
|
||||||
else
|
else
|
||||||
doc += T("\"?>\n\n");
|
doc += "\"?>\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dtd.isNotEmpty())
|
if (dtd.isNotEmpty())
|
||||||
{
|
{
|
||||||
if (allOnOneLine)
|
if (allOnOneLine)
|
||||||
doc << dtd << T(" ");
|
doc << dtd << " ";
|
||||||
else
|
else
|
||||||
doc << dtd << T("\r\n");
|
doc << dtd << "\r\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
MemoryOutputStream mem (2048, 4096);
|
MemoryOutputStream mem (2048, 4096);
|
||||||
|
|
@ -429,8 +429,8 @@ bool XmlElement::writeToFile (const File& f,
|
||||||
|
|
||||||
if (out != 0)
|
if (out != 0)
|
||||||
{
|
{
|
||||||
*out << T("<?xml version=\"1.0\" encoding=\"") << encoding << T("\"?>\r\n\r\n")
|
*out << "<?xml version=\"1.0\" encoding=\"" << encoding << "\"?>\r\n\r\n"
|
||||||
<< dtd << T("\r\n");
|
<< dtd << "\r\n";
|
||||||
|
|
||||||
writeElementAsText (*out, 0);
|
writeElementAsText (*out, 0);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -183,7 +183,7 @@ void Thread::stopThread (const int timeOutMilliseconds)
|
||||||
// there are bound to be locks and events left in
|
// there are bound to be locks and events left in
|
||||||
// silly states when a thread is killed by force..
|
// silly states when a thread is killed by force..
|
||||||
jassertfalse
|
jassertfalse
|
||||||
Logger::writeToLog (T("!! killing thread by force !!"));
|
Logger::writeToLog ("!! killing thread by force !!");
|
||||||
|
|
||||||
juce_killThread (threadHandle_);
|
juce_killThread (threadHandle_);
|
||||||
threadHandle_ = 0;
|
threadHandle_ = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue