|
|
@@ -548,7 +548,7 @@ |
|
|
#undef PACKED |
|
|
#undef PACKED |
|
|
|
|
|
|
|
|
#if JUCE_ASIO && JUCE_BUILD_NATIVE |
|
|
#if JUCE_ASIO && JUCE_BUILD_NATIVE |
|
|
/* |
|
|
|
|
|
|
|
|
/* |
|
|
This is very frustrating - we only need to use a handful of definitions from |
|
|
This is very frustrating - we only need to use a handful of definitions from |
|
|
a couple of the header files in Steinberg's ASIO SDK, and it'd be easy to copy |
|
|
a couple of the header files in Steinberg's ASIO SDK, and it'd be easy to copy |
|
|
about 30 lines of code into this cpp file to create a fully stand-alone ASIO |
|
|
about 30 lines of code into this cpp file to create a fully stand-alone ASIO |
|
|
@@ -562,16 +562,11 @@ |
|
|
1) Agree to Steinberg's licensing terms and download the ASIO SDK |
|
|
1) Agree to Steinberg's licensing terms and download the ASIO SDK |
|
|
(see www.steinberg.net/Steinberg/Developers.asp). |
|
|
(see www.steinberg.net/Steinberg/Developers.asp). |
|
|
|
|
|
|
|
|
2) Rebuild the whole of JUCE, setting the global definition JUCE_ASIO (you |
|
|
|
|
|
can un-comment the "#define JUCE_ASIO" line in juce_Config.h |
|
|
|
|
|
if you prefer). Make sure that your header search path will find the |
|
|
|
|
|
iasiodrv.h file that comes with the SDK. (Only about 2-3 of the SDK header |
|
|
|
|
|
files are actually needed - so to simplify things, you could just copy |
|
|
|
|
|
these into your JUCE directory). |
|
|
|
|
|
|
|
|
2) Enable this code with a global definition #define JUCE_ASIO 1. |
|
|
|
|
|
|
|
|
If you're compiling and you get an error here because you don't have the |
|
|
|
|
|
ASIO SDK installed, you can disable ASIO support by commenting-out the |
|
|
|
|
|
"#define JUCE_ASIO" line in juce_Config.h, and rebuild your Juce library. |
|
|
|
|
|
|
|
|
3) Make sure that your header search path contains the iasiodrv.h file that |
|
|
|
|
|
comes with the SDK. (Only about a handful of the SDK header files are actually |
|
|
|
|
|
needed - so to simplify things, you could just copy these into your JUCE directory). |
|
|
*/ |
|
|
*/ |
|
|
#include <iasiodrv.h> |
|
|
#include <iasiodrv.h> |
|
|
#endif |
|
|
#endif |
|
|
@@ -2095,16 +2090,12 @@ const String Time::getTimeZone() const throw() |
|
|
_tzset(); |
|
|
_tzset(); |
|
|
|
|
|
|
|
|
#ifdef USE_NEW_SECURE_TIME_FNS |
|
|
#ifdef USE_NEW_SECURE_TIME_FNS |
|
|
|
|
|
for (int i = 0; i < 2; ++i) |
|
|
{ |
|
|
{ |
|
|
char name [128]; |
|
|
|
|
|
|
|
|
char name[128] = { 0 }; |
|
|
size_t length; |
|
|
size_t length; |
|
|
|
|
|
|
|
|
for (int i = 0; i < 2; ++i) |
|
|
|
|
|
{ |
|
|
|
|
|
zeromem (name, sizeof (name)); |
|
|
|
|
|
_get_tzname (&length, name, 127, i); |
|
|
|
|
|
zone[i] = name; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
_get_tzname (&length, name, 127, i); |
|
|
|
|
|
zone[i] = name; |
|
|
} |
|
|
} |
|
|
#else |
|
|
#else |
|
|
const char** const zonePtr = (const char**) _tzname; |
|
|
const char** const zonePtr = (const char**) _tzname; |
|
|
@@ -2801,7 +2792,7 @@ void BigInteger::clear() |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
zeromem (values, sizeof (uint32) * (numValues + 1)); |
|
|
|
|
|
|
|
|
values.clear (numValues + 1); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
highestBit = -1; |
|
|
highestBit = -1; |
|
|
@@ -6469,9 +6460,7 @@ void MD5::ProcessContext::finish (void* const result) |
|
|
const int paddingLength = (index < 56) ? (56 - index) |
|
|
const int paddingLength = (index < 56) ? (56 - index) |
|
|
: (120 - index); |
|
|
: (120 - index); |
|
|
|
|
|
|
|
|
uint8 paddingBuffer [64]; |
|
|
|
|
|
zeromem (paddingBuffer, paddingLength); |
|
|
|
|
|
paddingBuffer [0] = 0x80; |
|
|
|
|
|
|
|
|
uint8 paddingBuffer[64] = { 0x80 }; // first byte is 0x80, remaining bytes are zero. |
|
|
processBlock (paddingBuffer, paddingLength); |
|
|
processBlock (paddingBuffer, paddingLength); |
|
|
|
|
|
|
|
|
processBlock (encodedLength, 8); |
|
|
processBlock (encodedLength, 8); |
|
|
@@ -7833,7 +7822,7 @@ bool File::isAChildOf (const File& potentialParent) const |
|
|
|
|
|
|
|
|
bool File::isAbsolutePath (const String& path) |
|
|
bool File::isAbsolutePath (const String& path) |
|
|
{ |
|
|
{ |
|
|
return path.startsWithChar ('/') || path.startsWithChar ('\\') |
|
|
|
|
|
|
|
|
return path.startsWithChar (separator) |
|
|
#if JUCE_WINDOWS |
|
|
#if JUCE_WINDOWS |
|
|
|| (path.isNotEmpty() && path[1] == ':'); |
|
|
|| (path.isNotEmpty() && path[1] == ':'); |
|
|
#else |
|
|
#else |
|
|
@@ -10505,7 +10494,8 @@ int MemoryOutputStream::writeFromInputStream (InputStream& source, int64 maxNumB |
|
|
|
|
|
|
|
|
const String MemoryOutputStream::toUTF8() const |
|
|
const String MemoryOutputStream::toUTF8() const |
|
|
{ |
|
|
{ |
|
|
return String::fromUTF8 (static_cast <const char*> (getData()), (int) getDataSize()); |
|
|
|
|
|
|
|
|
const char* const d = static_cast <const char*> (getData()); |
|
|
|
|
|
return String (CharPointer_UTF8 (d), CharPointer_UTF8 (d + getDataSize())); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const String MemoryOutputStream::toString() const |
|
|
const String MemoryOutputStream::toString() const |
|
|
@@ -11074,8 +11064,7 @@ int ZipFile::findEndOfZipEntryTable (InputStream& input, int& numEntries) |
|
|
int64 pos = in.getPosition(); |
|
|
int64 pos = in.getPosition(); |
|
|
const int64 lowestPos = jmax ((int64) 0, pos - 1024); |
|
|
const int64 lowestPos = jmax ((int64) 0, pos - 1024); |
|
|
|
|
|
|
|
|
char buffer [32]; |
|
|
|
|
|
zeromem (buffer, sizeof (buffer)); |
|
|
|
|
|
|
|
|
char buffer [32] = { 0 }; |
|
|
|
|
|
|
|
|
while (pos > lowestPos) |
|
|
while (pos > lowestPos) |
|
|
{ |
|
|
{ |
|
|
@@ -13482,13 +13471,17 @@ const String String::createStringFromData (const void* const data_, const int si |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
|
|
|
const uint8* start = data; |
|
|
|
|
|
const uint8* end = data + size; |
|
|
|
|
|
|
|
|
if (size >= 3 |
|
|
if (size >= 3 |
|
|
&& data[0] == (uint8) CharPointer_UTF8::byteOrderMark1 |
|
|
&& data[0] == (uint8) CharPointer_UTF8::byteOrderMark1 |
|
|
&& data[1] == (uint8) CharPointer_UTF8::byteOrderMark2 |
|
|
&& data[1] == (uint8) CharPointer_UTF8::byteOrderMark2 |
|
|
&& data[2] == (uint8) CharPointer_UTF8::byteOrderMark3) |
|
|
&& data[2] == (uint8) CharPointer_UTF8::byteOrderMark3) |
|
|
return String::fromUTF8 ((const char*) data + 3, size - 3); |
|
|
|
|
|
|
|
|
start += 3; |
|
|
|
|
|
|
|
|
return String::fromUTF8 ((const char*) data, size); |
|
|
|
|
|
|
|
|
return String (CharPointer_UTF8 ((const char*) start), |
|
|
|
|
|
CharPointer_UTF8 ((const char*) end)); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@@ -13595,18 +13588,13 @@ int String::getNumBytesAsUTF8() const throw() |
|
|
|
|
|
|
|
|
const String String::fromUTF8 (const char* const buffer, int bufferSizeBytes) |
|
|
const String String::fromUTF8 (const char* const buffer, int bufferSizeBytes) |
|
|
{ |
|
|
{ |
|
|
if (buffer == 0) |
|
|
|
|
|
return empty; |
|
|
|
|
|
|
|
|
|
|
|
CharPointer_UTF8 b (buffer); |
|
|
|
|
|
|
|
|
|
|
|
if (bufferSizeBytes < 0) |
|
|
|
|
|
return String (b); |
|
|
|
|
|
|
|
|
|
|
|
const size_t numChars = b.lengthUpTo (CharPointer_UTF8 (buffer + bufferSizeBytes)); |
|
|
|
|
|
|
|
|
|
|
|
if (numChars > 0) |
|
|
|
|
|
return String (b, numChars); |
|
|
|
|
|
|
|
|
if (buffer != 0) |
|
|
|
|
|
{ |
|
|
|
|
|
if (bufferSizeBytes < 0) |
|
|
|
|
|
return String (CharPointer_UTF8 (buffer)); |
|
|
|
|
|
else if (bufferSizeBytes > 0) |
|
|
|
|
|
return String (CharPointer_UTF8 (buffer), CharPointer_UTF8 (buffer + bufferSizeBytes)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
return String::empty; |
|
|
return String::empty; |
|
|
} |
|
|
} |
|
|
@@ -18177,6 +18165,9 @@ void Value::ValueSource::sendChangeMessage (const bool synchronous) |
|
|
{ |
|
|
{ |
|
|
if (synchronous) |
|
|
if (synchronous) |
|
|
{ |
|
|
{ |
|
|
|
|
|
// (hold a local reference to this object in case it's freed during the callbacks) |
|
|
|
|
|
const ReferenceCountedObjectPtr<ValueSource> localRef (this); |
|
|
|
|
|
|
|
|
for (int i = valuesWithListeners.size(); --i >= 0;) |
|
|
for (int i = valuesWithListeners.size(); --i >= 0;) |
|
|
{ |
|
|
{ |
|
|
Value* const v = valuesWithListeners[i]; |
|
|
Value* const v = valuesWithListeners[i]; |
|
|
@@ -20675,8 +20666,7 @@ private: |
|
|
output->writeIntBigEndian (lengthInSamples); |
|
|
output->writeIntBigEndian (lengthInSamples); |
|
|
output->writeShortBigEndian ((short) bitsPerSample); |
|
|
output->writeShortBigEndian ((short) bitsPerSample); |
|
|
|
|
|
|
|
|
uint8 sampleRateBytes[10]; |
|
|
|
|
|
zeromem (sampleRateBytes, 10); |
|
|
|
|
|
|
|
|
uint8 sampleRateBytes[10] = { 0 }; |
|
|
|
|
|
|
|
|
if (sampleRate <= 1) |
|
|
if (sampleRate <= 1) |
|
|
{ |
|
|
{ |
|
|
@@ -25112,7 +25102,7 @@ void ResamplingAudioSource::setFilterCoefficients (double c1, double c2, double |
|
|
|
|
|
|
|
|
void ResamplingAudioSource::resetFilters() |
|
|
void ResamplingAudioSource::resetFilters() |
|
|
{ |
|
|
{ |
|
|
zeromem (filterStates, sizeof (FilterState) * numChannels); |
|
|
|
|
|
|
|
|
filterStates.clear (numChannels); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void ResamplingAudioSource::applyFilter (float* samples, int num, FilterState& fs) |
|
|
void ResamplingAudioSource::applyFilter (float* samples, int num, FilterState& fs) |
|
|
@@ -27105,7 +27095,7 @@ void AudioSampleBuffer::setSize (const int newNumChannels, |
|
|
if (avoidReallocating && allocatedBytes >= newTotalBytes) |
|
|
if (avoidReallocating && allocatedBytes >= newTotalBytes) |
|
|
{ |
|
|
{ |
|
|
if (clearExtraSpace) |
|
|
if (clearExtraSpace) |
|
|
zeromem (allocatedData, newTotalBytes); |
|
|
|
|
|
|
|
|
allocatedData.clear (newTotalBytes); |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
@@ -60778,18 +60768,18 @@ const String KeyPress::getTextDescription() const |
|
|
if (mods.isShiftDown()) |
|
|
if (mods.isShiftDown()) |
|
|
desc << "shift + "; |
|
|
desc << "shift + "; |
|
|
|
|
|
|
|
|
#if JUCE_MAC |
|
|
|
|
|
// only do this on the mac, because on Windows ctrl and command are the same, |
|
|
|
|
|
// and this would get confusing |
|
|
|
|
|
if (mods.isCommandDown()) |
|
|
|
|
|
desc << "command + "; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if JUCE_MAC |
|
|
if (mods.isAltDown()) |
|
|
if (mods.isAltDown()) |
|
|
desc << "option + "; |
|
|
desc << "option + "; |
|
|
#else |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// only do this on the mac, because on Windows ctrl and command are the same, |
|
|
|
|
|
// and this would get confusing |
|
|
|
|
|
if (mods.isCommandDown()) |
|
|
|
|
|
desc << "command + "; |
|
|
|
|
|
#else |
|
|
if (mods.isAltDown()) |
|
|
if (mods.isAltDown()) |
|
|
desc << "alt + "; |
|
|
desc << "alt + "; |
|
|
#endif |
|
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
for (int i = 0; i < numElementsInArray (KeyPressHelpers::translations); ++i) |
|
|
for (int i = 0; i < numElementsInArray (KeyPressHelpers::translations); ++i) |
|
|
if (keyCode == KeyPressHelpers::translations[i].code) |
|
|
if (keyCode == KeyPressHelpers::translations[i].code) |
|
|
@@ -60822,6 +60812,17 @@ const String KeyPress::getTextDescription() const |
|
|
return desc; |
|
|
return desc; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const String KeyPress::getTextDescriptionWithIcons() const |
|
|
|
|
|
{ |
|
|
|
|
|
#if JUCE_MAC |
|
|
|
|
|
return getTextDescription().replace ("shift + ", String::charToString (0x21e7)) |
|
|
|
|
|
.replace ("command + ", String::charToString (0x2318)) |
|
|
|
|
|
.replace ("option + ", String::charToString (0x2325)); |
|
|
|
|
|
#else |
|
|
|
|
|
return getTextDescription(); |
|
|
|
|
|
#endif |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
END_JUCE_NAMESPACE |
|
|
END_JUCE_NAMESPACE |
|
|
/*** End of inlined file: juce_KeyPress.cpp ***/ |
|
|
/*** End of inlined file: juce_KeyPress.cpp ***/ |
|
|
|
|
|
|
|
|
@@ -69234,7 +69235,7 @@ public: |
|
|
|
|
|
|
|
|
for (int i = 0; i < keyPresses.size(); ++i) |
|
|
for (int i = 0; i < keyPresses.size(); ++i) |
|
|
{ |
|
|
{ |
|
|
const String key (keyPresses.getReference(i).getTextDescription()); |
|
|
|
|
|
|
|
|
const String key (keyPresses.getReference(i).getTextDescriptionWithIcons()); |
|
|
|
|
|
|
|
|
if (shortcutKey.isNotEmpty()) |
|
|
if (shortcutKey.isNotEmpty()) |
|
|
shortcutKey << ", "; |
|
|
shortcutKey << ", "; |
|
|
@@ -87618,10 +87619,9 @@ const Rectangle<float> DrawableImage::getDrawableBounds() const |
|
|
return image.getBounds().toFloat(); |
|
|
return image.getBounds().toFloat(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
bool DrawableImage::hitTest (int x, int y) const |
|
|
|
|
|
|
|
|
bool DrawableImage::hitTest (int x, int y) |
|
|
{ |
|
|
{ |
|
|
return (! image.isNull()) |
|
|
|
|
|
&& image.getPixelAt (x, y).getAlpha() >= 127; |
|
|
|
|
|
|
|
|
return image.isValid() && image.getPixelAt (x, y).getAlpha() >= 127; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Drawable* DrawableImage::createCopy() const |
|
|
Drawable* DrawableImage::createCopy() const |
|
|
@@ -89810,8 +89810,7 @@ private: |
|
|
{ |
|
|
{ |
|
|
if (s [index] == '#') |
|
|
if (s [index] == '#') |
|
|
{ |
|
|
{ |
|
|
uint32 hex [6]; |
|
|
|
|
|
zeromem (hex, sizeof (hex)); |
|
|
|
|
|
|
|
|
uint32 hex[6] = { 0 }; |
|
|
int numChars = 0; |
|
|
int numChars = 0; |
|
|
|
|
|
|
|
|
for (int i = 6; --i >= 0;) |
|
|
for (int i = 6; --i >= 0;) |
|
|
@@ -242250,8 +242249,7 @@ const String SystemStats::getCpuVendor() |
|
|
|
|
|
|
|
|
static void juce_getCpuVendor (char* const v) |
|
|
static void juce_getCpuVendor (char* const v) |
|
|
{ |
|
|
{ |
|
|
int vendor[4]; |
|
|
|
|
|
zeromem (vendor, 16); |
|
|
|
|
|
|
|
|
int vendor[4] = { 0 }; |
|
|
|
|
|
|
|
|
#ifdef JUCE_64BIT |
|
|
#ifdef JUCE_64BIT |
|
|
#else |
|
|
#else |
|
|
@@ -250756,8 +250754,7 @@ private: |
|
|
if (availableExtensions.contains ("WGL_ARB_multisample")) |
|
|
if (availableExtensions.contains ("WGL_ARB_multisample")) |
|
|
attributes[numAttributes++] = WGL_SAMPLES_ARB; |
|
|
attributes[numAttributes++] = WGL_SAMPLES_ARB; |
|
|
|
|
|
|
|
|
int values[32]; |
|
|
|
|
|
zeromem (values, sizeof (values)); |
|
|
|
|
|
|
|
|
int values[32] = { 0 }; |
|
|
|
|
|
|
|
|
if (wglGetPixelFormatAttribivARB (dc, pixelFormatIndex, 0, numAttributes, attributes, values)) |
|
|
if (wglGetPixelFormatAttribivARB (dc, pixelFormatIndex, 0, numAttributes, attributes, values)) |
|
|
{ |
|
|
{ |
|
|
@@ -251151,8 +251148,7 @@ void findCDDevices (Array<CDDeviceDescription>& list) |
|
|
|
|
|
|
|
|
if (h != INVALID_HANDLE_VALUE) |
|
|
if (h != INVALID_HANDLE_VALUE) |
|
|
{ |
|
|
{ |
|
|
char buffer[100]; |
|
|
|
|
|
zeromem (buffer, sizeof (buffer)); |
|
|
|
|
|
|
|
|
char buffer[100] = { 0 }; |
|
|
|
|
|
|
|
|
SCSI_PASS_THROUGH_DIRECT_WITH_BUFFER p; |
|
|
SCSI_PASS_THROUGH_DIRECT_WITH_BUFFER p; |
|
|
zerostruct (p); |
|
|
zerostruct (p); |
|
|
@@ -252497,7 +252493,7 @@ bool AudioCDBurner::addAudioTrack (AudioSource* audioSource, int numSamples) |
|
|
source->getNextAudioBlock (info); |
|
|
source->getNextAudioBlock (info); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
zeromem (buffer, bytesPerBlock); |
|
|
|
|
|
|
|
|
buffer.clear (bytesPerBlock); |
|
|
|
|
|
|
|
|
typedef AudioData::Pointer <AudioData::Int16, AudioData::LittleEndian, |
|
|
typedef AudioData::Pointer <AudioData::Int16, AudioData::LittleEndian, |
|
|
AudioData::Interleaved, AudioData::NonConst> CDSampleFormat; |
|
|
AudioData::Interleaved, AudioData::NonConst> CDSampleFormat; |
|
|
@@ -253091,7 +253087,7 @@ namespace ASIODebugging |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
class ASIOAudioIODevice; |
|
|
class ASIOAudioIODevice; |
|
|
static ASIOAudioIODevice* volatile currentASIODev[3] = { 0, 0, 0 }; |
|
|
|
|
|
|
|
|
static ASIOAudioIODevice* volatile currentASIODev[3] = { 0 }; |
|
|
|
|
|
|
|
|
static const int maxASIOChannels = 160; |
|
|
static const int maxASIOChannels = 160; |
|
|
|
|
|
|
|
|
@@ -253261,9 +253257,8 @@ public: |
|
|
if (sampleRate == 0) |
|
|
if (sampleRate == 0) |
|
|
sampleRate = 44100; |
|
|
sampleRate = 44100; |
|
|
|
|
|
|
|
|
long numSources = 32; |
|
|
|
|
|
ASIOClockSource clocks[32]; |
|
|
|
|
|
zeromem (clocks, sizeof (clocks)); |
|
|
|
|
|
|
|
|
ASIOClockSource clocks[32] = { 0 }; |
|
|
|
|
|
long numSources = numElementsInArray (clocks); |
|
|
asioObject->getClockSources (clocks, &numSources); |
|
|
asioObject->getClockSources (clocks, &numSources); |
|
|
bool isSourceSet = false; |
|
|
bool isSourceSet = false; |
|
|
|
|
|
|
|
|
@@ -253857,8 +253852,7 @@ private: |
|
|
{ |
|
|
{ |
|
|
if (asioObject != 0) |
|
|
if (asioObject != 0) |
|
|
{ |
|
|
{ |
|
|
char buffer [256]; |
|
|
|
|
|
zeromem (buffer, sizeof (buffer)); |
|
|
|
|
|
|
|
|
char buffer [256] = { 0 }; |
|
|
|
|
|
|
|
|
if (! asioObject->init (windowHandle)) |
|
|
if (! asioObject->init (windowHandle)) |
|
|
{ |
|
|
{ |
|
|
@@ -254666,10 +254660,6 @@ public: |
|
|
CoInitialize (0); |
|
|
CoInitialize (0); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
~ASIOAudioIODeviceType() |
|
|
|
|
|
{ |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void scanForDevices() |
|
|
void scanForDevices() |
|
|
{ |
|
|
{ |
|
|
hasScanned = true; |
|
|
hasScanned = true; |
|
|
@@ -254680,21 +254670,12 @@ public: |
|
|
HKEY hk = 0; |
|
|
HKEY hk = 0; |
|
|
int index = 0; |
|
|
int index = 0; |
|
|
|
|
|
|
|
|
if (RegOpenKeyA (HKEY_LOCAL_MACHINE, "software\\asio", &hk) == ERROR_SUCCESS) |
|
|
|
|
|
|
|
|
if (RegOpenKey (HKEY_LOCAL_MACHINE, _T("software\\asio"), &hk) == ERROR_SUCCESS) |
|
|
{ |
|
|
{ |
|
|
for (;;) |
|
|
|
|
|
{ |
|
|
|
|
|
char name [256]; |
|
|
|
|
|
|
|
|
TCHAR name [256]; |
|
|
|
|
|
|
|
|
if (RegEnumKeyA (hk, index++, name, 256) == ERROR_SUCCESS) |
|
|
|
|
|
{ |
|
|
|
|
|
addDriverInfo (name, hk); |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
while (RegEnumKey (hk, index++, name, numElementsInArray (name)) == ERROR_SUCCESS) |
|
|
|
|
|
addDriverInfo (name, hk); |
|
|
|
|
|
|
|
|
RegCloseKey (hk); |
|
|
RegCloseKey (hk); |
|
|
} |
|
|
} |
|
|
@@ -254779,39 +254760,31 @@ private: |
|
|
if (RegOpenKey (HKEY_CLASSES_ROOT, _T("clsid"), &hk) == ERROR_SUCCESS) |
|
|
if (RegOpenKey (HKEY_CLASSES_ROOT, _T("clsid"), &hk) == ERROR_SUCCESS) |
|
|
{ |
|
|
{ |
|
|
int index = 0; |
|
|
int index = 0; |
|
|
|
|
|
TCHAR name [512]; |
|
|
|
|
|
|
|
|
for (;;) |
|
|
|
|
|
|
|
|
while (RegEnumKey (hk, index++, name, numElementsInArray (name)) == ERROR_SUCCESS) |
|
|
{ |
|
|
{ |
|
|
WCHAR buf [512]; |
|
|
|
|
|
|
|
|
|
|
|
if (RegEnumKey (hk, index++, buf, 512) == ERROR_SUCCESS) |
|
|
|
|
|
|
|
|
if (classId.equalsIgnoreCase (name)) |
|
|
{ |
|
|
{ |
|
|
if (classId.equalsIgnoreCase (buf)) |
|
|
|
|
|
{ |
|
|
|
|
|
HKEY subKey, pathKey; |
|
|
|
|
|
|
|
|
HKEY subKey, pathKey; |
|
|
|
|
|
|
|
|
if (RegOpenKeyEx (hk, buf, 0, KEY_READ, &subKey) == ERROR_SUCCESS) |
|
|
|
|
|
|
|
|
if (RegOpenKeyEx (hk, name, 0, KEY_READ, &subKey) == ERROR_SUCCESS) |
|
|
|
|
|
{ |
|
|
|
|
|
if (RegOpenKeyEx (subKey, _T("InprocServer32"), 0, KEY_READ, &pathKey) == ERROR_SUCCESS) |
|
|
{ |
|
|
{ |
|
|
if (RegOpenKeyEx (subKey, _T("InprocServer32"), 0, KEY_READ, &pathKey) == ERROR_SUCCESS) |
|
|
|
|
|
{ |
|
|
|
|
|
WCHAR pathName [1024]; |
|
|
|
|
|
DWORD dtype = REG_SZ; |
|
|
|
|
|
DWORD dsize = sizeof (pathName); |
|
|
|
|
|
|
|
|
|
|
|
if (RegQueryValueEx (pathKey, 0, 0, &dtype, (LPBYTE) pathName, &dsize) == ERROR_SUCCESS) |
|
|
|
|
|
ok = File (pathName).exists(); |
|
|
|
|
|
|
|
|
TCHAR pathName [1024]; |
|
|
|
|
|
DWORD dtype = REG_SZ; |
|
|
|
|
|
DWORD dsize = sizeof (pathName); |
|
|
|
|
|
|
|
|
RegCloseKey (pathKey); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (RegQueryValueEx (pathKey, 0, 0, &dtype, (LPBYTE) pathName, &dsize) == ERROR_SUCCESS) |
|
|
|
|
|
ok = File (pathName).exists(); |
|
|
|
|
|
|
|
|
RegCloseKey (subKey); |
|
|
|
|
|
|
|
|
RegCloseKey (pathKey); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
RegCloseKey (subKey); |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@@ -254828,7 +254801,7 @@ private: |
|
|
|
|
|
|
|
|
if (RegOpenKeyEx (hk, keyName.toUTF16(), 0, KEY_READ, &subKey) == ERROR_SUCCESS) |
|
|
if (RegOpenKeyEx (hk, keyName.toUTF16(), 0, KEY_READ, &subKey) == ERROR_SUCCESS) |
|
|
{ |
|
|
{ |
|
|
WCHAR buf [256]; |
|
|
|
|
|
|
|
|
TCHAR buf [256]; |
|
|
zerostruct (buf); |
|
|
zerostruct (buf); |
|
|
DWORD dtype = REG_SZ; |
|
|
DWORD dtype = REG_SZ; |
|
|
DWORD dsize = sizeof (buf); |
|
|
DWORD dsize = sizeof (buf); |
|
|
@@ -258374,7 +258347,7 @@ const File File::getCurrentWorkingDirectory() |
|
|
bufferSize += 1024; |
|
|
bufferSize += 1024; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return File (String::fromUTF8 (cwd)); |
|
|
|
|
|
|
|
|
return File (CharPointer_UTF8 (cwd)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
bool File::setAsCurrentWorkingDirectory() const |
|
|
bool File::setAsCurrentWorkingDirectory() const |
|
|
@@ -258645,7 +258618,7 @@ const File juce_getExecutableFile() |
|
|
#else |
|
|
#else |
|
|
Dl_info exeInfo; |
|
|
Dl_info exeInfo; |
|
|
dladdr ((void*) juce_getExecutableFile, &exeInfo); // (can't be a const void* on android) |
|
|
dladdr ((void*) juce_getExecutableFile, &exeInfo); // (can't be a const void* on android) |
|
|
return File::getCurrentWorkingDirectory().getChildFile (String::fromUTF8 (exeInfo.dli_fname)); |
|
|
|
|
|
|
|
|
return File::getCurrentWorkingDirectory().getChildFile (CharPointer_UTF8 (exeInfo.dli_fname)); |
|
|
#endif |
|
|
#endif |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@@ -259099,7 +259072,7 @@ const File File::getSpecialLocation (const SpecialLocationType type) |
|
|
homeDir = pw->pw_dir; |
|
|
homeDir = pw->pw_dir; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return File (String::fromUTF8 (homeDir)); |
|
|
|
|
|
|
|
|
return File (CharPointer_UTF8 (homeDir)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
case userDocumentsDirectory: |
|
|
case userDocumentsDirectory: |
|
|
@@ -259134,7 +259107,7 @@ const File File::getSpecialLocation (const SpecialLocationType type) |
|
|
|
|
|
|
|
|
case invokedExecutableFile: |
|
|
case invokedExecutableFile: |
|
|
if (juce_Argv0 != 0) |
|
|
if (juce_Argv0 != 0) |
|
|
return File (String::fromUTF8 (juce_Argv0)); |
|
|
|
|
|
|
|
|
return File (CharPointer_UTF8 (juce_Argv0)); |
|
|
// deliberate fall-through... |
|
|
// deliberate fall-through... |
|
|
|
|
|
|
|
|
case currentExecutableFile: |
|
|
case currentExecutableFile: |
|
|
@@ -259206,7 +259179,7 @@ public: |
|
|
|
|
|
|
|
|
if (fnmatch (wildcardUTF8, de->d_name, FNM_CASEFOLD) == 0) |
|
|
if (fnmatch (wildcardUTF8, de->d_name, FNM_CASEFOLD) == 0) |
|
|
{ |
|
|
{ |
|
|
filenameFound = String::fromUTF8 (de->d_name); |
|
|
|
|
|
|
|
|
filenameFound = CharPointer_UTF8 (de->d_name); |
|
|
|
|
|
|
|
|
updateStatInfoForFile (parentDir + filenameFound, isDir, fileSize, modTime, creationTime, isReadOnly); |
|
|
updateStatInfoForFile (parentDir + filenameFound, isDir, fileSize, modTime, creationTime, isReadOnly); |
|
|
|
|
|
|
|
|
@@ -259783,7 +259756,7 @@ private: |
|
|
numConsecutiveLFs = 0; |
|
|
numConsecutiveLFs = 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const String header (String::fromUTF8 ((const char*) buffer.getData())); |
|
|
|
|
|
|
|
|
const String header (CharPointer_UTF8 ((const char*) buffer.getData())); |
|
|
|
|
|
|
|
|
if (header.startsWithIgnoreCase ("HTTP/")) |
|
|
if (header.startsWithIgnoreCase ("HTTP/")) |
|
|
return header.trimEnd(); |
|
|
return header.trimEnd(); |
|
|
@@ -259991,7 +259964,7 @@ const String SystemStats::getLogonName() |
|
|
user = pw->pw_name; |
|
|
user = pw->pw_name; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return String::fromUTF8 (user); |
|
|
|
|
|
|
|
|
return CharPointer_UTF8 (user); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const String SystemStats::getFullUserName() |
|
|
const String SystemStats::getFullUserName() |
|
|
@@ -260896,7 +260869,7 @@ public: |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
StringArray fontDirs; |
|
|
StringArray fontDirs; |
|
|
fontDirs.addTokens (String::fromUTF8 (getenv ("JUCE_FONT_PATH")), ";,", String::empty); |
|
|
|
|
|
|
|
|
fontDirs.addTokens (CharPointer_UTF8 (getenv ("JUCE_FONT_PATH")), ";,", String::empty); |
|
|
fontDirs.removeEmptyStrings (true); |
|
|
fontDirs.removeEmptyStrings (true); |
|
|
|
|
|
|
|
|
if (fontDirs.size() == 0) |
|
|
if (fontDirs.size() == 0) |
|
|
@@ -261838,12 +261811,9 @@ public: |
|
|
if (! usingXShm) |
|
|
if (! usingXShm) |
|
|
#endif |
|
|
#endif |
|
|
{ |
|
|
{ |
|
|
imageDataAllocated.malloc (lineStride * h); |
|
|
|
|
|
|
|
|
imageDataAllocated.allocate (lineStride * h, format_ == Image::ARGB && clearImage); |
|
|
imageData = imageDataAllocated; |
|
|
imageData = imageDataAllocated; |
|
|
|
|
|
|
|
|
if (format_ == Image::ARGB && clearImage) |
|
|
|
|
|
zeromem (imageData, h * lineStride); |
|
|
|
|
|
|
|
|
|
|
|
xImage = (XImage*) juce_calloc (sizeof (XImage)); |
|
|
xImage = (XImage*) juce_calloc (sizeof (XImage)); |
|
|
|
|
|
|
|
|
xImage->width = w; |
|
|
xImage->width = w; |
|
|
@@ -267097,7 +267067,7 @@ namespace |
|
|
{ |
|
|
{ |
|
|
const String nsStringToJuce (NSString* s) |
|
|
const String nsStringToJuce (NSString* s) |
|
|
{ |
|
|
{ |
|
|
return String::fromUTF8 ([s UTF8String]); |
|
|
|
|
|
|
|
|
return CharPointer_UTF8 ([s UTF8String]); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
NSString* juceStringToNS (const String& s) |
|
|
NSString* juceStringToNS (const String& s) |
|
|
@@ -268271,7 +268241,7 @@ const File File::getCurrentWorkingDirectory() |
|
|
bufferSize += 1024; |
|
|
bufferSize += 1024; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return File (String::fromUTF8 (cwd)); |
|
|
|
|
|
|
|
|
return File (CharPointer_UTF8 (cwd)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
bool File::setAsCurrentWorkingDirectory() const |
|
|
bool File::setAsCurrentWorkingDirectory() const |
|
|
@@ -268542,7 +268512,7 @@ const File juce_getExecutableFile() |
|
|
#else |
|
|
#else |
|
|
Dl_info exeInfo; |
|
|
Dl_info exeInfo; |
|
|
dladdr ((void*) juce_getExecutableFile, &exeInfo); // (can't be a const void* on android) |
|
|
dladdr ((void*) juce_getExecutableFile, &exeInfo); // (can't be a const void* on android) |
|
|
return File::getCurrentWorkingDirectory().getChildFile (String::fromUTF8 (exeInfo.dli_fname)); |
|
|
|
|
|
|
|
|
return File::getCurrentWorkingDirectory().getChildFile (CharPointer_UTF8 (exeInfo.dli_fname)); |
|
|
#endif |
|
|
#endif |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@@ -269058,7 +269028,7 @@ const File File::getSpecialLocation (const SpecialLocationType type) |
|
|
|
|
|
|
|
|
case invokedExecutableFile: |
|
|
case invokedExecutableFile: |
|
|
if (juce_Argv0 != 0) |
|
|
if (juce_Argv0 != 0) |
|
|
return File (String::fromUTF8 (juce_Argv0)); |
|
|
|
|
|
|
|
|
return File (CharPointer_UTF8 (juce_Argv0)); |
|
|
// deliberate fall-through... |
|
|
// deliberate fall-through... |
|
|
|
|
|
|
|
|
case currentExecutableFile: |
|
|
case currentExecutableFile: |
|
|
@@ -269288,11 +269258,10 @@ bool PlatformUtilities::makeFSRefFromPath (FSRef* destFSRef, const String& path) |
|
|
|
|
|
|
|
|
const String PlatformUtilities::makePathFromFSRef (FSRef* file) |
|
|
const String PlatformUtilities::makePathFromFSRef (FSRef* file) |
|
|
{ |
|
|
{ |
|
|
char path [2048]; |
|
|
|
|
|
zerostruct (path); |
|
|
|
|
|
|
|
|
char path [2048] = { 0 }; |
|
|
|
|
|
|
|
|
if (FSRefMakePath (file, (UInt8*) path, sizeof (path) - 1) == noErr) |
|
|
if (FSRefMakePath (file, (UInt8*) path, sizeof (path) - 1) == noErr) |
|
|
return PlatformUtilities::convertToPrecomposedUnicode (String::fromUTF8 (path)); |
|
|
|
|
|
|
|
|
return PlatformUtilities::convertToPrecomposedUnicode (CharPointer_UTF8 (path)); |
|
|
|
|
|
|
|
|
return String::empty; |
|
|
return String::empty; |
|
|
} |
|
|
} |
|
|
@@ -279877,7 +279846,7 @@ END_JUCE_NAMESPACE |
|
|
|
|
|
|
|
|
if ([err length] > 0) |
|
|
if ([err length] > 0) |
|
|
{ |
|
|
{ |
|
|
*error = JUCE_NAMESPACE::String::fromUTF8 ([err UTF8String]); |
|
|
|
|
|
|
|
|
*error = JUCE_NAMESPACE::CharPointer_UTF8 ([err UTF8String]); |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@@ -280182,7 +280151,7 @@ const StringArray AudioCDBurner::findAvailableDevices() |
|
|
StringArray s; |
|
|
StringArray s; |
|
|
|
|
|
|
|
|
for (unsigned int i = 0; i < [names count]; ++i) |
|
|
for (unsigned int i = 0; i < [names count]; ++i) |
|
|
s.add (String::fromUTF8 ([[names objectAtIndex: i] UTF8String])); |
|
|
|
|
|
|
|
|
s.add (CharPointer_UTF8 ([[names objectAtIndex: i] UTF8String])); |
|
|
|
|
|
|
|
|
return s; |
|
|
return s; |
|
|
} |
|
|
} |
|
|
@@ -281423,8 +281392,7 @@ public: |
|
|
String name; |
|
|
String name; |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
char channelName [256]; |
|
|
|
|
|
zerostruct (channelName); |
|
|
|
|
|
|
|
|
char channelName [256] = { 0 }; |
|
|
UInt32 nameSize = sizeof (channelName); |
|
|
UInt32 nameSize = sizeof (channelName); |
|
|
UInt32 channelNum = chanNum + 1; |
|
|
UInt32 channelNum = chanNum + 1; |
|
|
pa.mSelector = kAudioDevicePropertyChannelName; |
|
|
pa.mSelector = kAudioDevicePropertyChannelName; |
|
|
@@ -284173,7 +284141,7 @@ const String SystemStats::getLogonName() |
|
|
user = pw->pw_name; |
|
|
user = pw->pw_name; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return String::fromUTF8 (user); |
|
|
|
|
|
|
|
|
return CharPointer_UTF8 (user); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const String SystemStats::getFullUserName() |
|
|
const String SystemStats::getFullUserName() |
|
|
@@ -284420,7 +284388,7 @@ const File File::getCurrentWorkingDirectory() |
|
|
bufferSize += 1024; |
|
|
bufferSize += 1024; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return File (String::fromUTF8 (cwd)); |
|
|
|
|
|
|
|
|
return File (CharPointer_UTF8 (cwd)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
bool File::setAsCurrentWorkingDirectory() const |
|
|
bool File::setAsCurrentWorkingDirectory() const |
|
|
@@ -284691,7 +284659,7 @@ const File juce_getExecutableFile() |
|
|
#else |
|
|
#else |
|
|
Dl_info exeInfo; |
|
|
Dl_info exeInfo; |
|
|
dladdr ((void*) juce_getExecutableFile, &exeInfo); // (can't be a const void* on android) |
|
|
dladdr ((void*) juce_getExecutableFile, &exeInfo); // (can't be a const void* on android) |
|
|
return File::getCurrentWorkingDirectory().getChildFile (String::fromUTF8 (exeInfo.dli_fname)); |
|
|
|
|
|
|
|
|
return File::getCurrentWorkingDirectory().getChildFile (CharPointer_UTF8 (exeInfo.dli_fname)); |
|
|
#endif |
|
|
#endif |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@@ -285186,7 +285154,7 @@ public: |
|
|
|
|
|
|
|
|
if (fnmatch (wildcardUTF8, de->d_name, FNM_CASEFOLD) == 0) |
|
|
if (fnmatch (wildcardUTF8, de->d_name, FNM_CASEFOLD) == 0) |
|
|
{ |
|
|
{ |
|
|
filenameFound = String::fromUTF8 (de->d_name); |
|
|
|
|
|
|
|
|
filenameFound = CharPointer_UTF8 (de->d_name); |
|
|
|
|
|
|
|
|
updateStatInfoForFile (parentDir + filenameFound, isDir, fileSize, modTime, creationTime, isReadOnly); |
|
|
updateStatInfoForFile (parentDir + filenameFound, isDir, fileSize, modTime, creationTime, isReadOnly); |
|
|
|
|
|
|
|
|
|