OpenShot Library | OpenShotAudio  0.2.1
juce_AiffAudioFormat.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 //==============================================================================
35 /**
36  Reads and Writes AIFF format audio files.
37 
38  @see AudioFormat
39 
40  @tags{Audio}
41 */
43 {
44 public:
45  //==============================================================================
46  /** Creates an format object. */
48 
49  /** Destructor. */
50  ~AiffAudioFormat() override;
51 
52  //==============================================================================
53  /** Metadata property name used when reading a aiff file with a basc chunk. */
54  static const char* const appleOneShot;
55  /** Metadata property name used when reading a aiff file with a basc chunk. */
56  static const char* const appleRootSet;
57  /** Metadata property name used when reading a aiff file with a basc chunk. */
58  static const char* const appleRootNote;
59  /** Metadata property name used when reading a aiff file with a basc chunk. */
60  static const char* const appleBeats;
61  /** Metadata property name used when reading a aiff file with a basc chunk. */
62  static const char* const appleDenominator;
63  /** Metadata property name used when reading a aiff file with a basc chunk. */
64  static const char* const appleNumerator;
65  /** Metadata property name used when reading a aiff file with a basc chunk. */
66  static const char* const appleTag;
67  /** Metadata property name used when reading a aiff file with a basc chunk. */
68  static const char* const appleKey;
69 
70  //==============================================================================
71  Array<int> getPossibleSampleRates() override;
72  Array<int> getPossibleBitDepths() override;
73  bool canDoStereo() override;
74  bool canDoMono() override;
75 
76  #if JUCE_MAC
77  bool canHandleFile (const File& fileToTest) override;
78  #endif
79 
80  //==============================================================================
81  AudioFormatReader* createReaderFor (InputStream* sourceStream,
82  bool deleteStreamIfOpeningFails) override;
83 
84  MemoryMappedAudioFormatReader* createMemoryMappedReader (const File&) override;
85  MemoryMappedAudioFormatReader* createMemoryMappedReader (FileInputStream*) override;
86 
87  AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo,
88  double sampleRateToUse,
89  unsigned int numberOfChannels,
90  int bitsPerSample,
91  const StringPairArray& metadataValues,
92  int qualityOptionIndex) override;
94 
95 private:
96  JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(AiffAudioFormat)
97 };
98 
99 } // namespace juce
100 
101 /** @}*/
Reads and Writes AIFF format audio files.
#define JUCE_API
This macro is added to all JUCE public class declarations.
static const char *const appleRootSet
Metadata property name used when reading a aiff file with a basc chunk.
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.
The base class for streams that read data.
static const char *const appleOneShot
Metadata property name used when reading a aiff file with a basc chunk.
Subclasses of AudioFormat are used to read and write different audio file formats.
Represents a local file or directory.
Definition: juce_File.h:44
The base class for streams that write data to some kind of destination.
static const char *const appleKey
Metadata property name used when reading a aiff file with a basc chunk.
An input stream that reads from a local file.
Writes samples to an audio file stream.
static const char *const appleBeats
Metadata property name used when reading a aiff file with a basc chunk.
static const char *const appleRootNote
Metadata property name used when reading a aiff file with a basc chunk.
static const char *const appleTag
Metadata property name used when reading a aiff file with a basc chunk.
A container for holding a set of strings which are keyed by another string.
Reads samples from an audio file stream.
A specialised type of AudioFormatReader that uses a MemoryMappedFile to read directly from an audio f...
static const char *const appleDenominator
Metadata property name used when reading a aiff file with a basc chunk.
static const char *const appleNumerator
Metadata property name used when reading a aiff file with a basc chunk.