Browse Source

Fix for mono files in QuicktimeAudioFormat. Avoided some floating-point comparison warnings. Added some iOS options in the new jucer plist. Fix for audio host startup. Changes to allow backslashes in unix filenames.

tags/2021-05-28
Julian Storer 14 years ago
parent
commit
3fe85fd17a
24 changed files with 150 additions and 85 deletions
  1. +23
    -0
      extras/Jucer (experimental)/Source/Project/jucer_ProjectExport_XCode.h
  2. +1
    -1
      extras/audio plugin host/Source/HostStartup.cpp
  3. +2
    -1
      extras/audio plugin host/Source/MainHostWindow.h
  4. +58
    -36
      juce_amalgamated.cpp
  5. +4
    -5
      juce_amalgamated.h
  6. +1
    -1
      src/audio/audio_file_formats/juce_AiffAudioFormat.cpp
  7. +1
    -1
      src/audio/audio_file_formats/juce_FlacAudioFormat.cpp
  8. +1
    -1
      src/audio/audio_file_formats/juce_OggVorbisAudioFormat.cpp
  9. +5
    -2
      src/audio/audio_file_formats/juce_QuickTimeAudioFormat.cpp
  10. +1
    -1
      src/audio/audio_file_formats/juce_WavAudioFormat.cpp
  11. +2
    -2
      src/audio/audio_sources/juce_AudioTransportSource.cpp
  12. +1
    -1
      src/audio/audio_sources/juce_MixerAudioSource.cpp
  13. +1
    -1
      src/audio/devices/juce_AudioDeviceManager.cpp
  14. +10
    -14
      src/audio/midi/juce_MidiFile.cpp
  15. +1
    -1
      src/gui/components/layout/juce_ResizableEdgeComponent.cpp
  16. +1
    -1
      src/gui/graphics/colour/juce_Colour.cpp
  17. +10
    -0
      src/gui/graphics/colour/juce_ColourGradient.cpp
  18. +2
    -2
      src/gui/graphics/colour/juce_ColourGradient.h
  19. +1
    -1
      src/gui/graphics/drawables/juce_DrawablePath.cpp
  20. +1
    -1
      src/gui/graphics/drawables/juce_DrawableShape.cpp
  21. +1
    -1
      src/gui/graphics/geometry/juce_Line.h
  22. +6
    -0
      src/gui/graphics/geometry/juce_PathIterator.cpp
  23. +1
    -3
      src/gui/graphics/geometry/juce_PathIterator.h
  24. +15
    -8
      src/io/files/juce_File.cpp

+ 23
- 0
extras/Jucer (experimental)/Source/Project/jucer_ProjectExport_XCode.h View File

@@ -98,6 +98,14 @@ public:
props.add (new TextPropertyComponent (getSetting ("documentExtensions"), "Document file extensions", 128, false));
props.getLast()->setTooltip ("A comma-separated list of file extensions for documents that your app can open.");
}
else if (iPhone)
{
props.add (new BooleanPropertyComponent (getSetting ("UIFileSharingEnabled"), "File Sharing Enabled", "Enabled"));
props.getLast()->setTooltip ("Enable this to expose your app's files to iTunes.");
props.add (new BooleanPropertyComponent (getSetting ("UIStatusBarHidden"), "Status Bar Hidden", "Enabled"));
props.getLast()->setTooltip ("Enable this to disable the status bar in your app.");
}
}
void launchProject()
@@ -326,6 +334,9 @@ private:
XmlElement plist ("plist");
XmlElement* dict = plist.createNewChildElement ("dict");
if (iPhone)
addPlistDictionaryKeyBool (dict, "LSRequiresIPhoneOS", true);
addPlistDictionaryKey (dict, "CFBundleExecutable", "${EXECUTABLE_NAME}");
addPlistDictionaryKey (dict, "CFBundleIconFile", iconFile.exists() ? iconFile.getFileName() : String::empty);
addPlistDictionaryKey (dict, "CFBundleIdentifier", project.getBundleIdentifier().toString());
@@ -370,6 +381,12 @@ private:
}
}
if (getSetting ("UIFileSharingEnabled").getValue())
addPlistDictionaryKeyBool (dict, "UIFileSharingEnabled", true);
if (getSetting ("UIStatusBarHidden").getValue())
addPlistDictionaryKeyBool (dict, "UIStatusBarHidden", true);
MemoryOutputStream mo;
plist.writeToStream (mo, "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">");
@@ -730,6 +747,12 @@ private:
xml->createNewChildElement ("string")->addTextElement (value);
}
static void addPlistDictionaryKeyBool (XmlElement* xml, const String& key, const bool value)
{
xml->createNewChildElement ("key")->addTextElement (key);
xml->createNewChildElement (value ? "true" : "false");
}
const String addBuildFile (const RelativePath& path, const String& fileRefID, bool addToSourceBuildPhase, bool inhibitWarnings)
{
String fileID (createID (path.toUnixStyle() + "buildref"));


+ 1
- 1
extras/audio plugin host/Source/HostStartup.cpp View File

@@ -48,7 +48,7 @@ public:
{
}
void initialise (const String& /*commandLine*/)
void initialise (const String& commandLine)
{
// initialise our settings file..
ApplicationProperties::getInstance()


+ 2
- 1
extras/audio plugin host/Source/MainHostWindow.h View File

@@ -83,6 +83,8 @@ public:
void addPluginsToMenu (PopupMenu& m) const;
const PluginDescription* getChosenType (const int menuID) const;
GraphDocumentComponent* getGraphEditor() const;
private:
//==============================================================================
AudioDeviceManager deviceManager;
@@ -92,7 +94,6 @@ private:
KnownPluginList::SortMethod pluginSortMethod;
void showAudioSettings();
GraphDocumentComponent* getGraphEditor() const;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainHostWindow);
};


+ 58
- 36
juce_amalgamated.cpp View File

@@ -7567,7 +7567,13 @@ const String File::parseAbsolutePath (const String& p)
}
#else
// Mac or Linux..
String path (p.replaceCharacter ('\\', '/'));

// Yes, I know it's legal for a unix pathname to contain a backslash, but this assertion is here
// to catch anyone who's trying to run code that was written on Windows with hard-coded path names.
// If that's why you've ended up here, use File::getChildFile() to build your paths instead.
jassert ((! p.containsChar ('\\')) || (p.indexOfChar ('/') >= 0 && p.indexOfChar ('/') < p.indexOfChar ('\\')));

String path (p);

if (path.startsWithChar ('~'))
{
@@ -7808,11 +7814,11 @@ bool File::isAChildOf (const File& potentialParent) const
bool File::isAbsolutePath (const String& path)
{
return path.startsWithChar ('/') || path.startsWithChar ('\\')
#if JUCE_WINDOWS
#if JUCE_WINDOWS
|| (path.isNotEmpty() && path[1] == ':');
#else
#else
|| path.startsWithChar ('~');
#endif
#endif
}

const File File::getChildFile (String relativePath) const
@@ -7829,11 +7835,12 @@ const File File::getChildFile (String relativePath) const

if (relativePath[0] == '.')
{
#if JUCE_WINDOWS
#if JUCE_WINDOWS
relativePath = relativePath.replaceCharacter ('/', '\\').trimStart();
#else
relativePath = relativePath.replaceCharacter ('\\', '/').trimStart();
#endif
#else
relativePath = relativePath.trimStart();
#endif

while (relativePath[0] == '.')
{
if (relativePath[1] == '.')
@@ -20657,7 +20664,7 @@ AudioFormatReader* AiffAudioFormat::createReaderFor (InputStream* sourceStream,
{
ScopedPointer <AiffAudioFormatReader> w (new AiffAudioFormatReader (sourceStream));

if (w->sampleRate != 0)
if (w->sampleRate > 0)
return w.release();

if (! deleteStreamIfOpeningFails)
@@ -22618,10 +22625,13 @@ public:
{
if (destSamples[j] != 0)
{
const short* const src = ((const short*) bufferList->mBuffers[0].mData) + j;
const short* src = ((const short*) bufferList->mBuffers[0].mData) + j;

for (int i = 0; i < samplesReceived; ++i)
destSamples[j][startOffsetInDestBuffer + i] = src [i << 1] << 16;
{
destSamples[j][startOffsetInDestBuffer + i] = (*src << 16);
src += numChannels;
}
}
}

@@ -23398,7 +23408,7 @@ AudioFormatReader* WavAudioFormat::createReaderFor (InputStream* sourceStream,
{
ScopedPointer <WavAudioFormatReader> r (new WavAudioFormatReader (sourceStream));

if (r->sampleRate != 0)
if (r->sampleRate > 0)
return r.release();

if (! deleteStreamIfOpeningFails)
@@ -23870,7 +23880,7 @@ void AudioTransportSource::setSource (PositionableAudioSource* const newSource,

newPositionableSource->setNextReadPosition (0);

if (sourceSampleRateToCorrectFor != 0)
if (sourceSampleRateToCorrectFor > 0)
newMasterSource = newResamplerSource
= new ResamplingAudioSource (newPositionableSource, false, maxNumChannels);
else
@@ -24013,7 +24023,7 @@ void AudioTransportSource::prepareToPlay (int samplesPerBlockExpected,
if (masterSource != 0)
masterSource->prepareToPlay (samplesPerBlockExpected, sampleRate);

if (resamplerSource != 0 && sourceSampleRate != 0)
if (resamplerSource != 0 && sourceSampleRate > 0)
resamplerSource->setResamplingRatio (sourceSampleRate / sampleRate);

isPrepared = true;
@@ -24668,7 +24678,7 @@ void MixerAudioSource::addInputSource (AudioSource* input, const bool deleteWhen
localBufferSize = bufferSizeExpected;
}

if (localRate != 0.0)
if (localRate > 0.0)
input->prepareToPlay (localBufferSize, localRate);

const ScopedLock sl (lock);
@@ -25516,7 +25526,7 @@ double AudioDeviceManager::chooseBestSampleRate (double rate) const
{
const double sr = currentAudioDevice->getSampleRate (i);

if (sr >= 44100.0 && (lowestAbove44 == 0 || sr < lowestAbove44))
if (sr >= 44100.0 && (lowestAbove44 < 1.0 || sr < lowestAbove44))
lowestAbove44 = sr;
}

@@ -28043,7 +28053,6 @@ namespace MidiFileHelpers
break;
}
}

}

return correctedTempoTime + (time - tempoTime) * secsPerTick;
@@ -28062,19 +28071,16 @@ namespace MidiFileHelpers
{
const double diff = (first->message.getTimeStamp() - second->message.getTimeStamp());

if (diff == 0)
{
if (first->message.isNoteOff() && second->message.isNoteOn())
return -1;
else if (first->message.isNoteOn() && second->message.isNoteOff())
return 1;
else
return 0;
}
else
{
return (diff > 0) ? 1 : -1;
}
if (diff > 0)
return 1;
else if (diff < 0)
return -1;
else if (first->message.isNoteOff() && second->message.isNoteOn())
return -1;
else if (first->message.isNoteOn() && second->message.isNoteOff())
return 1;

return 0;
}
};
}
@@ -62983,7 +62989,7 @@ void ResizableEdgeComponent::paint (Graphics& g)
isMouseOver(), isMouseButtonDown());
}

void ResizableEdgeComponent::mouseDown (const MouseEvent& e)
void ResizableEdgeComponent::mouseDown (const MouseEvent&)
{
if (component == 0)
{
@@ -81073,7 +81079,7 @@ void Colour::getHSB (float& h, float& s, float& v) const throw()
{
s = (hi - lo) / (float) hi;

if (s != 0)
if (s > 0)
{
const float invDiff = 1.0f / (hi - lo);

@@ -81451,6 +81457,16 @@ bool ColourGradient::isInvisible() const throw()
return true;
}

bool ColourGradient::ColourPoint::operator== (const ColourPoint& other) const throw()
{
return position == other.position && colour == other.colour;
}

bool ColourGradient::ColourPoint::operator!= (const ColourPoint& other) const throw()
{
return position != other.position || colour != other.colour;
}

END_JUCE_NAMESPACE
/*** End of inlined file: juce_ColourGradient.cpp ***/

@@ -86641,7 +86657,7 @@ public:
owner.repaint();
}

void applyNewBounds (const Rectangle<int>& newBounds)
void applyNewBounds (const Rectangle<int>&)
{
jassertfalse; // drawables can't be resized directly!
}
@@ -87701,7 +87717,7 @@ public:
owner.applyRelativePath (*owner.relativePath, &scope);
}

void applyNewBounds (const Rectangle<int>& newBounds)
void applyNewBounds (const Rectangle<int>&)
{
jassertfalse; // drawables can't be resized directly!
}
@@ -93782,6 +93798,12 @@ PathFlatteningIterator::~PathFlatteningIterator()
{
}

bool PathFlatteningIterator::isLastInSubpath() const throw()
{
return stackPos == stackBase.getData()
&& (index >= path.numElements || points [index] == Path::moveMarker);
}

bool PathFlatteningIterator::next()
{
x1 = x2;
@@ -129170,7 +129192,7 @@ AudioFormatReader* FlacAudioFormat::createReaderFor (InputStream* in,
{
ScopedPointer<FlacReader> r (new FlacReader (in));

if (r->sampleRate != 0)
if (r->sampleRate > 0)
return r.release();

if (! deleteStreamIfOpeningFails)
@@ -188176,7 +188198,7 @@ AudioFormatReader* OggVorbisAudioFormat::createReaderFor (InputStream* in,
{
ScopedPointer <OggReader> r (new OggReader (in));

if (r->sampleRate != 0)
if (r->sampleRate > 0)
return r.release();

if (! deleteStreamIfOpeningFails)


+ 4
- 5
juce_amalgamated.h View File

@@ -24103,7 +24103,7 @@ public:
const Point<ValueType> delta (end - start);
const double length = juce_hypot ((double) delta.getX(),
(double) delta.getY());
if (length == 0)
if (length <= 0)
return start;

return Point<ValueType> (start.getX() + (ValueType) ((delta.getX() * distanceFromStart - delta.getY() * perpendicularDistance) / length),
@@ -27692,8 +27692,8 @@ private:
: position (position_), colour (colour_)
{}

bool operator== (const ColourPoint& other) const throw() { return position == other.position && colour == other.colour; }
bool operator!= (const ColourPoint& other) const throw() { return position != other.position || colour != other.colour; }
bool operator== (const ColourPoint& other) const throw();
bool operator!= (const ColourPoint& other) const throw();

double position;
Colour colour;
@@ -65679,8 +65679,7 @@ public:
int subPathIndex;

/** Returns true if the current segment is the last in the current sub-path. */
bool isLastInSubpath() const throw() { return stackPos == stackBase.getData()
&& (index >= path.numElements || points [index] == Path::moveMarker); }
bool isLastInSubpath() const throw();

/** This is the default value that should be used for the tolerance value (see the constructor parameters). */
static const float defaultTolerance;


+ 1
- 1
src/audio/audio_file_formats/juce_AiffAudioFormat.cpp View File

@@ -404,7 +404,7 @@ AudioFormatReader* AiffAudioFormat::createReaderFor (InputStream* sourceStream,
{
ScopedPointer <AiffAudioFormatReader> w (new AiffAudioFormatReader (sourceStream));
if (w->sampleRate != 0)
if (w->sampleRate > 0)
return w.release();
if (! deleteStreamIfOpeningFails)


+ 1
- 1
src/audio/audio_file_formats/juce_FlacAudioFormat.cpp View File

@@ -507,7 +507,7 @@ AudioFormatReader* FlacAudioFormat::createReaderFor (InputStream* in,
{
ScopedPointer<FlacReader> r (new FlacReader (in));
if (r->sampleRate != 0)
if (r->sampleRate > 0)
return r.release();
if (! deleteStreamIfOpeningFails)


+ 1
- 1
src/audio/audio_file_formats/juce_OggVorbisAudioFormat.cpp View File

@@ -426,7 +426,7 @@ AudioFormatReader* OggVorbisAudioFormat::createReaderFor (InputStream* in,
{
ScopedPointer <OggReader> r (new OggReader (in));
if (r->sampleRate != 0)
if (r->sampleRate > 0)
return r.release();
if (! deleteStreamIfOpeningFails)


+ 5
- 2
src/audio/audio_file_formats/juce_QuickTimeAudioFormat.cpp View File

@@ -280,10 +280,13 @@ public:
{
if (destSamples[j] != 0)
{
const short* const src = ((const short*) bufferList->mBuffers[0].mData) + j;
const short* src = ((const short*) bufferList->mBuffers[0].mData) + j;
for (int i = 0; i < samplesReceived; ++i)
destSamples[j][startOffsetInDestBuffer + i] = src [i << 1] << 16;
{
destSamples[j][startOffsetInDestBuffer + i] = (*src << 16);
src += numChannels;
}
}
}


+ 1
- 1
src/audio/audio_file_formats/juce_WavAudioFormat.cpp View File

@@ -718,7 +718,7 @@ AudioFormatReader* WavAudioFormat::createReaderFor (InputStream* sourceStream,
{
ScopedPointer <WavAudioFormatReader> r (new WavAudioFormatReader (sourceStream));
if (r->sampleRate != 0)
if (r->sampleRate > 0)
return r.release();
if (! deleteStreamIfOpeningFails)


+ 2
- 2
src/audio/audio_sources/juce_AudioTransportSource.cpp View File

@@ -94,7 +94,7 @@ void AudioTransportSource::setSource (PositionableAudioSource* const newSource,
newPositionableSource->setNextReadPosition (0);
if (sourceSampleRateToCorrectFor != 0)
if (sourceSampleRateToCorrectFor > 0)
newMasterSource = newResamplerSource
= new ResamplingAudioSource (newPositionableSource, false, maxNumChannels);
else
@@ -237,7 +237,7 @@ void AudioTransportSource::prepareToPlay (int samplesPerBlockExpected,
if (masterSource != 0)
masterSource->prepareToPlay (samplesPerBlockExpected, sampleRate);
if (resamplerSource != 0 && sourceSampleRate != 0)
if (resamplerSource != 0 && sourceSampleRate > 0)
resamplerSource->setResamplingRatio (sourceSampleRate / sampleRate);
isPrepared = true;


+ 1
- 1
src/audio/audio_sources/juce_MixerAudioSource.cpp View File

@@ -59,7 +59,7 @@ void MixerAudioSource::addInputSource (AudioSource* input, const bool deleteWhen
localBufferSize = bufferSizeExpected;
}
if (localRate != 0.0)
if (localRate > 0.0)
input->prepareToPlay (localBufferSize, localRate);
const ScopedLock sl (lock);


+ 1
- 1
src/audio/devices/juce_AudioDeviceManager.cpp View File

@@ -468,7 +468,7 @@ double AudioDeviceManager::chooseBestSampleRate (double rate) const
{
const double sr = currentAudioDevice->getSampleRate (i);
if (sr >= 44100.0 && (lowestAbove44 == 0 || sr < lowestAbove44))
if (sr >= 44100.0 && (lowestAbove44 < 1.0 || sr < lowestAbove44))
lowestAbove44 = sr;
}


+ 10
- 14
src/audio/midi/juce_MidiFile.cpp View File

@@ -150,7 +150,6 @@ namespace MidiFileHelpers
break;
}
}
}
return correctedTempoTime + (time - tempoTime) * secsPerTick;
@@ -169,19 +168,16 @@ namespace MidiFileHelpers
{
const double diff = (first->message.getTimeStamp() - second->message.getTimeStamp());
if (diff == 0)
{
if (first->message.isNoteOff() && second->message.isNoteOn())
return -1;
else if (first->message.isNoteOn() && second->message.isNoteOff())
return 1;
else
return 0;
}
else
{
return (diff > 0) ? 1 : -1;
}
if (diff > 0)
return 1;
else if (diff < 0)
return -1;
else if (first->message.isNoteOff() && second->message.isNoteOn())
return -1;
else if (first->message.isNoteOn() && second->message.isNoteOff())
return 1;
return 0;
}
};
}


+ 1
- 1
src/gui/components/layout/juce_ResizableEdgeComponent.cpp View File

@@ -60,7 +60,7 @@ void ResizableEdgeComponent::paint (Graphics& g)
isMouseOver(), isMouseButtonDown());
}
void ResizableEdgeComponent::mouseDown (const MouseEvent& e)
void ResizableEdgeComponent::mouseDown (const MouseEvent&)
{
if (component == 0)
{


+ 1
- 1
src/gui/graphics/colour/juce_Colour.cpp View File

@@ -339,7 +339,7 @@ void Colour::getHSB (float& h, float& s, float& v) const throw()
{
s = (hi - lo) / (float) hi;
if (s != 0)
if (s > 0)
{
const float invDiff = 1.0f / (hi - lo);


+ 10
- 0
src/gui/graphics/colour/juce_ColourGradient.cpp View File

@@ -219,5 +219,15 @@ bool ColourGradient::isInvisible() const throw()
return true;
}
bool ColourGradient::ColourPoint::operator== (const ColourPoint& other) const throw()
{
return position == other.position && colour == other.colour;
}
bool ColourGradient::ColourPoint::operator!= (const ColourPoint& other) const throw()
{
return position != other.position || colour != other.colour;
}
END_JUCE_NAMESPACE

+ 2
- 2
src/gui/graphics/colour/juce_ColourGradient.h View File

@@ -163,8 +163,8 @@ private:
: position (position_), colour (colour_)
{}
bool operator== (const ColourPoint& other) const throw() { return position == other.position && colour == other.colour; }
bool operator!= (const ColourPoint& other) const throw() { return position != other.position || colour != other.colour; }
bool operator== (const ColourPoint& other) const throw();
bool operator!= (const ColourPoint& other) const throw();
double position;
Colour colour;


+ 1
- 1
src/gui/graphics/drawables/juce_DrawablePath.cpp View File

@@ -123,7 +123,7 @@ public:
owner.applyRelativePath (*owner.relativePath, &scope);
}
void applyNewBounds (const Rectangle<int>& newBounds)
void applyNewBounds (const Rectangle<int>&)
{
jassertfalse; // drawables can't be resized directly!
}


+ 1
- 1
src/gui/graphics/drawables/juce_DrawableShape.cpp View File

@@ -77,7 +77,7 @@ public:
owner.repaint();
}
void applyNewBounds (const Rectangle<int>& newBounds)
void applyNewBounds (const Rectangle<int>&)
{
jassertfalse; // drawables can't be resized directly!
}


+ 1
- 1
src/gui/graphics/geometry/juce_Line.h View File

@@ -211,7 +211,7 @@ public:
const Point<ValueType> delta (end - start);
const double length = juce_hypot ((double) delta.getX(),
(double) delta.getY());
if (length == 0)
if (length <= 0)
return start;
return Point<ValueType> (start.getX() + (ValueType) ((delta.getX() * distanceFromStart - delta.getY() * perpendicularDistance) / length),


+ 6
- 0
src/gui/graphics/geometry/juce_PathIterator.cpp View File

@@ -63,6 +63,12 @@ PathFlatteningIterator::~PathFlatteningIterator()
{
}
bool PathFlatteningIterator::isLastInSubpath() const throw()
{
return stackPos == stackBase.getData()
&& (index >= path.numElements || points [index] == Path::moveMarker);
}
bool PathFlatteningIterator::next()
{
x1 = x2;


+ 1
- 3
src/gui/graphics/geometry/juce_PathIterator.h View File

@@ -91,9 +91,7 @@ public:
int subPathIndex;
/** Returns true if the current segment is the last in the current sub-path. */
bool isLastInSubpath() const throw() { return stackPos == stackBase.getData()
&& (index >= path.numElements || points [index] == Path::moveMarker); }
bool isLastInSubpath() const throw();
/** This is the default value that should be used for the tolerance value (see the constructor parameters). */
static const float defaultTolerance;


+ 15
- 8
src/io/files/juce_File.cpp View File

@@ -118,7 +118,13 @@ const String File::parseAbsolutePath (const String& p)
}
#else
// Mac or Linux..
String path (p.replaceCharacter ('\\', '/'));
// Yes, I know it's legal for a unix pathname to contain a backslash, but this assertion is here
// to catch anyone who's trying to run code that was written on Windows with hard-coded path names.
// If that's why you've ended up here, use File::getChildFile() to build your paths instead.
jassert ((! p.containsChar ('\\')) || (p.indexOfChar ('/') >= 0 && p.indexOfChar ('/') < p.indexOfChar ('\\')));
String path (p);
if (path.startsWithChar ('~'))
{
@@ -364,11 +370,11 @@ bool File::isAChildOf (const File& potentialParent) const
bool File::isAbsolutePath (const String& path)
{
return path.startsWithChar ('/') || path.startsWithChar ('\\')
#if JUCE_WINDOWS
#if JUCE_WINDOWS
|| (path.isNotEmpty() && path[1] == ':');
#else
#else
|| path.startsWithChar ('~');
#endif
#endif
}
const File File::getChildFile (String relativePath) const
@@ -385,11 +391,12 @@ const File File::getChildFile (String relativePath) const
if (relativePath[0] == '.')
{
#if JUCE_WINDOWS
#if JUCE_WINDOWS
relativePath = relativePath.replaceCharacter ('/', '\\').trimStart();
#else
relativePath = relativePath.replaceCharacter ('\\', '/').trimStart();
#endif
#else
relativePath = relativePath.trimStart();
#endif
while (relativePath[0] == '.')
{
if (relativePath[1] == '.')


Loading…
Cancel
Save