OpenShot Library | OpenShotAudio 0.2.2
juce_FlacAudioFormat.h
1
2/** @weakgroup juce_audio_formats-codecs
3 * @{
4 */
5/*
6 ==============================================================================
7
8 This file is part of the JUCE library.
9 Copyright (c) 2017 - ROLI Ltd.
10
11 JUCE is an open source library subject to commercial or open-source
12 licensing.
13
14 By using JUCE, you agree to the terms of both the JUCE 5 End-User License
15 Agreement and JUCE 5 Privacy Policy (both updated and effective as of the
16 27th April 2017).
17
18 End User License Agreement: www.juce.com/juce-5-licence
19 Privacy Policy: www.juce.com/juce-5-privacy-policy
20
21 Or: You may also use this code under the terms of the GPL v3 (see
22 www.gnu.org/licenses).
23
24 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
25 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
26 DISCLAIMED.
27
28 ==============================================================================
29*/
30
31namespace juce
32{
33
34#if JUCE_USE_FLAC || defined (DOXYGEN)
35
36//==============================================================================
37/**
38 Reads and writes the lossless-compression FLAC audio format.
39
40 To compile this, you'll need to set the JUCE_USE_FLAC flag.
41
42 @see AudioFormat
43
44 @tags{Audio}
45*/
47{
48public:
49 //==============================================================================
51 ~FlacAudioFormat() override;
52
53 //==============================================================================
56 bool canDoStereo() override;
57 bool canDoMono() override;
58 bool isCompressed() override;
60
61 //==============================================================================
63 bool deleteStreamIfOpeningFails) override;
64
66 double sampleRateToUse,
67 unsigned int numberOfChannels,
68 int bitsPerSample,
69 const StringPairArray& metadataValues,
70 int qualityOptionIndex) override;
72
73private:
74 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FlacAudioFormat)
75};
76
77
78#endif
79
80} // namespace juce
81
82/** @}*/
Reads samples from an audio file stream.
Writes samples to an audio file stream.
Subclasses of AudioFormat are used to read and write different audio file formats.
virtual AudioFormatWriter * createWriterFor(OutputStream *streamToWriteTo, double sampleRateToUse, unsigned int numberOfChannels, int bitsPerSample, const StringPairArray &metadataValues, int qualityOptionIndex)=0
Tries to create an object that can write to a stream with this audio format.
Reads and writes the lossless-compression FLAC audio format.
bool isCompressed() override
Returns true if the format uses compressed data.
bool canDoStereo() override
Returns true if the format can do 2-channel audio.
AudioFormatWriter * createWriterFor(OutputStream *streamToWriteTo, double sampleRateToUse, unsigned int numberOfChannels, int bitsPerSample, const StringPairArray &metadataValues, int qualityOptionIndex) override
Tries to create an object that can write to a stream with this audio format.
Array< int > getPossibleSampleRates() override
Returns a set of sample rates that the format can read and write.
bool canDoMono() override
Returns true if the format can do 1-channel audio.
AudioFormatReader * createReaderFor(InputStream *sourceStream, bool deleteStreamIfOpeningFails) override
Tries to create an object that can read from a stream containing audio data in this format.
Array< int > getPossibleBitDepths() override
Returns a set of bit depths that the format can read and write.
StringArray getQualityOptions() override
Returns a list of different qualities that can be used when writing.
The base class for streams that read data.
The base class for streams that write data to some kind of destination.
A special array for holding a list of strings.
A container for holding a set of strings which are keyed by another string.
#define JUCE_API
This macro is added to all JUCE public class declarations.