OpenShot Audio Library | OpenShotAudio: juce_OggVorbisAudioFormat.h Source File

OpenShot Audio Library | OpenShotAudio 0.3.0

Loading...
Searching...
No Matches
juce_OggVorbisAudioFormat.h
1/*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2017 - ROLI Ltd.
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 5 End-User License
11 Agreement and JUCE 5 Privacy Policy (both updated and effective as of the
12 27th April 2017).
13
14 End User License Agreement: www.juce.com/juce-5-licence
15 Privacy Policy: www.juce.com/juce-5-privacy-policy
16
17 Or: You may also use this code under the terms of the GPL v3 (see
18 www.gnu.org/licenses).
19
20 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
21 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
22 DISCLAIMED.
23
24 ==============================================================================
25*/
26
27namespace juce
28{
29
30#if JUCE_USE_OGGVORBIS || defined (DOXYGEN)
31
32//==============================================================================
42class JUCE_API OggVorbisAudioFormat : public AudioFormat
43{
44public:
45 //==============================================================================
46 OggVorbisAudioFormat();
47 ~OggVorbisAudioFormat() override;
48
49 //==============================================================================
50 Array<int> getPossibleSampleRates() override;
51 Array<int> getPossibleBitDepths() override;
52 bool canDoStereo() override;
53 bool canDoMono() override;
54 bool isCompressed() override;
55 StringArray getQualityOptions() override;
56
57 //==============================================================================
66 int estimateOggFileQuality (const File& source);
67
68 //==============================================================================
74 static const char* const encoderName;
75
76 static const char* const id3title;
77 static const char* const id3artist;
78 static const char* const id3album;
79 static const char* const id3comment;
80 static const char* const id3date;
81 static const char* const id3genre;
82 static const char* const id3trackNumber;
84 //==============================================================================
85 AudioFormatReader* createReaderFor (InputStream* sourceStream,
86 bool deleteStreamIfOpeningFails) override;
87
88 AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo,
89 double sampleRateToUse,
90 unsigned int numberOfChannels,
91 int bitsPerSample,
92 const StringPairArray& metadataValues,
93 int qualityOptionIndex) override;
94 using AudioFormat::createWriterFor;
95
96private:
97 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OggVorbisAudioFormat)
98};
99
100
101#endif
102
103} // namespace juce