37 if (newFormat !=
nullptr)
40 for (
auto* af : knownFormats)
47 if (makeThisTheDefaultFormat)
50 knownFormats.add (newFormat);
63 #if JUCE_USE_OGGVORBIS
67 #if JUCE_MAC || JUCE_IOS
71 #if JUCE_USE_MP3AUDIOFORMAT
75 #if JUCE_USE_WINDOWS_MEDIA_FORMAT
83 defaultFormatIndex = 0;
95 for (
auto* af : knownFormats)
96 if (af->getFileExtensions().contains (fileExtension,
true))
106 for (
auto* af : knownFormats)
107 extensions.
addArray (af->getFileExtensions());
112 for (
auto& e : extensions)
113 e = (e.startsWithChar (
'.') ?
"*" :
"*.") + e;
126 for (
auto* af : knownFormats)
127 if (af->canHandleFile (file))
129 if (
auto* r = af->createReaderFor (in.release(),
true))
141 if (audioFileStream !=
nullptr)
143 auto originalStreamPos = audioFileStream->getPosition();
145 for (
auto* af : knownFormats)
147 if (
auto* r = af->createReaderFor (audioFileStream.
get(),
false))
153 audioFileStream->setPosition (originalStreamPos);
157 jassert (audioFileStream->getPosition() == originalStreamPos);
Represents a local file or directory.
std::unique_ptr< FileInputStream > createInputStream() const
Creates a stream to read from this file.
A special array for holding a list of strings.
String joinIntoString(StringRef separatorString, int startIndex=0, int numberOfElements=-1) const
Joins the strings in the array together into one string.
void removeEmptyStrings(bool removeWhitespaceStrings=true)
Removes empty strings from the array.
void addArray(const StringArray &other, int startIndex=0, int numElementsToAdd=-1)
Appends some strings from another array to the end of this one.
void removeDuplicates(bool ignoreCase)
Removes any duplicated elements from the array.
void trim()
Deletes any whitespace characters from the starts and ends of all the strings.
bool startsWithChar(juce_wchar character) const noexcept
Tests whether the string begins with a particular character.