| @@ -23,16 +23,16 @@ | |||
| namespace juce | |||
| { | |||
| void AudioDataConverters::convertFloatToInt16LE (const float* source, void* dest, int numSamples, const int destBytesPerSample) | |||
| void AudioDataConverters::convertFloatToInt16LE (const float* source, void* dest, int numSamples, int destBytesPerSample) | |||
| { | |||
| const double maxVal = (double) 0x7fff; | |||
| char* intData = static_cast<char*> (dest); | |||
| auto maxVal = (double) 0x7fff; | |||
| auto intData = static_cast<char*> (dest); | |||
| if (dest != (void*) source || destBytesPerSample <= 4) | |||
| { | |||
| for (int i = 0; i < numSamples; ++i) | |||
| { | |||
| *(uint16*) intData = ByteOrder::swapIfBigEndian ((uint16) (short) roundToInt (jlimit (-maxVal, maxVal, maxVal * source[i]))); | |||
| *reinterpret_cast<uint16*> (intData) = ByteOrder::swapIfBigEndian ((uint16) (short) roundToInt (jlimit (-maxVal, maxVal, maxVal * source[i]))); | |||
| intData += destBytesPerSample; | |||
| } | |||
| } | |||
| @@ -43,21 +43,21 @@ void AudioDataConverters::convertFloatToInt16LE (const float* source, void* dest | |||
| for (int i = numSamples; --i >= 0;) | |||
| { | |||
| intData -= destBytesPerSample; | |||
| *(uint16*) intData = ByteOrder::swapIfBigEndian ((uint16) (short) roundToInt (jlimit (-maxVal, maxVal, maxVal * source[i]))); | |||
| *reinterpret_cast<uint16*> (intData) = ByteOrder::swapIfBigEndian ((uint16) (short) roundToInt (jlimit (-maxVal, maxVal, maxVal * source[i]))); | |||
| } | |||
| } | |||
| } | |||
| void AudioDataConverters::convertFloatToInt16BE (const float* source, void* dest, int numSamples, const int destBytesPerSample) | |||
| void AudioDataConverters::convertFloatToInt16BE (const float* source, void* dest, int numSamples, int destBytesPerSample) | |||
| { | |||
| const double maxVal = (double) 0x7fff; | |||
| char* intData = static_cast<char*> (dest); | |||
| auto maxVal = (double) 0x7fff; | |||
| auto intData = static_cast<char*> (dest); | |||
| if (dest != (void*) source || destBytesPerSample <= 4) | |||
| { | |||
| for (int i = 0; i < numSamples; ++i) | |||
| { | |||
| *(uint16*) intData = ByteOrder::swapIfLittleEndian ((uint16) (short) roundToInt (jlimit (-maxVal, maxVal, maxVal * source[i]))); | |||
| *reinterpret_cast<uint16*> (intData) = ByteOrder::swapIfLittleEndian ((uint16) (short) roundToInt (jlimit (-maxVal, maxVal, maxVal * source[i]))); | |||
| intData += destBytesPerSample; | |||
| } | |||
| } | |||
| @@ -68,15 +68,15 @@ void AudioDataConverters::convertFloatToInt16BE (const float* source, void* dest | |||
| for (int i = numSamples; --i >= 0;) | |||
| { | |||
| intData -= destBytesPerSample; | |||
| *(uint16*) intData = ByteOrder::swapIfLittleEndian ((uint16) (short) roundToInt (jlimit (-maxVal, maxVal, maxVal * source[i]))); | |||
| *reinterpret_cast<uint16*> (intData) = ByteOrder::swapIfLittleEndian ((uint16) (short) roundToInt (jlimit (-maxVal, maxVal, maxVal * source[i]))); | |||
| } | |||
| } | |||
| } | |||
| void AudioDataConverters::convertFloatToInt24LE (const float* source, void* dest, int numSamples, const int destBytesPerSample) | |||
| void AudioDataConverters::convertFloatToInt24LE (const float* source, void* dest, int numSamples, int destBytesPerSample) | |||
| { | |||
| const double maxVal = (double) 0x7fffff; | |||
| char* intData = static_cast<char*> (dest); | |||
| auto maxVal = (double) 0x7fffff; | |||
| auto intData = static_cast<char*> (dest); | |||
| if (dest != (void*) source || destBytesPerSample <= 4) | |||
| { | |||
| @@ -98,10 +98,10 @@ void AudioDataConverters::convertFloatToInt24LE (const float* source, void* dest | |||
| } | |||
| } | |||
| void AudioDataConverters::convertFloatToInt24BE (const float* source, void* dest, int numSamples, const int destBytesPerSample) | |||
| void AudioDataConverters::convertFloatToInt24BE (const float* source, void* dest, int numSamples, int destBytesPerSample) | |||
| { | |||
| const double maxVal = (double) 0x7fffff; | |||
| char* intData = static_cast<char*> (dest); | |||
| auto maxVal = (double) 0x7fffff; | |||
| auto intData = static_cast<char*> (dest); | |||
| if (dest != (void*) source || destBytesPerSample <= 4) | |||
| { | |||
| @@ -123,16 +123,16 @@ void AudioDataConverters::convertFloatToInt24BE (const float* source, void* dest | |||
| } | |||
| } | |||
| void AudioDataConverters::convertFloatToInt32LE (const float* source, void* dest, int numSamples, const int destBytesPerSample) | |||
| void AudioDataConverters::convertFloatToInt32LE (const float* source, void* dest, int numSamples, int destBytesPerSample) | |||
| { | |||
| const double maxVal = (double) 0x7fffffff; | |||
| char* intData = static_cast<char*> (dest); | |||
| auto maxVal = (double) 0x7fffffff; | |||
| auto intData = static_cast<char*> (dest); | |||
| if (dest != (void*) source || destBytesPerSample <= 4) | |||
| { | |||
| for (int i = 0; i < numSamples; ++i) | |||
| { | |||
| *(uint32*)intData = ByteOrder::swapIfBigEndian ((uint32) roundToInt (jlimit (-maxVal, maxVal, maxVal * source[i]))); | |||
| *reinterpret_cast<uint32*> (intData) = ByteOrder::swapIfBigEndian ((uint32) roundToInt (jlimit (-maxVal, maxVal, maxVal * source[i]))); | |||
| intData += destBytesPerSample; | |||
| } | |||
| } | |||
| @@ -143,21 +143,21 @@ void AudioDataConverters::convertFloatToInt32LE (const float* source, void* dest | |||
| for (int i = numSamples; --i >= 0;) | |||
| { | |||
| intData -= destBytesPerSample; | |||
| *(uint32*)intData = ByteOrder::swapIfBigEndian ((uint32) roundToInt (jlimit (-maxVal, maxVal, maxVal * source[i]))); | |||
| *reinterpret_cast<uint32*> (intData) = ByteOrder::swapIfBigEndian ((uint32) roundToInt (jlimit (-maxVal, maxVal, maxVal * source[i]))); | |||
| } | |||
| } | |||
| } | |||
| void AudioDataConverters::convertFloatToInt32BE (const float* source, void* dest, int numSamples, const int destBytesPerSample) | |||
| void AudioDataConverters::convertFloatToInt32BE (const float* source, void* dest, int numSamples, int destBytesPerSample) | |||
| { | |||
| const double maxVal = (double) 0x7fffffff; | |||
| char* intData = static_cast<char*> (dest); | |||
| auto maxVal = (double) 0x7fffffff; | |||
| auto intData = static_cast<char*> (dest); | |||
| if (dest != (void*) source || destBytesPerSample <= 4) | |||
| { | |||
| for (int i = 0; i < numSamples; ++i) | |||
| { | |||
| *(uint32*)intData = ByteOrder::swapIfLittleEndian ((uint32) roundToInt (jlimit (-maxVal, maxVal, maxVal * source[i]))); | |||
| *reinterpret_cast<uint32*> (intData) = ByteOrder::swapIfLittleEndian ((uint32) roundToInt (jlimit (-maxVal, maxVal, maxVal * source[i]))); | |||
| intData += destBytesPerSample; | |||
| } | |||
| } | |||
| @@ -168,12 +168,12 @@ void AudioDataConverters::convertFloatToInt32BE (const float* source, void* dest | |||
| for (int i = numSamples; --i >= 0;) | |||
| { | |||
| intData -= destBytesPerSample; | |||
| *(uint32*)intData = ByteOrder::swapIfLittleEndian ((uint32) roundToInt (jlimit (-maxVal, maxVal, maxVal * source[i]))); | |||
| *reinterpret_cast<uint32*> (intData) = ByteOrder::swapIfLittleEndian ((uint32) roundToInt (jlimit (-maxVal, maxVal, maxVal * source[i]))); | |||
| } | |||
| } | |||
| } | |||
| void AudioDataConverters::convertFloatToFloat32LE (const float* source, void* dest, int numSamples, const int destBytesPerSample) | |||
| void AudioDataConverters::convertFloatToFloat32LE (const float* source, void* dest, int numSamples, int destBytesPerSample) | |||
| { | |||
| jassert (dest != (void*) source || destBytesPerSample <= 4); // This op can't be performed on in-place data! | |||
| @@ -181,28 +181,28 @@ void AudioDataConverters::convertFloatToFloat32LE (const float* source, void* de | |||
| for (int i = 0; i < numSamples; ++i) | |||
| { | |||
| *(float*) d = source[i]; | |||
| *reinterpret_cast<float*> (d) = source[i]; | |||
| #if JUCE_BIG_ENDIAN | |||
| *(uint32*) d = ByteOrder::swap (*(uint32*) d); | |||
| *reinterpret_cast<uint32*> (d) = ByteOrder::swap (*reinterpret_cast<uint32*> (d)); | |||
| #endif | |||
| d += destBytesPerSample; | |||
| } | |||
| } | |||
| void AudioDataConverters::convertFloatToFloat32BE (const float* source, void* dest, int numSamples, const int destBytesPerSample) | |||
| void AudioDataConverters::convertFloatToFloat32BE (const float* source, void* dest, int numSamples, int destBytesPerSample) | |||
| { | |||
| jassert (dest != (void*) source || destBytesPerSample <= 4); // This op can't be performed on in-place data! | |||
| char* d = static_cast<char*> (dest); | |||
| auto d = static_cast<char*> (dest); | |||
| for (int i = 0; i < numSamples; ++i) | |||
| { | |||
| *(float*) d = source[i]; | |||
| *reinterpret_cast<float*> (d) = source[i]; | |||
| #if JUCE_LITTLE_ENDIAN | |||
| *(uint32*) d = ByteOrder::swap (*(uint32*) d); | |||
| *reinterpret_cast<uint32*> (d) = ByteOrder::swap (*reinterpret_cast<uint32*> (d)); | |||
| #endif | |||
| d += destBytesPerSample; | |||
| @@ -210,16 +210,16 @@ void AudioDataConverters::convertFloatToFloat32BE (const float* source, void* de | |||
| } | |||
| //============================================================================== | |||
| void AudioDataConverters::convertInt16LEToFloat (const void* const source, float* const dest, int numSamples, const int srcBytesPerSample) | |||
| void AudioDataConverters::convertInt16LEToFloat (const void* source, float* dest, int numSamples, int srcBytesPerSample) | |||
| { | |||
| const float scale = 1.0f / 0x7fff; | |||
| const char* intData = static_cast<const char*> (source); | |||
| auto intData = static_cast<const char*> (source); | |||
| if (source != (void*) dest || srcBytesPerSample >= 4) | |||
| { | |||
| for (int i = 0; i < numSamples; ++i) | |||
| { | |||
| dest[i] = scale * (short) ByteOrder::swapIfBigEndian (*(uint16*)intData); | |||
| dest[i] = scale * (short) ByteOrder::swapIfBigEndian (*reinterpret_cast<const uint16*> (intData)); | |||
| intData += srcBytesPerSample; | |||
| } | |||
| } | |||
| @@ -230,21 +230,21 @@ void AudioDataConverters::convertInt16LEToFloat (const void* const source, float | |||
| for (int i = numSamples; --i >= 0;) | |||
| { | |||
| intData -= srcBytesPerSample; | |||
| dest[i] = scale * (short) ByteOrder::swapIfBigEndian (*(uint16*)intData); | |||
| dest[i] = scale * (short) ByteOrder::swapIfBigEndian (*reinterpret_cast<const uint16*> (intData)); | |||
| } | |||
| } | |||
| } | |||
| void AudioDataConverters::convertInt16BEToFloat (const void* const source, float* const dest, int numSamples, const int srcBytesPerSample) | |||
| void AudioDataConverters::convertInt16BEToFloat (const void* source, float* dest, int numSamples, int srcBytesPerSample) | |||
| { | |||
| const float scale = 1.0f / 0x7fff; | |||
| const char* intData = static_cast<const char*> (source); | |||
| auto intData = static_cast<const char*> (source); | |||
| if (source != (void*) dest || srcBytesPerSample >= 4) | |||
| { | |||
| for (int i = 0; i < numSamples; ++i) | |||
| { | |||
| dest[i] = scale * (short) ByteOrder::swapIfLittleEndian (*(uint16*)intData); | |||
| dest[i] = scale * (short) ByteOrder::swapIfLittleEndian (*reinterpret_cast<const uint16*> (intData)); | |||
| intData += srcBytesPerSample; | |||
| } | |||
| } | |||
| @@ -255,15 +255,15 @@ void AudioDataConverters::convertInt16BEToFloat (const void* const source, float | |||
| for (int i = numSamples; --i >= 0;) | |||
| { | |||
| intData -= srcBytesPerSample; | |||
| dest[i] = scale * (short) ByteOrder::swapIfLittleEndian (*(uint16*)intData); | |||
| dest[i] = scale * (short) ByteOrder::swapIfLittleEndian (*reinterpret_cast<const uint16*> (intData)); | |||
| } | |||
| } | |||
| } | |||
| void AudioDataConverters::convertInt24LEToFloat (const void* const source, float* const dest, int numSamples, const int srcBytesPerSample) | |||
| void AudioDataConverters::convertInt24LEToFloat (const void* source, float* dest, int numSamples, int srcBytesPerSample) | |||
| { | |||
| const float scale = 1.0f / 0x7fffff; | |||
| const char* intData = static_cast<const char*> (source); | |||
| auto intData = static_cast<const char*> (source); | |||
| if (source != (void*) dest || srcBytesPerSample >= 4) | |||
| { | |||
| @@ -285,10 +285,10 @@ void AudioDataConverters::convertInt24LEToFloat (const void* const source, float | |||
| } | |||
| } | |||
| void AudioDataConverters::convertInt24BEToFloat (const void* const source, float* const dest, int numSamples, const int srcBytesPerSample) | |||
| void AudioDataConverters::convertInt24BEToFloat (const void* source, float* dest, int numSamples, int srcBytesPerSample) | |||
| { | |||
| const float scale = 1.0f / 0x7fffff; | |||
| const char* intData = static_cast<const char*> (source); | |||
| auto intData = static_cast<const char*> (source); | |||
| if (source != (void*) dest || srcBytesPerSample >= 4) | |||
| { | |||
| @@ -310,16 +310,16 @@ void AudioDataConverters::convertInt24BEToFloat (const void* const source, float | |||
| } | |||
| } | |||
| void AudioDataConverters::convertInt32LEToFloat (const void* const source, float* const dest, int numSamples, const int srcBytesPerSample) | |||
| void AudioDataConverters::convertInt32LEToFloat (const void* source, float* dest, int numSamples, int srcBytesPerSample) | |||
| { | |||
| const auto scale = 1.0f / (float) 0x7fffffff; | |||
| const char* intData = static_cast<const char*> (source); | |||
| const float scale = 1.0f / (float) 0x7fffffff; | |||
| auto intData = static_cast<const char*> (source); | |||
| if (source != (void*) dest || srcBytesPerSample >= 4) | |||
| { | |||
| for (int i = 0; i < numSamples; ++i) | |||
| { | |||
| dest[i] = scale * (int) ByteOrder::swapIfBigEndian (*(uint32*) intData); | |||
| dest[i] = scale * (int) ByteOrder::swapIfBigEndian (*reinterpret_cast<const uint32*> (intData)); | |||
| intData += srcBytesPerSample; | |||
| } | |||
| } | |||
| @@ -330,21 +330,21 @@ void AudioDataConverters::convertInt32LEToFloat (const void* const source, float | |||
| for (int i = numSamples; --i >= 0;) | |||
| { | |||
| intData -= srcBytesPerSample; | |||
| dest[i] = scale * (int) ByteOrder::swapIfBigEndian (*(uint32*) intData); | |||
| dest[i] = scale * (int) ByteOrder::swapIfBigEndian (*reinterpret_cast<const uint32*> (intData)); | |||
| } | |||
| } | |||
| } | |||
| void AudioDataConverters::convertInt32BEToFloat (const void* const source, float* const dest, int numSamples, const int srcBytesPerSample) | |||
| void AudioDataConverters::convertInt32BEToFloat (const void* source, float* dest, int numSamples, int srcBytesPerSample) | |||
| { | |||
| const auto scale = 1.0f / (float) 0x7fffffff; | |||
| const char* intData = static_cast<const char*> (source); | |||
| const float scale = 1.0f / (float) 0x7fffffff; | |||
| auto intData = static_cast<const char*> (source); | |||
| if (source != (void*) dest || srcBytesPerSample >= 4) | |||
| { | |||
| for (int i = 0; i < numSamples; ++i) | |||
| { | |||
| dest[i] = scale * (int) ByteOrder::swapIfLittleEndian (*(uint32*) intData); | |||
| dest[i] = scale * (int) ByteOrder::swapIfLittleEndian (*reinterpret_cast<const uint32*> (intData)); | |||
| intData += srcBytesPerSample; | |||
| } | |||
| } | |||
| @@ -355,21 +355,21 @@ void AudioDataConverters::convertInt32BEToFloat (const void* const source, float | |||
| for (int i = numSamples; --i >= 0;) | |||
| { | |||
| intData -= srcBytesPerSample; | |||
| dest[i] = scale * (int) ByteOrder::swapIfLittleEndian (*(uint32*) intData); | |||
| dest[i] = scale * (int) ByteOrder::swapIfLittleEndian (*reinterpret_cast<const uint32*> (intData)); | |||
| } | |||
| } | |||
| } | |||
| void AudioDataConverters::convertFloat32LEToFloat (const void* const source, float* const dest, int numSamples, const int srcBytesPerSample) | |||
| void AudioDataConverters::convertFloat32LEToFloat (const void* source, float* dest, int numSamples, int srcBytesPerSample) | |||
| { | |||
| const char* s = static_cast<const char*> (source); | |||
| auto s = static_cast<const char*> (source); | |||
| for (int i = 0; i < numSamples; ++i) | |||
| { | |||
| dest[i] = *(float*)s; | |||
| dest[i] = *reinterpret_cast<const float*> (s); | |||
| #if JUCE_BIG_ENDIAN | |||
| uint32* const d = (uint32*) (dest + i); | |||
| auto d = reinterpret_cast<uint32*> (dest + i); | |||
| *d = ByteOrder::swap (*d); | |||
| #endif | |||
| @@ -377,16 +377,16 @@ void AudioDataConverters::convertFloat32LEToFloat (const void* const source, flo | |||
| } | |||
| } | |||
| void AudioDataConverters::convertFloat32BEToFloat (const void* const source, float* const dest, int numSamples, const int srcBytesPerSample) | |||
| void AudioDataConverters::convertFloat32BEToFloat (const void* source, float* dest, int numSamples, int srcBytesPerSample) | |||
| { | |||
| const char* s = static_cast<const char*> (source); | |||
| auto s = static_cast<const char*> (source); | |||
| for (int i = 0; i < numSamples; ++i) | |||
| { | |||
| dest[i] = *(float*)s; | |||
| dest[i] = *reinterpret_cast<const float*> (s); | |||
| #if JUCE_LITTLE_ENDIAN | |||
| uint32* const d = (uint32*) (dest + i); | |||
| auto d = reinterpret_cast<uint32*> (dest + i); | |||
| *d = ByteOrder::swap (*d); | |||
| #endif | |||
| @@ -396,10 +396,7 @@ void AudioDataConverters::convertFloat32BEToFloat (const void* const source, flo | |||
| //============================================================================== | |||
| void AudioDataConverters::convertFloatToFormat (const DataFormat destFormat, | |||
| const float* const source, | |||
| void* const dest, | |||
| const int numSamples) | |||
| void AudioDataConverters::convertFloatToFormat (DataFormat destFormat, const float* source, void* dest, int numSamples) | |||
| { | |||
| switch (destFormat) | |||
| { | |||
| @@ -415,10 +412,7 @@ void AudioDataConverters::convertFloatToFormat (const DataFormat destFormat, | |||
| } | |||
| } | |||
| void AudioDataConverters::convertFormatToFloat (const DataFormat sourceFormat, | |||
| const void* const source, | |||
| float* const dest, | |||
| const int numSamples) | |||
| void AudioDataConverters::convertFormatToFloat (DataFormat sourceFormat, const void* source, float* dest, int numSamples) | |||
| { | |||
| switch (sourceFormat) | |||
| { | |||
| @@ -435,15 +429,12 @@ void AudioDataConverters::convertFormatToFloat (const DataFormat sourceFormat, | |||
| } | |||
| //============================================================================== | |||
| void AudioDataConverters::interleaveSamples (const float** const source, | |||
| float* const dest, | |||
| const int numSamples, | |||
| const int numChannels) | |||
| void AudioDataConverters::interleaveSamples (const float** source, float* dest, int numSamples, int numChannels) | |||
| { | |||
| for (int chan = 0; chan < numChannels; ++chan) | |||
| { | |||
| int i = chan; | |||
| const float* src = source [chan]; | |||
| auto i = chan; | |||
| auto src = source [chan]; | |||
| for (int j = 0; j < numSamples; ++j) | |||
| { | |||
| @@ -453,15 +444,12 @@ void AudioDataConverters::interleaveSamples (const float** const source, | |||
| } | |||
| } | |||
| void AudioDataConverters::deinterleaveSamples (const float* const source, | |||
| float** const dest, | |||
| const int numSamples, | |||
| const int numChannels) | |||
| void AudioDataConverters::deinterleaveSamples (const float* source, float** dest, int numSamples, int numChannels) | |||
| { | |||
| for (int chan = 0; chan < numChannels; ++chan) | |||
| { | |||
| int i = chan; | |||
| float* dst = dest [chan]; | |||
| auto i = chan; | |||
| auto dst = dest [chan]; | |||
| for (int j = 0; j < numSamples; ++j) | |||
| { | |||
| @@ -491,8 +479,8 @@ public: | |||
| static void test (UnitTest& unitTest, bool inPlace, Random& r) | |||
| { | |||
| const int numSamples = 2048; | |||
| int32 original [numSamples], converted [numSamples], reversed [numSamples]; | |||
| constexpr int numSamples = 2048; | |||
| int32 original[numSamples], converted[numSamples], reversed[numSamples]; | |||
| { | |||
| AudioData::Pointer<F1, E1, AudioData::NonInterleaved, AudioData::NonConst> d (original); | |||
| @@ -514,13 +502,13 @@ public: | |||
| } | |||
| // convert data from the source to dest format.. | |||
| std::unique_ptr<AudioData::Converter> conv (new AudioData::ConverterInstance <AudioData::Pointer<F1, E1, AudioData::NonInterleaved, AudioData::Const>, | |||
| AudioData::Pointer<F2, E2, AudioData::NonInterleaved, AudioData::NonConst>>()); | |||
| std::unique_ptr<AudioData::Converter> conv (new AudioData::ConverterInstance<AudioData::Pointer<F1, E1, AudioData::NonInterleaved, AudioData::Const>, | |||
| AudioData::Pointer<F2, E2, AudioData::NonInterleaved, AudioData::NonConst>>()); | |||
| conv->convertSamples (inPlace ? reversed : converted, original, numSamples); | |||
| // ..and back again.. | |||
| conv.reset (new AudioData::ConverterInstance <AudioData::Pointer<F2, E2, AudioData::NonInterleaved, AudioData::Const>, | |||
| AudioData::Pointer<F1, E1, AudioData::NonInterleaved, AudioData::NonConst>>()); | |||
| conv.reset (new AudioData::ConverterInstance<AudioData::Pointer<F2, E2, AudioData::NonInterleaved, AudioData::Const>, | |||
| AudioData::Pointer<F1, E1, AudioData::NonInterleaved, AudioData::NonConst>>()); | |||
| if (! inPlace) | |||
| zeromem (reversed, sizeof (reversed)); | |||
| @@ -582,7 +570,7 @@ public: | |||
| void runTest() override | |||
| { | |||
| Random r = getRandom(); | |||
| auto r = getRandom(); | |||
| beginTest ("Round-trip conversion: Int8"); | |||
| Test1 <AudioData::Int8>::test (*this, r); | |||
| beginTest ("Round-trip conversion: Int16"); | |||
| @@ -1080,7 +1080,7 @@ private: | |||
| allocatedBytes = (size_t) numChannels * (size_t) size * sizeof (Type) + channelListSize + 32; | |||
| allocatedData.malloc (allocatedBytes); | |||
| channels = reinterpret_cast<Type**> (allocatedData.get()); | |||
| auto* chan = (Type*) (allocatedData + channelListSize); | |||
| auto chan = reinterpret_cast<Type*> (allocatedData + channelListSize); | |||
| for (int i = 0; i < numChannels; ++i) | |||
| { | |||
| @@ -878,7 +878,7 @@ void JUCE_CALLTYPE FloatVectorOperations::convertFixedToFloat (float* dest, cons | |||
| JUCE_LOAD_NONE, JUCE_INCREMENT_SRC_DEST, ) | |||
| #else | |||
| JUCE_PERFORM_VEC_OP_SRC_DEST (dest[i] = (float) src[i] * multiplier, | |||
| Mode::mul (mult, _mm_cvtepi32_ps (_mm_loadu_si128 ((const __m128i*) src))), | |||
| Mode::mul (mult, _mm_cvtepi32_ps (_mm_loadu_si128 (reinterpret_cast<const __m128i*> (src)))), | |||
| JUCE_LOAD_NONE, JUCE_INCREMENT_SRC_DEST, | |||
| const Mode::ParallelType mult = Mode::load1 (multiplier);) | |||
| #endif | |||
| @@ -72,7 +72,7 @@ public: | |||
| MPESynthesiser (MPEInstrument* instrument); | |||
| /** Destructor. */ | |||
| ~MPESynthesiser(); | |||
| ~MPESynthesiser() override; | |||
| //============================================================================== | |||
| /** Deletes all voices. */ | |||
| @@ -66,7 +66,7 @@ public: | |||
| The input source may be deleted depending on whether the deleteSourceWhenDeleted | |||
| flag was set in the constructor. | |||
| */ | |||
| ~BufferingAudioSource(); | |||
| ~BufferingAudioSource() override; | |||
| //============================================================================== | |||
| /** Implementation of the AudioSource method. */ | |||
| @@ -56,7 +56,7 @@ public: | |||
| bool deleteSourceWhenDeleted); | |||
| /** Destructor. */ | |||
| ~ChannelRemappingAudioSource(); | |||
| ~ChannelRemappingAudioSource() override; | |||
| //============================================================================== | |||
| /** Specifies a number of channels that this audio source must produce from its | |||
| @@ -43,7 +43,7 @@ public: | |||
| bool deleteInputWhenDeleted); | |||
| /** Destructor. */ | |||
| ~IIRFilterAudioSource(); | |||
| ~IIRFilterAudioSource() override; | |||
| //============================================================================== | |||
| /** Changes the filter to use the same parameters as the one being passed in. */ | |||
| @@ -41,7 +41,7 @@ public: | |||
| MixerAudioSource(); | |||
| /** Destructor. */ | |||
| ~MixerAudioSource(); | |||
| ~MixerAudioSource() override; | |||
| //============================================================================== | |||
| /** Adds an input source to the mixer. | |||
| @@ -47,7 +47,7 @@ public: | |||
| int numChannels = 2); | |||
| /** Destructor. */ | |||
| ~ResamplingAudioSource(); | |||
| ~ResamplingAudioSource() override; | |||
| /** Changes the resampling ratio. | |||
| @@ -44,7 +44,7 @@ public: | |||
| bool deleteInputWhenDeleted); | |||
| /** Destructor. */ | |||
| ~ReverbAudioSource(); | |||
| ~ReverbAudioSource() override; | |||
| //============================================================================== | |||
| /** Returns the parameters from the reverb. */ | |||
| @@ -38,7 +38,7 @@ public: | |||
| ToneGeneratorAudioSource(); | |||
| /** Destructor. */ | |||
| ~ToneGeneratorAudioSource(); | |||
| ~ToneGeneratorAudioSource() override; | |||
| //============================================================================== | |||
| /** Sets the signal's amplitude. */ | |||
| @@ -217,6 +217,18 @@ void Synthesiser::processNextBlock (AudioBuffer<floatType>& outputAudio, | |||
| template void Synthesiser::processNextBlock<float> (AudioBuffer<float>&, const MidiBuffer&, int, int); | |||
| template void Synthesiser::processNextBlock<double> (AudioBuffer<double>&, const MidiBuffer&, int, int); | |||
| void Synthesiser::renderNextBlock (AudioBuffer<float>& outputAudio, const MidiBuffer& inputMidi, | |||
| int startSample, int numSamples) | |||
| { | |||
| processNextBlock (outputAudio, inputMidi, startSample, numSamples); | |||
| } | |||
| void Synthesiser::renderNextBlock (AudioBuffer<double>& outputAudio, const MidiBuffer& inputMidi, | |||
| int startSample, int numSamples) | |||
| { | |||
| processNextBlock (outputAudio, inputMidi, startSample, numSamples); | |||
| } | |||
| void Synthesiser::renderVoices (AudioBuffer<float>& buffer, int startSample, int numSamples) | |||
| { | |||
| for (auto* voice : voices) | |||
| @@ -525,21 +525,15 @@ public: | |||
| both to the audio output buffer and the midi input buffer, so any midi events | |||
| with timestamps outside the specified region will be ignored. | |||
| */ | |||
| inline void renderNextBlock (AudioBuffer<float>& outputAudio, | |||
| const MidiBuffer& inputMidi, | |||
| int startSample, | |||
| int numSamples) | |||
| { | |||
| processNextBlock (outputAudio, inputMidi, startSample, numSamples); | |||
| } | |||
| void renderNextBlock (AudioBuffer<float>& outputAudio, | |||
| const MidiBuffer& inputMidi, | |||
| int startSample, | |||
| int numSamples); | |||
| inline void renderNextBlock (AudioBuffer<double>& outputAudio, | |||
| const MidiBuffer& inputMidi, | |||
| int startSample, | |||
| int numSamples) | |||
| { | |||
| processNextBlock (outputAudio, inputMidi, startSample, numSamples); | |||
| } | |||
| void renderNextBlock (AudioBuffer<double>& outputAudio, | |||
| const MidiBuffer& inputMidi, | |||
| int startSample, | |||
| int numSamples); | |||
| /** Returns the current target sample rate at which rendering is being done. | |||
| Subclasses may need to know this so that they can pitch things correctly. | |||
| @@ -632,12 +626,6 @@ protected: | |||
| private: | |||
| //============================================================================== | |||
| template <typename floatType> | |||
| void processNextBlock (AudioBuffer<floatType>& outputAudio, | |||
| const MidiBuffer& inputMidi, | |||
| int startSample, | |||
| int numSamples); | |||
| //============================================================================== | |||
| double sampleRate = 0; | |||
| uint32 lastNoteOnCounter = 0; | |||
| int minimumSubBlockSize = 32; | |||
| @@ -645,6 +633,9 @@ private: | |||
| bool shouldStealNotes = true; | |||
| BigInteger sustainPedalsDown; | |||
| template <typename floatType> | |||
| void processNextBlock (AudioBuffer<floatType>&, const MidiBuffer&, int startSample, int numSamples); | |||
| #if JUCE_CATCH_DEPRECATED_CODE_MISUSE | |||
| // Note the new parameters for these methods. | |||
| virtual int findFreeVoice (const bool) const { return 0; } | |||
| @@ -44,7 +44,7 @@ public: | |||
| MidiMessageCollector(); | |||
| /** Destructor. */ | |||
| ~MidiMessageCollector(); | |||
| ~MidiMessageCollector() override; | |||
| //============================================================================== | |||
| /** Clears any messages from the queue. | |||
| @@ -81,7 +81,7 @@ public: | |||
| //============================================================================== | |||
| /** Destructor. */ | |||
| ~MidiOutput(); | |||
| ~MidiOutput() override; | |||
| /** Returns the name of this device. */ | |||
| const String& getName() const noexcept { return name; } | |||
| @@ -181,7 +181,7 @@ public: | |||
| AudioObjectAddPropertyListener (deviceID, &pa, deviceListenerProc, this); | |||
| } | |||
| ~CoreAudioInternal() | |||
| ~CoreAudioInternal() override | |||
| { | |||
| AudioObjectPropertyAddress pa; | |||
| pa.mSelector = kAudioObjectPropertySelectorWildcard; | |||
| @@ -980,7 +980,7 @@ public: | |||
| AudioObjectAddPropertyListener (kAudioObjectSystemObject, &pa, hardwareListenerProc, internal.get()); | |||
| } | |||
| ~CoreAudioIODevice() | |||
| ~CoreAudioIODevice() override | |||
| { | |||
| close(); | |||
| @@ -1217,7 +1217,7 @@ public: | |||
| { | |||
| } | |||
| ~AudioIODeviceCombiner() | |||
| ~AudioIODeviceCombiner() override | |||
| { | |||
| close(); | |||
| devices.clear(); | |||
| @@ -1806,7 +1806,7 @@ private: | |||
| d->setDeviceWrapperRestartCallback ([this] { owner.restartAsync(); }); | |||
| } | |||
| ~DeviceWrapper() | |||
| ~DeviceWrapper() override | |||
| { | |||
| close(); | |||
| } | |||
| @@ -2018,7 +2018,7 @@ public: | |||
| AudioObjectAddPropertyListener (kAudioObjectSystemObject, &pa, hardwareListenerProc, this); | |||
| } | |||
| ~CoreAudioIODeviceType() | |||
| ~CoreAudioIODeviceType() override | |||
| { | |||
| AudioObjectPropertyAddress pa; | |||
| pa.mSelector = kAudioHardwarePropertyDevices; | |||
| @@ -45,7 +45,7 @@ public: | |||
| Make sure this object isn't still being used by an AudioIODevice before | |||
| deleting it! | |||
| */ | |||
| virtual ~AudioSourcePlayer(); | |||
| ~AudioSourcePlayer() override; | |||
| //============================================================================== | |||
| /** Changes the current audio source to play from. | |||
| @@ -49,7 +49,7 @@ public: | |||
| AudioTransportSource(); | |||
| /** Destructor. */ | |||
| ~AudioTransportSource(); | |||
| ~AudioTransportSource() override; | |||
| //============================================================================== | |||
| /** Sets the reader that is being used as the input source. | |||
| @@ -651,7 +651,7 @@ public: | |||
| writeHeader(); | |||
| } | |||
| ~AiffAudioFormatWriter() | |||
| ~AiffAudioFormatWriter() override | |||
| { | |||
| if ((bytesWritten & 1) != 0) | |||
| output->writeByte (0); | |||
| @@ -43,7 +43,7 @@ public: | |||
| AiffAudioFormat(); | |||
| /** Destructor. */ | |||
| ~AiffAudioFormat(); | |||
| ~AiffAudioFormat() override; | |||
| //============================================================================== | |||
| /** Metadata property name used when reading a aiff file with a basc chunk. */ | |||
| @@ -447,7 +447,7 @@ public: | |||
| } | |||
| } | |||
| ~CoreAudioReader() | |||
| ~CoreAudioReader() override | |||
| { | |||
| ExtAudioFileDispose (audioFileRef); | |||
| AudioFileClose (audioFileID); | |||
| @@ -48,7 +48,7 @@ public: | |||
| CoreAudioFormat(); | |||
| /** Destructor. */ | |||
| ~CoreAudioFormat(); | |||
| ~CoreAudioFormat() override; | |||
| //============================================================================== | |||
| /** Metadata property name used when reading a caf file with a MIDI chunk. */ | |||
| @@ -204,7 +204,7 @@ public: | |||
| } | |||
| } | |||
| ~FlacReader() | |||
| ~FlacReader() override | |||
| { | |||
| FlacNamespace::FLAC__stream_decoder_delete (decoder); | |||
| } | |||
| @@ -404,7 +404,7 @@ public: | |||
| this) == FlacNamespace::FLAC__STREAM_ENCODER_INIT_STATUS_OK; | |||
| } | |||
| ~FlacWriter() | |||
| ~FlacWriter() override | |||
| { | |||
| if (ok) | |||
| { | |||
| @@ -44,7 +44,7 @@ class JUCE_API FlacAudioFormat : public AudioFormat | |||
| public: | |||
| //============================================================================== | |||
| FlacAudioFormat(); | |||
| ~FlacAudioFormat(); | |||
| ~FlacAudioFormat() override; | |||
| //============================================================================== | |||
| Array<int> getPossibleSampleRates() override; | |||
| @@ -149,7 +149,7 @@ public: | |||
| } | |||
| } | |||
| ~OggReader() | |||
| ~OggReader() override | |||
| { | |||
| ov_clear (&ovFile); | |||
| } | |||
| @@ -322,7 +322,7 @@ public: | |||
| } | |||
| } | |||
| ~OggWriter() | |||
| ~OggWriter() override | |||
| { | |||
| if (ok) | |||
| { | |||
| @@ -44,7 +44,7 @@ class JUCE_API OggVorbisAudioFormat : public AudioFormat | |||
| public: | |||
| //============================================================================== | |||
| OggVorbisAudioFormat(); | |||
| ~OggVorbisAudioFormat(); | |||
| ~OggVorbisAudioFormat() override; | |||
| //============================================================================== | |||
| Array<int> getPossibleSampleRates() override; | |||
| @@ -1319,7 +1319,7 @@ public: | |||
| writeHeader(); | |||
| } | |||
| ~WavAudioFormatWriter() | |||
| ~WavAudioFormatWriter() override | |||
| { | |||
| writeHeader(); | |||
| } | |||
| @@ -43,7 +43,7 @@ public: | |||
| WavAudioFormat(); | |||
| /** Destructor. */ | |||
| ~WavAudioFormat(); | |||
| ~WavAudioFormat() override; | |||
| //============================================================================== | |||
| // BWAV chunk properties: | |||
| @@ -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; | |||
| @@ -51,7 +51,7 @@ public: | |||
| bool deleteReaderWhenThisIsDeleted); | |||
| /** Destructor. */ | |||
| ~AudioFormatReaderSource(); | |||
| ~AudioFormatReaderSource() override; | |||
| //============================================================================== | |||
| /** Toggles loop-mode. | |||
| @@ -222,7 +222,7 @@ public: | |||
| timeSliceThread.addTimeSliceClient (this); | |||
| } | |||
| ~Buffer() | |||
| ~Buffer() override | |||
| { | |||
| isRunning = false; | |||
| timeSliceThread.removeTimeSliceClient (this); | |||
| @@ -63,7 +63,7 @@ public: | |||
| bool deleteSourceWhenDeleted); | |||
| /** Destructor. */ | |||
| ~AudioSubsectionReader(); | |||
| ~AudioSubsectionReader() override; | |||
| //============================================================================== | |||
| @@ -54,7 +54,7 @@ public: | |||
| TimeSliceThread& timeSliceThread, | |||
| int samplesToBuffer); | |||
| ~BufferingAudioReader(); | |||
| ~BufferingAudioReader() override; | |||
| /** Sets a number of milliseconds that the reader can block for in its readSamples() | |||
| method before giving up and returning silence. | |||
| @@ -72,7 +72,7 @@ public: | |||
| double maxSampleLengthSeconds); | |||
| /** Destructor. */ | |||
| ~SamplerSound(); | |||
| ~SamplerSound() override; | |||
| //============================================================================== | |||
| /** Returns the sample's name */ | |||
| @@ -126,7 +126,7 @@ public: | |||
| SamplerVoice(); | |||
| /** Destructor. */ | |||
| ~SamplerVoice(); | |||
| ~SamplerVoice() override; | |||
| //============================================================================== | |||
| bool canPlaySound (SynthesiserSound*) override; | |||
| @@ -59,7 +59,7 @@ public: | |||
| Make sure that you delete any UI components that belong to this plugin before | |||
| deleting the plugin. | |||
| */ | |||
| virtual ~AudioPluginInstance() {} | |||
| ~AudioPluginInstance() override {} | |||
| //============================================================================== | |||
| /** Fills-in the appropriate parts of this plugin description object. */ | |||
| @@ -110,10 +110,10 @@ protected: | |||
| struct Parameter : public AudioProcessorParameter | |||
| { | |||
| Parameter(); | |||
| virtual ~Parameter(); | |||
| ~Parameter() override; | |||
| virtual String getText (float value, int maximumStringLength) const override; | |||
| virtual float getValueForText (const String& text) const override; | |||
| String getText (float value, int maximumStringLength) const override; | |||
| float getValueForText (const String& text) const override; | |||
| StringArray onStrings, offStrings; | |||
| }; | |||
| @@ -53,7 +53,7 @@ protected: | |||
| public: | |||
| /** Destructor. */ | |||
| ~AudioProcessorEditor(); | |||
| ~AudioProcessorEditor() override; | |||
| //============================================================================== | |||
| @@ -55,7 +55,7 @@ public: | |||
| /** Destructor. | |||
| Any processor objects that have been added to the graph will also be deleted. | |||
| */ | |||
| ~AudioProcessorGraph(); | |||
| ~AudioProcessorGraph() override; | |||
| /** Each node in the graph has a UID of this type. */ | |||
| struct NodeID | |||
| @@ -322,7 +322,7 @@ public: | |||
| //============================================================================== | |||
| AudioGraphIOProcessor (IODeviceType); | |||
| ~AudioGraphIOProcessor(); | |||
| ~AudioGraphIOProcessor() override; | |||
| const String getName() const override; | |||
| void fillInPluginDescription (PluginDescription&) const override; | |||
| @@ -43,7 +43,7 @@ public: | |||
| startTimer (100); | |||
| } | |||
| virtual ~ParameterListener() | |||
| ~ParameterListener() override | |||
| { | |||
| if (LegacyAudioParameter::isLegacy (¶meter)) | |||
| processor.removeListener (this); | |||
| @@ -44,7 +44,7 @@ class JUCE_API GenericAudioProcessorEditor : public AudioProcessorEditor | |||
| public: | |||
| //============================================================================== | |||
| GenericAudioProcessorEditor (AudioProcessor* owner); | |||
| ~GenericAudioProcessorEditor(); | |||
| ~GenericAudioProcessorEditor() override; | |||
| //============================================================================== | |||
| void paint (Graphics&) override; | |||
| @@ -379,7 +379,7 @@ public: | |||
| } | |||
| } | |||
| ~Scanner() | |||
| ~Scanner() override | |||
| { | |||
| if (pool != nullptr) | |||
| { | |||
| @@ -53,7 +53,7 @@ public: | |||
| bool allowPluginsWhichRequireAsynchronousInstantiation = false); | |||
| /** Destructor. */ | |||
| ~PluginListComponent(); | |||
| ~PluginListComponent() override; | |||
| /** Changes the text in the panel's options button. */ | |||
| void setOptionsButtonText (const String& newText); | |||
| @@ -56,7 +56,7 @@ public: | |||
| std::function<bool (const String& text)> boolFromString = nullptr); | |||
| /** Destructor. */ | |||
| ~AudioParameterBool(); | |||
| ~AudioParameterBool() override; | |||
| /** Returns the parameter's current boolean value. */ | |||
| bool get() const noexcept { return value >= 0.5f; } | |||
| @@ -60,7 +60,7 @@ public: | |||
| std::function<int (const String& text)> indexFromString = nullptr); | |||
| /** Destructor. */ | |||
| ~AudioParameterChoice(); | |||
| ~AudioParameterChoice() override; | |||
| /** Returns the current index of the selected item. */ | |||
| int getIndex() const noexcept { return roundToInt (value); } | |||
| @@ -74,7 +74,7 @@ public: | |||
| float defaultValue); | |||
| /** Destructor. */ | |||
| ~AudioParameterFloat(); | |||
| ~AudioParameterFloat() override; | |||
| /** Returns the parameter's current value. */ | |||
| float get() const noexcept { return value; } | |||
| @@ -61,7 +61,7 @@ public: | |||
| std::function<int (const String& text)> intFromString = nullptr); | |||
| /** Destructor. */ | |||
| ~AudioParameterInt(); | |||
| ~AudioParameterInt() override; | |||
| /** Returns the parameter's current value as an integer. */ | |||
| int get() const noexcept { return roundToInt (value); } | |||
| @@ -46,7 +46,7 @@ public: | |||
| Category category = AudioProcessorParameter::genericParameter); | |||
| /** Destructor. */ | |||
| ~AudioProcessorParameterWithID(); | |||
| ~AudioProcessorParameterWithID() override; | |||
| /** Provides access to the parameter's ID string. */ | |||
| const String paramID; | |||
| @@ -80,7 +80,7 @@ public: | |||
| parameter.addListener (this); | |||
| } | |||
| ~ParameterAdapter() noexcept { parameter.removeListener (this); } | |||
| ~ParameterAdapter() override { parameter.removeListener (this); } | |||
| void addListener (Listener* l) { listeners.add (l); } | |||
| void removeListener (Listener* l) { listeners.remove (l); } | |||
| @@ -586,7 +586,7 @@ struct AudioProcessorValueTreeState::SliderAttachment::Pimpl : private Attached | |||
| slider.addListener (this); | |||
| } | |||
| ~Pimpl() | |||
| ~Pimpl() override | |||
| { | |||
| slider.removeListener (this); | |||
| removeListener(); | |||
| @@ -638,7 +638,7 @@ struct AudioProcessorValueTreeState::ComboBoxAttachment::Pimpl : private Attach | |||
| combo.addListener (this); | |||
| } | |||
| ~Pimpl() | |||
| ~Pimpl() override | |||
| { | |||
| combo.removeListener (this); | |||
| removeListener(); | |||
| @@ -707,7 +707,7 @@ struct AudioProcessorValueTreeState::ButtonAttachment::Pimpl : private Attached | |||
| button.addListener (this); | |||
| } | |||
| ~Pimpl() | |||
| ~Pimpl() override | |||
| { | |||
| button.removeListener (this); | |||
| removeListener(); | |||
| @@ -220,7 +220,7 @@ public: | |||
| AudioProcessorValueTreeState (AudioProcessor& processorToConnectTo, UndoManager* undoManagerToUse); | |||
| /** Destructor. */ | |||
| ~AudioProcessorValueTreeState(); | |||
| ~AudioProcessorValueTreeState() override; | |||
| //============================================================================== | |||
| /** This function is deprecated and will be removed in a future version of JUCE! | |||
| @@ -36,7 +36,7 @@ struct SimpleDeviceManagerInputLevelMeter : public Component, | |||
| inputLevelGetter = manager.getInputLevelGetter(); | |||
| } | |||
| ~SimpleDeviceManagerInputLevelMeter() | |||
| ~SimpleDeviceManagerInputLevelMeter() override | |||
| { | |||
| } | |||
| @@ -218,7 +218,7 @@ public: | |||
| setup.manager->addChangeListener (this); | |||
| } | |||
| ~AudioDeviceSettingsPanel() | |||
| ~AudioDeviceSettingsPanel() override | |||
| { | |||
| setup.manager->removeChangeListener (this); | |||
| } | |||
| @@ -73,7 +73,7 @@ public: | |||
| bool hideAdvancedOptionsWithButton); | |||
| /** Destructor */ | |||
| ~AudioDeviceSelectorComponent(); | |||
| ~AudioDeviceSelectorComponent() override; | |||
| /** The device manager that this component is controlling */ | |||
| AudioDeviceManager& deviceManager; | |||
| @@ -98,7 +98,7 @@ public: | |||
| { | |||
| } | |||
| ~LevelDataSource() | |||
| ~LevelDataSource() override | |||
| { | |||
| owner.cache.getTimeSliceThread().removeTimeSliceClient (this); | |||
| } | |||
| @@ -68,7 +68,7 @@ public: | |||
| AudioThumbnailCache& cacheToUse); | |||
| /** Destructor. */ | |||
| ~AudioThumbnail(); | |||
| ~AudioThumbnail() override; | |||
| //============================================================================== | |||
| /** Clears and resets the thumbnail. */ | |||
| @@ -51,7 +51,7 @@ public: | |||
| AudioVisualiserComponent (int initialNumChannels); | |||
| /** Destructor. */ | |||
| ~AudioVisualiserComponent(); | |||
| ~AudioVisualiserComponent() override; | |||
| /** Changes the number of channels that the visualiser stores. */ | |||
| void setNumChannels (int numChannels); | |||
| @@ -73,7 +73,7 @@ public: | |||
| Orientation orientation); | |||
| /** Destructor. */ | |||
| ~MidiKeyboardComponent(); | |||
| ~MidiKeyboardComponent() override; | |||
| //============================================================================== | |||
| /** Changes the velocity used in midi note-on messages that are triggered by clicking | |||
| @@ -50,7 +50,7 @@ public: | |||
| AudioProcessorPlayer (bool doDoublePrecisionProcessing = false); | |||
| /** Destructor. */ | |||
| virtual ~AudioProcessorPlayer(); | |||
| ~AudioProcessorPlayer() override; | |||
| //============================================================================== | |||
| /** Sets the processor that should be played. | |||
| @@ -67,7 +67,7 @@ struct AutoRemovingTransportSource : public AudioTransportSource, | |||
| startTimerHz (10); | |||
| } | |||
| ~AutoRemovingTransportSource() | |||
| ~AutoRemovingTransportSource() override | |||
| { | |||
| setSource (nullptr); | |||
| } | |||
| @@ -36,14 +36,14 @@ namespace juce | |||
| @tags{Audio} | |||
| */ | |||
| class JUCE_API SoundPlayer : public AudioIODeviceCallback | |||
| class JUCE_API SoundPlayer : public AudioIODeviceCallback | |||
| { | |||
| public: | |||
| //============================================================================== | |||
| SoundPlayer(); | |||
| /** Destructor. */ | |||
| virtual ~SoundPlayer(); | |||
| ~SoundPlayer() override; | |||
| //============================================================================== | |||
| /** Plays a sound from a file. */ | |||