OpenShot Audio Library | OpenShotAudio: juce_AudioFormat.h Source File

OpenShot Audio Library | OpenShotAudio 0.3.2

Loading...
Searching...
No Matches
juce_AudioFormat.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//==============================================================================
39 class JUCE_API AudioFormat
40{
41public:
42 //==============================================================================
44 virtual ~AudioFormat();
45
46 //==============================================================================
50 const String& getFormatName() const;
51
52 //==============================================================================
58 virtual StringArray getFileExtensions() const;
59
65 virtual bool canHandleFile (const File& fileToTest);
66
68 virtual Array<int> getPossibleSampleRates() = 0;
69
71 virtual Array<int> getPossibleBitDepths() = 0;
72
74 virtual bool canDoStereo() = 0;
75
77 virtual bool canDoMono() = 0;
78
80 virtual bool isCompressed();
81
83 virtual bool isChannelLayoutSupported (const AudioChannelSet& channelSet);
84
93 virtual StringArray getQualityOptions();
94
95 //==============================================================================
111 virtual AudioFormatReader* createReaderFor (InputStream* sourceStream,
112 bool deleteStreamIfOpeningFails) = 0;
113
117 virtual MemoryMappedAudioFormatReader* createMemoryMappedReader (const File& file);
118 virtual MemoryMappedAudioFormatReader* createMemoryMappedReader (FileInputStream* fin);
119
150 virtual AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo,
151 double sampleRateToUse,
152 unsigned int numberOfChannels,
153 int bitsPerSample,
154 const StringPairArray& metadataValues,
155 int qualityOptionIndex) = 0;
156
188 virtual AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo,
189 double sampleRateToUse,
190 const AudioChannelSet& channelLayout,
191 int bitsPerSample,
192 const StringPairArray& metadataValues,
193 int qualityOptionIndex);
194
195protected:
201 AudioFormat (String formatName, StringArray fileExtensions);
202
209 AudioFormat (StringRef formatName, StringRef fileExtensions);
210
211private:
212 //==============================================================================
213 String formatName;
214 StringArray fileExtensions;
215};
216
217} // namespace juce
juce::Array
Definition: juce_Array.h:56
juce::AudioChannelSet
Definition: juce_AudioChannelSet.h:47
juce::AudioFormatReader
Definition: juce_AudioFormatReader.h:45
juce::AudioFormatWriter
Definition: juce_AudioFormatWriter.h:45
juce::AudioFormat
Definition: juce_AudioFormat.h:40
juce::AudioFormat::createWriterFor
virtual AudioFormatWriter * createWriterFor(OutputStream *streamToWriteTo, double sampleRateToUse, unsigned int numberOfChannels, int bitsPerSample, const StringPairArray &metadataValues, int qualityOptionIndex)=0
juce::AudioFormat::canDoStereo
virtual bool canDoStereo()=0
juce::AudioFormat::canDoMono
virtual bool canDoMono()=0
juce::AudioFormat::getPossibleBitDepths
virtual Array< int > getPossibleBitDepths()=0
juce::AudioFormat::createReaderFor
virtual AudioFormatReader * createReaderFor(InputStream *sourceStream, bool deleteStreamIfOpeningFails)=0
juce::AudioFormat::getPossibleSampleRates
virtual Array< int > getPossibleSampleRates()=0
juce::FileInputStream
Definition: juce_FileInputStream.h:35
juce::File
Definition: juce_File.h:41
juce::InputStream
Definition: juce_InputStream.h:37
juce::MemoryMappedAudioFormatReader
Definition: juce_MemoryMappedAudioFormatReader.h:48
juce::OutputStream
Definition: juce_OutputStream.h:38
juce::StringArray
Definition: juce_StringArray.h:35
juce::StringPairArray
Definition: juce_StringPairArray.h:35
juce::StringRef
Definition: juce_StringRef.h:62
juce::String
Definition: juce_String.h:39