upgrade to JUCE 5.4.3. Remove (probably) unused JUCE modules. Remove VST2 target (it's been end-of-life'd by Steinberg and by JUCE)

This commit is contained in:
Alex Birch
2019-06-22 20:41:38 +01:00
parent d22c2cd4fa
commit 9ee566b251
1140 changed files with 67534 additions and 105952 deletions

View File

@ -651,7 +651,7 @@ public:
writeHeader();
}
~AiffAudioFormatWriter()
~AiffAudioFormatWriter() override
{
if ((bytesWritten & 1) != 0)
output->writeByte (0);

View File

@ -43,7 +43,7 @@ public:
AiffAudioFormat();
/** Destructor. */
~AiffAudioFormat();
~AiffAudioFormat() override;
//==============================================================================
/** Metadata property name used when reading a aiff file with a basc chunk. */

View File

@ -42,9 +42,9 @@ namespace
CFArrayRef extensions = nullptr;
UInt32 sizeOfArray = sizeof (extensions);
if (AudioFileGetGlobalInfo (kAudioFileGlobalInfo_AllExtensions, 0, 0, &sizeOfArray, &extensions) == noErr)
if (AudioFileGetGlobalInfo (kAudioFileGlobalInfo_AllExtensions, 0, nullptr, &sizeOfArray, &extensions) == noErr)
{
const CFIndex numValues = CFArrayGetCount (extensions);
auto numValues = CFArrayGetCount (extensions);
for (CFIndex i = 0; i < numValues; ++i)
extensionsArray.add ("." + String::fromCFString ((CFStringRef) CFArrayGetValueAtIndex (extensions, i)));
@ -122,14 +122,14 @@ struct CoreAudioFormatMetatdata
static StringPairArray parseUserDefinedChunk (InputStream& input, int64 size)
{
StringPairArray infoStrings;
const int64 originalPosition = input.getPosition();
auto originalPosition = input.getPosition();
uint8 uuid[16];
input.read (uuid, sizeof (uuid));
if (memcmp (uuid, "\x29\x81\x92\x73\xB5\xBF\x4A\xEF\xB7\x8D\x62\xD1\xEF\x90\xBB\x2C", 16) == 0)
{
const uint32 numEntries = (uint32) input.readIntBigEndian();
auto numEntries = (uint32) input.readIntBigEndian();
for (uint32 i = 0; i < numEntries && input.getPosition() < originalPosition + size; ++i)
{
@ -314,7 +314,7 @@ struct CoreAudioFormatMetatdata
if (chunkHeader.chunkSize == -1)
break;
input.skipNextBytes (chunkHeader.chunkSize);
input.setPosition (input.getPosition() + chunkHeader.chunkSize);
}
else if (chunkHeader.chunkType == chunkName ("midi"))
{
@ -327,7 +327,7 @@ struct CoreAudioFormatMetatdata
else
{
// we aren't decoding this chunk yet so just skip over it
input.skipNextBytes (chunkHeader.chunkSize);
input.setPosition (input.getPosition() + chunkHeader.chunkSize);
}
}
}
@ -350,13 +350,13 @@ public:
if (input != nullptr)
CoreAudioFormatMetatdata::read (*input, metadataValues);
OSStatus status = AudioFileOpenWithCallbacks (this,
&readCallback,
nullptr, // write needs to be null to avoid permisisions errors
&getSizeCallback,
nullptr, // setSize needs to be null to avoid permisisions errors
0, // AudioFileTypeID inFileTypeHint
&audioFileID);
auto status = AudioFileOpenWithCallbacks (this,
&readCallback,
nullptr, // write needs to be null to avoid permisisions errors
&getSizeCallback,
nullptr, // setSize needs to be null to avoid permisisions errors
0, // AudioFileTypeID inFileTypeHint
&audioFileID);
if (status == noErr)
{
status = ExtAudioFileWrapAudioFileID (audioFileID, false, &audioFileRef);
@ -447,7 +447,7 @@ public:
}
}
~CoreAudioReader()
~CoreAudioReader() override
{
ExtAudioFileDispose (audioFileRef);
AudioFileClose (audioFileID);
@ -665,7 +665,7 @@ public:
for (auto tagEntry : knownTags)
expect (AudioChannelSet::channelSetWithChannels (CoreAudioLayouts::getSpeakerLayoutForCoreAudioTag (tagEntry.tag))
== CoreAudioLayouts::fromCoreAudio (tagEntry.tag),
"Tag \"" + String (tagEntry.name) + "\" is not converted consistantly by JUCE");
"Tag \"" + String (tagEntry.name) + "\" is not converted consistently by JUCE");
}
{

View File

@ -48,7 +48,7 @@ public:
CoreAudioFormat();
/** Destructor. */
~CoreAudioFormat();
~CoreAudioFormat() override;
//==============================================================================
/** Metadata property name used when reading a caf file with a MIDI chunk. */

View File

@ -117,6 +117,9 @@ namespace FlacNamespace
#pragma clang diagnostic ignored "-Wconversion"
#pragma clang diagnostic ignored "-Wshadow"
#pragma clang diagnostic ignored "-Wdeprecated-register"
#if __has_warning("-Wzero-as-null-pointer-constant")
#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
#endif
#endif
#if JUCE_INTEL
@ -201,7 +204,7 @@ public:
}
}
~FlacReader()
~FlacReader() override
{
FlacNamespace::FLAC__stream_decoder_delete (decoder);
}
@ -245,7 +248,7 @@ public:
}
else
{
if (startSampleInFile >= (int) lengthInSamples)
if (startSampleInFile >= lengthInSamples)
{
samplesInReservoir = 0;
}
@ -298,7 +301,7 @@ public:
auto* src = buffer[i];
int n = i;
while (src == 0 && n > 0)
while (src == nullptr && n > 0)
src = buffer [--n];
if (src != nullptr)
@ -401,7 +404,7 @@ public:
this) == FlacNamespace::FLAC__STREAM_ENCODER_INIT_STATUS_OK;
}
~FlacWriter()
~FlacWriter() override
{
if (ok)
{

View File

@ -44,7 +44,7 @@ class JUCE_API FlacAudioFormat : public AudioFormat
public:
//==============================================================================
FlacAudioFormat();
~FlacAudioFormat();
~FlacAudioFormat() override;
//==============================================================================
Array<int> getPossibleSampleRates() override;

View File

@ -1961,8 +1961,8 @@ private:
{
const uint8 n0 = si.allocation[i][0];
const uint8 n1 = si.allocation[i][1];
fraction[0][i] = n0 > 0 ? (float) (((-1 << n0) + getBitsUint16 (n0 + 1) + 1) * constants.muls[n0 + 1][si.scaleFactor[i][0]]) : 0;
fraction[1][i] = n1 > 0 ? (float) (((-1 << n1) + getBitsUint16 (n1 + 1) + 1) * constants.muls[n1 + 1][si.scaleFactor[i][1]]) : 0;
fraction[0][i] = n0 > 0 ? (float) ((-(1 << n0) + getBitsUint16 (n0 + 1) + 1) * constants.muls[n0 + 1][si.scaleFactor[i][0]]) : 0;
fraction[1][i] = n1 > 0 ? (float) ((-(1 << n1) + getBitsUint16 (n1 + 1) + 1) * constants.muls[n1 + 1][si.scaleFactor[i][1]]) : 0;
}
for (i = jsbound; i < 32; ++i)
@ -1971,7 +1971,7 @@ private:
if (n > 0)
{
const uint32 w = ((uint32) (-1 << n) + getBitsUint16 (n + 1) + 1);
const uint32 w = ((uint32) -(1 << n) + getBitsUint16 (n + 1) + 1);
fraction[0][i] = (float) (w * constants.muls[n + 1][si.scaleFactor[i][0]]);
fraction[1][i] = (float) (w * constants.muls[n + 1][si.scaleFactor[i][1]]);
}
@ -1987,7 +1987,7 @@ private:
const uint8 j = si.scaleFactor[i][0];
if (n > 0)
fraction[0][i] = (float) (((-1 << n) + getBitsUint16 (n + 1) + 1) * constants.muls[n + 1][j]);
fraction[0][i] = (float) ((-(1 << n) + getBitsUint16 (n + 1) + 1) * constants.muls[n + 1][j]);
else
fraction[0][i] = 0;
}

View File

@ -44,6 +44,9 @@ namespace OggVorbisNamespace
#pragma clang diagnostic ignored "-Wconversion"
#pragma clang diagnostic ignored "-Wshadow"
#pragma clang diagnostic ignored "-Wdeprecated-register"
#if __has_warning("-Wzero-as-null-pointer-constant")
#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
#endif
#elif JUCE_GCC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshadow"
@ -121,7 +124,7 @@ public:
callbacks.close_func = &oggCloseCallback;
callbacks.tell_func = &oggTellCallback;
auto err = ov_open_callbacks (input, &ovFile, 0, 0, callbacks);
auto err = ov_open_callbacks (input, &ovFile, nullptr, 0, callbacks);
if (err == 0)
{
@ -146,7 +149,7 @@ public:
}
}
~OggReader()
~OggReader() override
{
ov_clear (&ovFile);
}
@ -319,7 +322,7 @@ public:
}
}
~OggWriter()
~OggWriter() override
{
if (ok)
{
@ -377,7 +380,7 @@ public:
while (vorbis_analysis_blockout (&vd, &vb) == 1)
{
vorbis_analysis (&vb, 0);
vorbis_analysis (&vb, nullptr);
vorbis_bitrate_addblock (&vb);
while (vorbis_bitrate_flushpacket (&vd, &op))
@ -486,9 +489,7 @@ int OggVorbisAudioFormat::estimateOggFileQuality (const File& source)
{
if (auto* in = source.createInputStream())
{
std::unique_ptr<AudioFormatReader> r (createReaderFor (in, true));
if (r != nullptr)
if (auto r = std::unique_ptr<AudioFormatReader> (createReaderFor (in, true)))
{
auto lengthSecs = r->lengthInSamples / r->sampleRate;
auto approxBitsPerSecond = (int) (source.getSize() * 8 / lengthSecs);

View File

@ -44,7 +44,7 @@ class JUCE_API OggVorbisAudioFormat : public AudioFormat
public:
//==============================================================================
OggVorbisAudioFormat();
~OggVorbisAudioFormat();
~OggVorbisAudioFormat() override;
//==============================================================================
Array<int> getPossibleSampleRates() override;

View File

@ -849,20 +849,21 @@ namespace WavFileHelpers
{
static void addToMetadata (StringPairArray& destValues, const String& source)
{
std::unique_ptr<XmlElement> xml (XmlDocument::parse (source));
if (xml != nullptr && xml->hasTagName ("ebucore:ebuCoreMain"))
if (auto xml = parseXML (source))
{
if (auto* xml2 = xml->getChildByName ("ebucore:coreMetadata"))
if (xml->hasTagName ("ebucore:ebuCoreMain"))
{
if (auto* xml3 = xml2->getChildByName ("ebucore:identifier"))
if (auto xml2 = xml->getChildByName ("ebucore:coreMetadata"))
{
if (auto* xml4 = xml3->getChildByName ("dc:identifier"))
if (auto xml3 = xml2->getChildByName ("ebucore:identifier"))
{
auto ISRCCode = xml4->getAllSubText().fromFirstOccurrenceOf ("ISRC:", false, true);
if (auto xml4 = xml3->getChildByName ("dc:identifier"))
{
auto ISRCCode = xml4->getAllSubText().fromFirstOccurrenceOf ("ISRC:", false, true);
if (ISRCCode.isNotEmpty())
destValues.set (WavAudioFormat::ISRC, ISRCCode);
if (ISRCCode.isNotEmpty())
destValues.set (WavAudioFormat::ISRC, ISRCCode);
}
}
}
}
@ -1318,7 +1319,7 @@ public:
writeHeader();
}
~WavAudioFormatWriter()
~WavAudioFormatWriter() override
{
writeHeader();
}

View File

@ -43,7 +43,7 @@ public:
WavAudioFormat();
/** Destructor. */
~WavAudioFormat();
~WavAudioFormat() override;
//==============================================================================
// BWAV chunk properties:

View File

@ -329,11 +329,11 @@ long oggpack_read(oggpack_buffer *b,int bits){
if(bits>8){
ret|=b->ptr[1]<<(8-b->endbit);
if(bits>16){
ret|=b->ptr[2]<<(16-b->endbit);
ret|=((unsigned long) b->ptr[2]) << (16 - b->endbit);
if(bits>24){
ret|=b->ptr[3]<<(24-b->endbit);
ret |= ((unsigned long) b->ptr[3]) << (24 - b->endbit);
if(bits>32 && b->endbit){
ret|=b->ptr[4]<<(32-b->endbit);
ret |= ((unsigned long) b->ptr[4]) << (32 - b->endbit);
}
}
}

View File

@ -1949,7 +1949,7 @@ long ov_read_filter(OggVorbis_File *vf,char *buffer,int length,
vorbis_fpu_setround(&fpu);
for(i=0;i<channels;i++) { /* It's faster in this order */
float *src=pcm[i];
short *dest=((short *)buffer)+i;
short *dest=(reinterpret_cast<short*> (buffer))+i;
for(j=0;j<samples;j++) {
val=vorbis_ftoi(src[j]*32768.f);
if(val>32767)val=32767;
@ -1965,7 +1965,7 @@ long ov_read_filter(OggVorbis_File *vf,char *buffer,int length,
vorbis_fpu_setround(&fpu);
for(i=0;i<channels;i++) {
float *src=pcm[i];
short *dest=((short *)buffer)+i;
short *dest=(reinterpret_cast<short*> (buffer))+i;
for(j=0;j<samples;j++) {
val=vorbis_ftoi(src[j]*32768.f);
if(val>32767)val=32767;