35 jassert (newFormat !=
nullptr);
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))
149 audioFileStream.release();
153 audioFileStream->setPosition (originalStreamPos);
157 jassert (audioFileStream->getPosition() == originalStreamPos);
std::unique_ptr< 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