OpenShot Audio Library | OpenShotAudio 0.4.0
 
Loading...
Searching...
No Matches
juce_AudioFormatManager.h
1/*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2022 - Raw Material Software Limited
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 By using JUCE, you agree to the terms of both the JUCE 7 End-User License
11 Agreement and JUCE Privacy Policy.
12
13 End User License Agreement: www.juce.com/juce-7-licence
14 Privacy Policy: www.juce.com/juce-privacy-policy
15
16 Or: You may also use this code under the terms of the GPL v3 (see
17 www.gnu.org/licenses).
18
19 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
20 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
21 DISCLAIMED.
22
23 ==============================================================================
24*/
25
26namespace juce
27{
28
29//==============================================================================
41class JUCE_API AudioFormatManager
42{
43public:
44 //==============================================================================
51
54
55 //==============================================================================
64 void registerFormat (AudioFormat* newFormat,
65 bool makeThisTheDefaultFormat);
66
72
74 void clearFormats();
75
77 int getNumKnownFormats() const;
78
80 AudioFormat* getKnownFormat (int index) const;
81
83 AudioFormat** begin() noexcept { return knownFormats.begin(); }
84
86 AudioFormat* const* begin() const noexcept { return knownFormats.begin(); }
87
89 AudioFormat** end() noexcept { return knownFormats.end(); }
90
92 AudioFormat* const* end() const noexcept { return knownFormats.end(); }
93
99 AudioFormat* findFormatForFileExtension (const String& fileExtension) const;
100
110 AudioFormat* getDefaultFormat() const;
111
117 String getWildcardForAllFormats() const;
118
119 //==============================================================================
126 AudioFormatReader* createReaderFor (const File& audioFile);
127
140 AudioFormatReader* createReaderFor (std::unique_ptr<InputStream> audioFileStream);
141
142private:
143 //==============================================================================
144 OwnedArray<AudioFormat> knownFormats;
145 int defaultFormatIndex = 0;
146
147 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioFormatManager)
148};
149
150} // namespace juce
AudioFormat ** end() noexcept
AudioFormat *const * begin() const noexcept
AudioFormat * getKnownFormat(int index) const
void registerFormat(AudioFormat *newFormat, bool makeThisTheDefaultFormat)
AudioFormat *const * end() const noexcept
AudioFormat ** begin() noexcept