OpenShot Library | libopenshot-audio  0.2.0
juce_MP3AudioFormat.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 
31 namespace juce
32 {
33 
34 #if JUCE_USE_MP3AUDIOFORMAT || DOXYGEN
35 
36 //==============================================================================
37 /**
38  Software-based MP3 decoding format (doesn't currently provide an encoder).
39 
40  IMPORTANT DISCLAIMER: By choosing to enable the JUCE_USE_MP3AUDIOFORMAT flag and
41  to compile the MP3 code into your software, you do so AT YOUR OWN RISK! By doing so,
42  you are agreeing that ROLI Ltd. is in no way responsible for any patent, copyright,
43  or other legal issues that you may suffer as a result.
44 
45  The code in juce_MP3AudioFormat.cpp is NOT guaranteed to be free from infringements of 3rd-party
46  intellectual property. If you wish to use it, please seek your own independent advice about the
47  legality of doing so. If you are not willing to accept full responsibility for the consequences
48  of using this code, then do not enable the JUCE_USE_MP3AUDIOFORMAT setting.
49 
50  @tags{Audio}
51 */
53 {
54 public:
55  //==============================================================================
57  ~MP3AudioFormat();
58 
59  //==============================================================================
62  bool canDoStereo() override;
63  bool canDoMono() override;
64  bool isCompressed() override;
65  StringArray getQualityOptions() override;
66 
67  //==============================================================================
68  AudioFormatReader* createReaderFor (InputStream*, bool deleteStreamIfOpeningFails) override;
69 
70  AudioFormatWriter* createWriterFor (OutputStream*, double sampleRateToUse,
71  unsigned int numberOfChannels, int bitsPerSample,
72  const StringPairArray& metadataValues, int qualityOptionIndex) override;
73 };
74 
75 #endif
76 
77 } // namespace juce
78 
79 /** @}*/
bool canDoMono() override
Returns true if the format can do 1-channel audio.
AudioFormatWriter * createWriterFor(OutputStream *, 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.
AudioFormatReader * createReaderFor(InputStream *, bool deleteStreamIfOpeningFails) override
Tries to create an object that can read from a stream containing audio data in this format...
Array< int > getPossibleSampleRates() override
Returns a set of sample rates that the format can read and write.
The base class for streams that read data.
bool canDoStereo() override
Returns true if the format can do 2-channel audio.
A special array for holding a list of strings.
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.
bool isCompressed() override
Returns true if the format uses compressed data.
Subclasses of AudioFormat are used to read and write different audio file formats.
The base class for streams that write data to some kind of destination.
Software-based MP3 decoding format (doesn&#39;t currently provide an encoder).
Writes samples to an audio file stream.
A container for holding a set of strings which are keyed by another string.
Reads samples from an audio file stream.