OpenShot Library | libopenshot-audio  0.2.0
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;
83 
84 private:
85  JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CoreAudioFormat)
86 };
87 
88 #endif
89 
90 } // namespace juce
91 
92 /** @}*/
juce::InputStream
The base class for streams that read data.
Definition: juce_InputStream.h:40
juce::AudioFormat
Subclasses of AudioFormat are used to read and write different audio file formats.
Definition: juce_AudioFormat.h:43
juce::Array< int >
JUCE_API
#define JUCE_API
This macro is added to all JUCE public class declarations.
Definition: juce_StandardHeader.h:143
juce::CoreAudioFormat::tempo
static const char *const tempo
Metadata property name used when reading a caf file with tempo information.
Definition: juce_CoreAudioFormat.h:61
juce::OutputStream
The base class for streams that write data to some kind of destination.
Definition: juce_OutputStream.h:41
juce::CoreAudioFormat
OSX and iOS only - This uses the AudioToolbox framework to read any audio format that the system has ...
Definition: juce_CoreAudioFormat.h:47
juce::StringPairArray
A container for holding a set of strings which are keyed by another string.
Definition: juce_StringPairArray.h:38
juce::CoreAudioFormat::midiDataBase64
static const char *const midiDataBase64
Metadata property name used when reading a caf file with a MIDI chunk.
Definition: juce_CoreAudioFormat.h:59
juce::CoreAudioFormat::timeSig
static const char *const timeSig
Metadata property name used when reading a caf file time signature information.
Definition: juce_CoreAudioFormat.h:63
juce::AudioFormatWriter
Writes samples to an audio file stream.
Definition: juce_AudioFormatWriter.h:48
juce::AudioFormatReader
Reads samples from an audio file stream.
Definition: juce_AudioFormatReader.h:48
juce::CoreAudioFormat::keySig
static const char *const keySig
Metadata property name used when reading a caf file time signature information.
Definition: juce_CoreAudioFormat.h:65