Browse Source

Small fix for File::createInputStream.

tags/2021-05-28
jules 12 years ago
parent
commit
2266501eb9
2 changed files with 5 additions and 3 deletions
  1. +1
    -1
      modules/juce_audio_processors/processors/juce_AudioProcessor.h
  2. +4
    -2
      modules/juce_core/files/juce_File.cpp

+ 1
- 1
modules/juce_audio_processors/processors/juce_AudioProcessor.h View File

@@ -107,7 +107,7 @@ public:
let this pass through without being overwritten or cleared. let this pass through without being overwritten or cleared.
Also note that the buffer may have more channels than are strictly necessary, Also note that the buffer may have more channels than are strictly necessary,
but your should only read/write from the ones that your filter is supposed to
but you should only read/write from the ones that your filter is supposed to
be using. be using.
The number of samples in these buffers is NOT guaranteed to be the same for every The number of samples in these buffers is NOT guaranteed to be the same for every


+ 4
- 2
modules/juce_core/files/juce_File.cpp View File

@@ -654,8 +654,10 @@ bool File::startAsProcess (const String& parameters) const
//============================================================================== //==============================================================================
FileInputStream* File::createInputStream() const FileInputStream* File::createInputStream() const
{ {
if (existsAsFile())
return new FileInputStream (*this);
ScopedPointer<FileInputStream> fin (new FileInputStream (*this));
if (fin->openedOk())
return fin.release();
return nullptr; return nullptr;
} }


Loading…
Cancel
Save