OpenShot Audio Library | OpenShotAudio: juce_AudioFormatManager.h Source File

OpenShot Audio Library | OpenShotAudio 0.3.2

Loading...
Searching...
No Matches
juce_AudioFormatManager.h
1/*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2017 - ROLI Ltd.
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 5 End-User License
11 Agreement and JUCE 5 Privacy Policy (both updated and effective as of the
12 27th April 2017).
13
14 End User License Agreement: www.juce.com/juce-5-licence
15 Privacy Policy: www.juce.com/juce-5-privacy-policy
16
17 Or: You may also use this code under the terms of the GPL v3 (see
18 www.gnu.org/licenses).
19
20 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
21 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
22 DISCLAIMED.
23
24 ==============================================================================
25*/
26
27namespace juce
28{
29
30//==============================================================================
42 class JUCE_API AudioFormatManager
43{
44public:
45 //==============================================================================
51 AudioFormatManager();
52
54 ~AudioFormatManager();
55
56 //==============================================================================
65 void registerFormat (AudioFormat* newFormat,
66 bool makeThisTheDefaultFormat);
67
72 void registerBasicFormats();
73
75 void clearFormats();
76
78 int getNumKnownFormats() const;
79
81 AudioFormat* getKnownFormat (int index) const;
82
84 AudioFormat** begin() noexcept { return knownFormats.begin(); }
85
87 AudioFormat* const* begin() const noexcept { return knownFormats.begin(); }
88
90 AudioFormat** end() noexcept { return knownFormats.end(); }
91
93 AudioFormat* const* end() const noexcept { return knownFormats.end(); }
94
100 AudioFormat* findFormatForFileExtension (const String& fileExtension) const;
101
111 AudioFormat* getDefaultFormat() const;
112
118 String getWildcardForAllFormats() const;
119
120 //==============================================================================
127 AudioFormatReader* createReaderFor (const File& audioFile);
128
141 AudioFormatReader* createReaderFor (InputStream* audioFileStream);
142
143private:
144 //==============================================================================
145 OwnedArray<AudioFormat> knownFormats;
146 int defaultFormatIndex = 0;
147
148 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioFormatManager)
149};
150
151} // namespace juce
juce::AudioFormatManager
Definition: juce_AudioFormatManager.h:43
juce::AudioFormatManager::end
AudioFormat ** end() noexcept
Definition: juce_AudioFormatManager.h:90
juce::AudioFormatManager::begin
AudioFormat *const * begin() const noexcept
Definition: juce_AudioFormatManager.h:87
juce::AudioFormatManager::end
AudioFormat *const * end() const noexcept
Definition: juce_AudioFormatManager.h:93
juce::AudioFormatManager::begin
AudioFormat ** begin() noexcept
Definition: juce_AudioFormatManager.h:84
juce::AudioFormatReader
Definition: juce_AudioFormatReader.h:45
juce::AudioFormat
Definition: juce_AudioFormat.h:40
juce::File
Definition: juce_File.h:41
juce::InputStream
Definition: juce_InputStream.h:37
juce::OwnedArray
Definition: juce_OwnedArray.h:51
juce::String
Definition: juce_String.h:39