OpenShot Audio Library | OpenShotAudio: juce_AudioFormatManager.h Source File

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//==============================================================================
41 class JUCE_API AudioFormatManager
42{
43public:
44 //==============================================================================
50 AudioFormatManager();
51
53 ~AudioFormatManager();
54
55 //==============================================================================
64 void registerFormat (AudioFormat* newFormat,
65 bool makeThisTheDefaultFormat);
66
71 void registerBasicFormats();
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
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