36 jassert (newFormat !=
nullptr);
38 if (newFormat !=
nullptr)
41 for (
auto* af : knownFormats)
48 if (makeThisTheDefaultFormat)
51 knownFormats.add (newFormat);
64 #if JUCE_USE_OGGVORBIS
68 #if JUCE_MAC || JUCE_IOS
72 #if JUCE_USE_MP3AUDIOFORMAT
76 #if JUCE_USE_WINDOWS_MEDIA_FORMAT
84 defaultFormatIndex = 0;
96 for (
auto* af : knownFormats)
97 if (af->getFileExtensions().contains (fileExtension,
true))
107 for (
auto* af : knownFormats)
108 extensions.
addArray (af->getFileExtensions());
113 for (
auto& e : extensions)
114 e = (e.startsWithChar (
'.') ?
"*" :
"*.") + e;
127 for (
auto* af : knownFormats)
128 if (af->canHandleFile (file))
130 if (
auto* r = af->createReaderFor (in,
true))
142 if (audioFileStream !=
nullptr)
144 std::unique_ptr<InputStream> in (audioFileStream);
145 auto originalStreamPos = in->getPosition();
147 for (
auto* af : knownFormats)
149 if (
auto* r = af->createReaderFor (in.get(),
false))
155 in->setPosition (originalStreamPos);
159 jassert (in->getPosition() == originalStreamPos);
FileInputStream * createInputStream() const
String joinIntoString(StringRef separatorString, int startIndex=0, int numberOfElements=-1) const
void removeEmptyStrings(bool removeWhitespaceStrings=true)
void addArray(const StringArray &other, int startIndex=0, int numElementsToAdd=-1)
void removeDuplicates(bool ignoreCase)
bool startsWithChar(juce_wchar character) const noexcept