OpenShot Library | OpenShotAudio  0.2.2
juce_CoreAudioFormat.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_MAC || JUCE_IOS || DOXYGEN
35 
36 //==============================================================================
37 /**
38  OSX and iOS only - This uses the AudioToolbox framework to read any audio
39  format that the system has a codec for.
40 
41  This should be able to understand formats such as mp3, m4a, etc.
42 
43  @see AudioFormat
44 
45  @tags{Audio}
46 */
48 {
49 public:
50  //==============================================================================
51  /** Creates a format object. */
53 
54  /** Destructor. */
55  ~CoreAudioFormat() override;
56 
57  //==============================================================================
58  /** Metadata property name used when reading a caf file with a MIDI chunk. */
59  static const char* const midiDataBase64;
60  /** Metadata property name used when reading a caf file with tempo information. */
61  static const char* const tempo;
62  /** Metadata property name used when reading a caf file time signature information. */
63  static const char* const timeSig;
64  /** Metadata property name used when reading a caf file time signature information. */
65  static const char* const keySig;
66 
67  //==============================================================================
68  Array<int> getPossibleSampleRates() override;
69  Array<int> getPossibleBitDepths() override;
70  bool canDoStereo() override;
71  bool canDoMono() override;
72 
73  //==============================================================================
74  AudioFormatReader* createReaderFor (InputStream*,
75  bool deleteStreamIfOpeningFails) override;
76 
77  AudioFormatWriter* createWriterFor (OutputStream*,
78  double sampleRateToUse,
79  unsigned int numberOfChannels,
80  int bitsPerSample,
81  const StringPairArray& metadataValues,
82  int qualityOptionIndex) override;
84 
85 private:
86  JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CoreAudioFormat)
87 };
88 
89 #endif
90 
91 } // namespace juce
92 
93 /** @}*/
#define JUCE_API
This macro is added to all JUCE public class declarations.
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 keySig
Metadata property name used when reading a caf file time signature information.
Subclasses of AudioFormat are used to read and write different audio file formats.
OSX and iOS only - This uses the AudioToolbox framework to read any audio format that the system has ...
The base class for streams that write data to some kind of destination.
Writes samples to an audio file stream.
static const char *const tempo
Metadata property name used when reading a caf file with tempo information.
static const char *const timeSig
Metadata property name used when reading a caf file time signature information.
A container for holding a set of strings which are keyed by another string.
Reads samples from an audio file stream.
static const char *const midiDataBase64
Metadata property name used when reading a caf file with a MIDI chunk.