Loading...
Searching...
No Matches
juce_AudioFormatManager.h
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2022 - Raw Material Software Limited
JUCE is an open source library subject to commercial or open-source
licensing.
By using JUCE, you agree to the terms of both the JUCE 7 End-User License
Agreement and JUCE Privacy Policy.
End User License Agreement: www.juce.com/juce-7-licence
Privacy Policy: www.juce.com/juce-privacy-policy
Or: You may also use this code under the terms of the GPL v3 (see
www.gnu.org/licenses).
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
DISCLAIMED.
==============================================================================
*/
namespace juce
{
//==============================================================================
class JUCE_API AudioFormatManager
{
public:
//==============================================================================
AudioFormatManager();
~AudioFormatManager();
//==============================================================================
void registerFormat (AudioFormat* newFormat,
bool makeThisTheDefaultFormat);
void registerBasicFormats();
void clearFormats();
int getNumKnownFormats() const;
AudioFormat* getKnownFormat (int index) const;
AudioFormat** begin() noexcept { return knownFormats.begin(); }
AudioFormat* const* begin() const noexcept { return knownFormats.begin(); }
AudioFormat** end() noexcept { return knownFormats.end(); }
AudioFormat* const* end() const noexcept { return knownFormats.end(); }
AudioFormat* findFormatForFileExtension (const String& fileExtension) const;
AudioFormat* getDefaultFormat() const;
String getWildcardForAllFormats() const;
//==============================================================================
AudioFormatReader* createReaderFor (const File& audioFile);
AudioFormatReader* createReaderFor (std::unique_ptr<InputStream> audioFileStream);
private:
//==============================================================================
OwnedArray<AudioFormat> knownFormats;
int defaultFormatIndex = 0;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioFormatManager)
};
} // namespace juce
juce::AudioFormatManager
Definition juce_AudioFormatManager.h:42
juce::AudioFormatManager::end
AudioFormat ** end() noexcept
Definition juce_AudioFormatManager.h:89
juce::AudioFormatManager::begin
AudioFormat *const * begin() const noexcept
Definition juce_AudioFormatManager.h:86
juce::AudioFormatManager::AudioFormatManager
AudioFormatManager()
Definition juce_AudioFormatManager.cpp:29
juce::AudioFormatManager::getKnownFormat
AudioFormat * getKnownFormat(int index) const
Definition juce_AudioFormatManager.cpp:87
juce::AudioFormatManager::registerFormat
void registerFormat(AudioFormat *newFormat, bool makeThisTheDefaultFormat)
Definition juce_AudioFormatManager.cpp:33
juce::AudioFormatManager::end
AudioFormat *const * end() const noexcept
Definition juce_AudioFormatManager.h:92
juce::AudioFormatManager::getNumKnownFormats
int getNumKnownFormats() const
Definition juce_AudioFormatManager.cpp:86
juce::AudioFormatManager::clearFormats
void clearFormats()
Definition juce_AudioFormatManager.cpp:80
juce::AudioFormatManager::registerBasicFormats
void registerBasicFormats()
Definition juce_AudioFormatManager.cpp:54
juce::AudioFormatManager::begin
AudioFormat ** begin() noexcept
Definition juce_AudioFormatManager.h:83
juce::AudioFormatReader
Definition juce_AudioFormatReader.h:44
juce::AudioFormat
Definition juce_AudioFormat.h:39
juce::File
Definition juce_File.h:45
juce::OwnedArray
Definition juce_OwnedArray.h:50
juce::String
Definition juce_String.h:53