OpenShot Audio Library | OpenShotAudio 0.4.0

Loading...
Searching...
No Matches
juce_CoreAudioFormat.h
1/*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2022 - Raw Material Software Limited
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 By using JUCE, you agree to the terms of both the JUCE 7 End-User License
11 Agreement and JUCE Privacy Policy.
12
13 End User License Agreement: www.juce.com/juce-7-licence
14 Privacy Policy: www.juce.com/juce-privacy-policy
15
16 Or: You may also use this code under the terms of the GPL v3 (see
17 www.gnu.org/licenses).
18
19 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
20 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
21 DISCLAIMED.
22
23 ==============================================================================
24*/
25
26 namespace juce
27{
28
29#if JUCE_MAC || JUCE_IOS || DOXYGEN
30
31//==============================================================================
42 class JUCE_API CoreAudioFormat : public AudioFormat
43{
44 public:
46 enum class StreamKind
47 {
48 kNone,
49 kAiff,
50 kAifc,
51 kWave,
52 kSoundDesigner2,
53 kNext,
54 kMp3,
55 kMp2,
56 kMp1,
57 kAc3,
58 kAacAdts,
59 kMpeg4,
60 kM4a,
61 kM4b,
62 kCaf,
63 k3gp,
64 k3gp2,
65 kAmr,
66 };
67
68 //==============================================================================
70 CoreAudioFormat();
71
75 explicit CoreAudioFormat (StreamKind);
76
78 ~CoreAudioFormat() override;
79
80 //==============================================================================
82 static const char* const midiDataBase64;
84 static const char* const tempo;
86 static const char* const timeSig;
88 static const char* const keySig;
89
90 //==============================================================================
91 Array<int> getPossibleSampleRates() override;
92 Array<int> getPossibleBitDepths() override;
93 bool canDoStereo() override;
94 bool canDoMono() override;
95
96 //==============================================================================
97 AudioFormatReader* createReaderFor (InputStream*,
98 bool deleteStreamIfOpeningFails) override;
99
100 AudioFormatWriter* createWriterFor (OutputStream*,
101 double sampleRateToUse,
102 unsigned int numberOfChannels,
103 int bitsPerSample,
104 const StringPairArray& metadataValues,
105 int qualityOptionIndex) override;
106 using AudioFormat::createWriterFor;
107
108 private:
109 StreamKind streamKind = StreamKind::kNone;
110
111 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CoreAudioFormat)
112};
113
114#endif
115
116} // namespace juce