OpenShot Audio Library | OpenShotAudio: juce_WavAudioFormat.h Source File

OpenShot Audio Library | OpenShotAudio 0.3.2

Loading...
Searching...
No Matches
juce_WavAudioFormat.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//==============================================================================
38 class JUCE_API WavAudioFormat : public AudioFormat
39{
40public:
41 //==============================================================================
43 WavAudioFormat();
44
46 ~WavAudioFormat() override;
47
48 //==============================================================================
49 // BWAV chunk properties:
50
51 static const char* const bwavDescription;
52 static const char* const bwavOriginator;
53 static const char* const bwavOriginatorRef;
54 static const char* const bwavOriginationDate;
55 static const char* const bwavOriginationTime;
56 static const char* const bwavCodingHistory;
66 static const char* const bwavTimeReference;
67
73 static StringPairArray createBWAVMetadata (const String& description,
74 const String& originator,
75 const String& originatorRef,
76 Time dateAndTime,
77 int64 timeReferenceSamples,
78 const String& codingHistory);
79
80 //==============================================================================
81 // 'acid' chunk properties:
82
83 static const char* const acidOneShot;
84 static const char* const acidRootSet;
85 static const char* const acidStretch;
86 static const char* const acidDiskBased;
87 static const char* const acidizerFlag;
88 static const char* const acidRootNote;
89 static const char* const acidBeats;
90 static const char* const acidDenominator;
91 static const char* const acidNumerator;
92 static const char* const acidTempo;
94 //==============================================================================
95 // INFO chunk properties:
96
97 static const char* const riffInfoArchivalLocation;
98 static const char* const riffInfoArtist;
99 static const char* const riffInfoBaseURL;
100 static const char* const riffInfoCinematographer;
101 static const char* const riffInfoComment;
102 static const char* const riffInfoComment2;
103 static const char* const riffInfoComments;
104 static const char* const riffInfoCommissioned;
105 static const char* const riffInfoCopyright;
106 static const char* const riffInfoCostumeDesigner;
107 static const char* const riffInfoCountry;
108 static const char* const riffInfoCropped;
109 static const char* const riffInfoDateCreated;
110 static const char* const riffInfoDateTimeOriginal;
111 static const char* const riffInfoDefaultAudioStream;
112 static const char* const riffInfoDimension;
113 static const char* const riffInfoDirectory;
114 static const char* const riffInfoDistributedBy;
115 static const char* const riffInfoDotsPerInch;
116 static const char* const riffInfoEditedBy;
117 static const char* const riffInfoEighthLanguage;
118 static const char* const riffInfoEncodedBy;
119 static const char* const riffInfoEndTimecode;
120 static const char* const riffInfoEngineer;
121 static const char* const riffInfoFifthLanguage;
122 static const char* const riffInfoFirstLanguage;
123 static const char* const riffInfoFourthLanguage;
124 static const char* const riffInfoGenre;
125 static const char* const riffInfoKeywords;
126 static const char* const riffInfoLanguage;
127 static const char* const riffInfoLength;
128 static const char* const riffInfoLightness;
129 static const char* const riffInfoLocation;
130 static const char* const riffInfoLogoIconURL;
131 static const char* const riffInfoLogoURL;
132 static const char* const riffInfoMedium;
133 static const char* const riffInfoMoreInfoBannerImage;
134 static const char* const riffInfoMoreInfoBannerURL;
135 static const char* const riffInfoMoreInfoText;
136 static const char* const riffInfoMoreInfoURL;
137 static const char* const riffInfoMusicBy;
138 static const char* const riffInfoNinthLanguage;
139 static const char* const riffInfoNumberOfParts;
140 static const char* const riffInfoOrganisation;
141 static const char* const riffInfoPart;
142 static const char* const riffInfoProducedBy;
143 static const char* const riffInfoProductName;
144 static const char* const riffInfoProductionDesigner;
145 static const char* const riffInfoProductionStudio;
146 static const char* const riffInfoRate;
147 static const char* const riffInfoRated;
148 static const char* const riffInfoRating;
149 static const char* const riffInfoRippedBy;
150 static const char* const riffInfoSecondaryGenre;
151 static const char* const riffInfoSecondLanguage;
152 static const char* const riffInfoSeventhLanguage;
153 static const char* const riffInfoSharpness;
154 static const char* const riffInfoSixthLanguage;
155 static const char* const riffInfoSoftware;
156 static const char* const riffInfoSoundSchemeTitle;
157 static const char* const riffInfoSource;
158 static const char* const riffInfoSourceFrom;
159 static const char* const riffInfoStarring_ISTR;
160 static const char* const riffInfoStarring_STAR;
161 static const char* const riffInfoStartTimecode;
162 static const char* const riffInfoStatistics;
163 static const char* const riffInfoSubject;
164 static const char* const riffInfoTapeName;
165 static const char* const riffInfoTechnician;
166 static const char* const riffInfoThirdLanguage;
167 static const char* const riffInfoTimeCode;
168 static const char* const riffInfoTitle;
169 static const char* const riffInfoTrackNo;
170 static const char* const riffInfoTrackNumber;
171 static const char* const riffInfoURL;
172 static const char* const riffInfoVegasVersionMajor;
173 static const char* const riffInfoVegasVersionMinor;
174 static const char* const riffInfoVersion;
175 static const char* const riffInfoWatermarkURL;
176 static const char* const riffInfoWrittenBy;
177 static const char* const riffInfoYear;
179 //==============================================================================
181 static const char* const ISRC;
182
184 static const char* const tracktionLoopInfo;
185
186 //==============================================================================
187 Array<int> getPossibleSampleRates() override;
188 Array<int> getPossibleBitDepths() override;
189 bool canDoStereo() override;
190 bool canDoMono() override;
191 bool isChannelLayoutSupported (const AudioChannelSet& channelSet) override;
192
193 //==============================================================================
194 AudioFormatReader* createReaderFor (InputStream* sourceStream,
195 bool deleteStreamIfOpeningFails) override;
196
197 MemoryMappedAudioFormatReader* createMemoryMappedReader (const File&) override;
198 MemoryMappedAudioFormatReader* createMemoryMappedReader (FileInputStream*) override;
199
200 AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo,
201 double sampleRateToUse,
202 unsigned int numberOfChannels,
203 int bitsPerSample,
204 const StringPairArray& metadataValues,
205 int qualityOptionIndex) override;
206
207 AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo,
208 double sampleRateToUse,
209 const AudioChannelSet& channelLayout,
210 int bitsPerSample,
211 const StringPairArray& metadataValues,
212 int qualityOptionIndex) override;
213 using AudioFormat::createWriterFor;
214
215 //==============================================================================
221 bool replaceMetadataInFile (const File& wavFile, const StringPairArray& newMetadata);
222
223
224private:
225 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WavAudioFormat)
226};
227
228} // namespace juce
juce::Array
Definition: juce_Array.h:56
juce::AudioChannelSet
Definition: juce_AudioChannelSet.h:47
juce::AudioFormatReader
Definition: juce_AudioFormatReader.h:45
juce::AudioFormatWriter
Definition: juce_AudioFormatWriter.h:45
juce::AudioFormat
Definition: juce_AudioFormat.h:40
juce::FileInputStream
Definition: juce_FileInputStream.h:35
juce::File
Definition: juce_File.h:41
juce::InputStream
Definition: juce_InputStream.h:37
juce::MemoryMappedAudioFormatReader
Definition: juce_MemoryMappedAudioFormatReader.h:48
juce::OutputStream
Definition: juce_OutputStream.h:38
juce::StringPairArray
Definition: juce_StringPairArray.h:35
juce::String
Definition: juce_String.h:39
juce::Time
Definition: juce_Time.h:37
juce::WavAudioFormat
Definition: juce_WavAudioFormat.h:39
juce::WavAudioFormat::riffInfoCopyright
static const char *const riffInfoCopyright
Definition: juce_WavAudioFormat.h:105
juce::WavAudioFormat::acidRootSet
static const char *const acidRootSet
Definition: juce_WavAudioFormat.h:84
juce::WavAudioFormat::riffInfoDirectory
static const char *const riffInfoDirectory
Definition: juce_WavAudioFormat.h:113
juce::WavAudioFormat::bwavCodingHistory
static const char *const bwavCodingHistory
Definition: juce_WavAudioFormat.h:56
juce::WavAudioFormat::bwavTimeReference
static const char *const bwavTimeReference
Definition: juce_WavAudioFormat.h:66
juce::WavAudioFormat::acidDiskBased
static const char *const acidDiskBased
Definition: juce_WavAudioFormat.h:86
juce::WavAudioFormat::acidOneShot
static const char *const acidOneShot
Definition: juce_WavAudioFormat.h:83
juce::WavAudioFormat::riffInfoOrganisation
static const char *const riffInfoOrganisation
Definition: juce_WavAudioFormat.h:140
juce::WavAudioFormat::riffInfoFirstLanguage
static const char *const riffInfoFirstLanguage
Definition: juce_WavAudioFormat.h:122
juce::WavAudioFormat::riffInfoEncodedBy
static const char *const riffInfoEncodedBy
Definition: juce_WavAudioFormat.h:118
juce::WavAudioFormat::riffInfoCommissioned
static const char *const riffInfoCommissioned
Definition: juce_WavAudioFormat.h:104
juce::WavAudioFormat::riffInfoMusicBy
static const char *const riffInfoMusicBy
Definition: juce_WavAudioFormat.h:137
juce::WavAudioFormat::riffInfoSharpness
static const char *const riffInfoSharpness
Definition: juce_WavAudioFormat.h:153
juce::WavAudioFormat::riffInfoStatistics
static const char *const riffInfoStatistics
Definition: juce_WavAudioFormat.h:162
juce::WavAudioFormat::riffInfoNinthLanguage
static const char *const riffInfoNinthLanguage
Definition: juce_WavAudioFormat.h:138
juce::WavAudioFormat::riffInfoDefaultAudioStream
static const char *const riffInfoDefaultAudioStream
Definition: juce_WavAudioFormat.h:111
juce::WavAudioFormat::riffInfoGenre
static const char *const riffInfoGenre
Definition: juce_WavAudioFormat.h:124
juce::WavAudioFormat::riffInfoMoreInfoBannerImage
static const char *const riffInfoMoreInfoBannerImage
Definition: juce_WavAudioFormat.h:133
juce::WavAudioFormat::riffInfoVegasVersionMajor
static const char *const riffInfoVegasVersionMajor
Definition: juce_WavAudioFormat.h:172
juce::WavAudioFormat::riffInfoLocation
static const char *const riffInfoLocation
Definition: juce_WavAudioFormat.h:129
juce::WavAudioFormat::riffInfoRate
static const char *const riffInfoRate
Definition: juce_WavAudioFormat.h:146
juce::WavAudioFormat::riffInfoCostumeDesigner
static const char *const riffInfoCostumeDesigner
Definition: juce_WavAudioFormat.h:106
juce::WavAudioFormat::riffInfoVersion
static const char *const riffInfoVersion
Definition: juce_WavAudioFormat.h:174
juce::WavAudioFormat::riffInfoLightness
static const char *const riffInfoLightness
Definition: juce_WavAudioFormat.h:128
juce::WavAudioFormat::riffInfoProductionStudio
static const char *const riffInfoProductionStudio
Definition: juce_WavAudioFormat.h:145
juce::WavAudioFormat::riffInfoProducedBy
static const char *const riffInfoProducedBy
Definition: juce_WavAudioFormat.h:142
juce::WavAudioFormat::riffInfoEighthLanguage
static const char *const riffInfoEighthLanguage
Definition: juce_WavAudioFormat.h:117
juce::WavAudioFormat::riffInfoCropped
static const char *const riffInfoCropped
Definition: juce_WavAudioFormat.h:108
juce::WavAudioFormat::riffInfoRating
static const char *const riffInfoRating
Definition: juce_WavAudioFormat.h:148
juce::WavAudioFormat::riffInfoURL
static const char *const riffInfoURL
Definition: juce_WavAudioFormat.h:171
juce::WavAudioFormat::ISRC
static const char *const ISRC
Definition: juce_WavAudioFormat.h:181
juce::WavAudioFormat::riffInfoMoreInfoBannerURL
static const char *const riffInfoMoreInfoBannerURL
Definition: juce_WavAudioFormat.h:134
juce::WavAudioFormat::riffInfoStartTimecode
static const char *const riffInfoStartTimecode
Definition: juce_WavAudioFormat.h:161
juce::WavAudioFormat::bwavOriginatorRef
static const char *const bwavOriginatorRef
Definition: juce_WavAudioFormat.h:53
juce::WavAudioFormat::riffInfoTitle
static const char *const riffInfoTitle
Definition: juce_WavAudioFormat.h:168
juce::WavAudioFormat::riffInfoArtist
static const char *const riffInfoArtist
Definition: juce_WavAudioFormat.h:98
juce::WavAudioFormat::riffInfoSixthLanguage
static const char *const riffInfoSixthLanguage
Definition: juce_WavAudioFormat.h:154
juce::WavAudioFormat::riffInfoSecondaryGenre
static const char *const riffInfoSecondaryGenre
Definition: juce_WavAudioFormat.h:150
juce::WavAudioFormat::riffInfoFifthLanguage
static const char *const riffInfoFifthLanguage
Definition: juce_WavAudioFormat.h:121
juce::WavAudioFormat::riffInfoDotsPerInch
static const char *const riffInfoDotsPerInch
Definition: juce_WavAudioFormat.h:115
juce::WavAudioFormat::riffInfoDistributedBy
static const char *const riffInfoDistributedBy
Definition: juce_WavAudioFormat.h:114
juce::WavAudioFormat::riffInfoStarring_ISTR
static const char *const riffInfoStarring_ISTR
Definition: juce_WavAudioFormat.h:159
juce::WavAudioFormat::riffInfoProductName
static const char *const riffInfoProductName
Definition: juce_WavAudioFormat.h:143
juce::WavAudioFormat::riffInfoKeywords
static const char *const riffInfoKeywords
Definition: juce_WavAudioFormat.h:125
juce::WavAudioFormat::riffInfoRippedBy
static const char *const riffInfoRippedBy
Definition: juce_WavAudioFormat.h:149
juce::WavAudioFormat::riffInfoLanguage
static const char *const riffInfoLanguage
Definition: juce_WavAudioFormat.h:126
juce::WavAudioFormat::riffInfoDateTimeOriginal
static const char *const riffInfoDateTimeOriginal
Definition: juce_WavAudioFormat.h:110
juce::WavAudioFormat::acidizerFlag
static const char *const acidizerFlag
Definition: juce_WavAudioFormat.h:87
juce::WavAudioFormat::riffInfoBaseURL
static const char *const riffInfoBaseURL
Definition: juce_WavAudioFormat.h:99
juce::WavAudioFormat::riffInfoProductionDesigner
static const char *const riffInfoProductionDesigner
Definition: juce_WavAudioFormat.h:144
juce::WavAudioFormat::acidDenominator
static const char *const acidDenominator
Definition: juce_WavAudioFormat.h:90
juce::WavAudioFormat::riffInfoVegasVersionMinor
static const char *const riffInfoVegasVersionMinor
Definition: juce_WavAudioFormat.h:173
juce::WavAudioFormat::riffInfoLength
static const char *const riffInfoLength
Definition: juce_WavAudioFormat.h:127
juce::WavAudioFormat::riffInfoTechnician
static const char *const riffInfoTechnician
Definition: juce_WavAudioFormat.h:165
juce::WavAudioFormat::riffInfoSoftware
static const char *const riffInfoSoftware
Definition: juce_WavAudioFormat.h:155
juce::WavAudioFormat::riffInfoStarring_STAR
static const char *const riffInfoStarring_STAR
Definition: juce_WavAudioFormat.h:160
juce::WavAudioFormat::riffInfoDateCreated
static const char *const riffInfoDateCreated
Definition: juce_WavAudioFormat.h:109
juce::WavAudioFormat::riffInfoSeventhLanguage
static const char *const riffInfoSeventhLanguage
Definition: juce_WavAudioFormat.h:152
juce::WavAudioFormat::acidBeats
static const char *const acidBeats
Definition: juce_WavAudioFormat.h:89
juce::WavAudioFormat::riffInfoLogoIconURL
static const char *const riffInfoLogoIconURL
Definition: juce_WavAudioFormat.h:130
juce::WavAudioFormat::tracktionLoopInfo
static const char *const tracktionLoopInfo
Definition: juce_WavAudioFormat.h:184
juce::WavAudioFormat::acidNumerator
static const char *const acidNumerator
Definition: juce_WavAudioFormat.h:91
juce::WavAudioFormat::bwavOriginationDate
static const char *const bwavOriginationDate
Definition: juce_WavAudioFormat.h:54
juce::WavAudioFormat::riffInfoComments
static const char *const riffInfoComments
Definition: juce_WavAudioFormat.h:103
juce::WavAudioFormat::riffInfoNumberOfParts
static const char *const riffInfoNumberOfParts
Definition: juce_WavAudioFormat.h:139
juce::WavAudioFormat::bwavDescription
static const char *const bwavDescription
Definition: juce_WavAudioFormat.h:51
juce::WavAudioFormat::riffInfoSoundSchemeTitle
static const char *const riffInfoSoundSchemeTitle
Definition: juce_WavAudioFormat.h:156
juce::WavAudioFormat::riffInfoWatermarkURL
static const char *const riffInfoWatermarkURL
Definition: juce_WavAudioFormat.h:175
juce::WavAudioFormat::riffInfoTrackNo
static const char *const riffInfoTrackNo
Definition: juce_WavAudioFormat.h:169
juce::WavAudioFormat::riffInfoMedium
static const char *const riffInfoMedium
Definition: juce_WavAudioFormat.h:132
juce::WavAudioFormat::acidStretch
static const char *const acidStretch
Definition: juce_WavAudioFormat.h:85
juce::WavAudioFormat::riffInfoThirdLanguage
static const char *const riffInfoThirdLanguage
Definition: juce_WavAudioFormat.h:166
juce::WavAudioFormat::bwavOriginationTime
static const char *const bwavOriginationTime
Definition: juce_WavAudioFormat.h:55
juce::WavAudioFormat::riffInfoArchivalLocation
static const char *const riffInfoArchivalLocation
Definition: juce_WavAudioFormat.h:97
juce::WavAudioFormat::riffInfoMoreInfoText
static const char *const riffInfoMoreInfoText
Definition: juce_WavAudioFormat.h:135
juce::WavAudioFormat::riffInfoCinematographer
static const char *const riffInfoCinematographer
Definition: juce_WavAudioFormat.h:100
juce::WavAudioFormat::riffInfoFourthLanguage
static const char *const riffInfoFourthLanguage
Definition: juce_WavAudioFormat.h:123
juce::WavAudioFormat::riffInfoSubject
static const char *const riffInfoSubject
Definition: juce_WavAudioFormat.h:163
juce::WavAudioFormat::riffInfoRated
static const char *const riffInfoRated
Definition: juce_WavAudioFormat.h:147
juce::WavAudioFormat::riffInfoDimension
static const char *const riffInfoDimension
Definition: juce_WavAudioFormat.h:112
juce::WavAudioFormat::riffInfoEditedBy
static const char *const riffInfoEditedBy
Definition: juce_WavAudioFormat.h:116
juce::WavAudioFormat::riffInfoYear
static const char *const riffInfoYear
Definition: juce_WavAudioFormat.h:177
juce::WavAudioFormat::riffInfoComment2
static const char *const riffInfoComment2
Definition: juce_WavAudioFormat.h:102
juce::WavAudioFormat::riffInfoTrackNumber
static const char *const riffInfoTrackNumber
Definition: juce_WavAudioFormat.h:170
juce::WavAudioFormat::riffInfoEngineer
static const char *const riffInfoEngineer
Definition: juce_WavAudioFormat.h:120
juce::WavAudioFormat::riffInfoWrittenBy
static const char *const riffInfoWrittenBy
Definition: juce_WavAudioFormat.h:176
juce::WavAudioFormat::riffInfoTimeCode
static const char *const riffInfoTimeCode
Definition: juce_WavAudioFormat.h:167
juce::WavAudioFormat::riffInfoSourceFrom
static const char *const riffInfoSourceFrom
Definition: juce_WavAudioFormat.h:158
juce::WavAudioFormat::riffInfoSource
static const char *const riffInfoSource
Definition: juce_WavAudioFormat.h:157
juce::WavAudioFormat::riffInfoLogoURL
static const char *const riffInfoLogoURL
Definition: juce_WavAudioFormat.h:131
juce::WavAudioFormat::riffInfoCountry
static const char *const riffInfoCountry
Definition: juce_WavAudioFormat.h:107
juce::WavAudioFormat::riffInfoSecondLanguage
static const char *const riffInfoSecondLanguage
Definition: juce_WavAudioFormat.h:151
juce::WavAudioFormat::riffInfoComment
static const char *const riffInfoComment
Definition: juce_WavAudioFormat.h:101
juce::WavAudioFormat::riffInfoTapeName
static const char *const riffInfoTapeName
Definition: juce_WavAudioFormat.h:164
juce::WavAudioFormat::riffInfoEndTimecode
static const char *const riffInfoEndTimecode
Definition: juce_WavAudioFormat.h:119
juce::WavAudioFormat::riffInfoPart
static const char *const riffInfoPart
Definition: juce_WavAudioFormat.h:141
juce::WavAudioFormat::bwavOriginator
static const char *const bwavOriginator
Definition: juce_WavAudioFormat.h:52
juce::WavAudioFormat::acidTempo
static const char *const acidTempo
Definition: juce_WavAudioFormat.h:92
juce::WavAudioFormat::acidRootNote
static const char *const acidRootNote
Definition: juce_WavAudioFormat.h:88
juce::WavAudioFormat::riffInfoMoreInfoURL
static const char *const riffInfoMoreInfoURL
Definition: juce_WavAudioFormat.h:136