Browse Source

Update juce

tags/2018-04-16
falkTX 6 years ago
parent
commit
8b17b7685e
100 changed files with 843 additions and 255 deletions
  1. +5
    -0
      libs/juce/patches/juce_IIRFilterOld.cpp
  2. +3
    -0
      libs/juce/patches/juce_IIRFilterOld.h
  3. +17
    -14
      libs/juce/source/modules/juce_audio_basics/audio_play_head/juce_AudioPlayHead.h
  4. +47
    -32
      libs/juce/source/modules/juce_audio_basics/buffers/juce_AudioChannelSet.cpp
  5. +21
    -3
      libs/juce/source/modules/juce_audio_basics/buffers/juce_AudioChannelSet.h
  6. +7
    -2
      libs/juce/source/modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp
  7. +4
    -2
      libs/juce/source/modules/juce_audio_basics/buffers/juce_AudioDataConverters.h
  8. +30
    -11
      libs/juce/source/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h
  9. +10
    -5
      libs/juce/source/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp
  10. +34
    -1
      libs/juce/source/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.h
  11. +5
    -0
      libs/juce/source/modules/juce_audio_basics/effects/juce_CatmullRomInterpolator.cpp
  12. +5
    -0
      libs/juce/source/modules/juce_audio_basics/effects/juce_CatmullRomInterpolator.h
  13. +4
    -2
      libs/juce/source/modules/juce_audio_basics/effects/juce_Decibels.h
  14. +5
    -1
      libs/juce/source/modules/juce_audio_basics/effects/juce_IIRFilter.cpp
  15. +4
    -1
      libs/juce/source/modules/juce_audio_basics/effects/juce_IIRFilter.h
  16. +5
    -0
      libs/juce/source/modules/juce_audio_basics/effects/juce_IIRFilterOld.cpp
  17. +5
    -0
      libs/juce/source/modules/juce_audio_basics/effects/juce_IIRFilterOld.h
  18. +5
    -0
      libs/juce/source/modules/juce_audio_basics/effects/juce_LagrangeInterpolator.cpp
  19. +5
    -0
      libs/juce/source/modules/juce_audio_basics/effects/juce_LagrangeInterpolator.h
  20. +4
    -2
      libs/juce/source/modules/juce_audio_basics/effects/juce_LinearSmoothedValue.h
  21. +4
    -2
      libs/juce/source/modules/juce_audio_basics/effects/juce_Reverb.h
  22. +0
    -5
      libs/juce/source/modules/juce_audio_basics/juce_audio_basics.cpp
  23. +2
    -6
      libs/juce/source/modules/juce_audio_basics/juce_audio_basics.h
  24. +6
    -1
      libs/juce/source/modules/juce_audio_basics/midi/juce_MidiBuffer.cpp
  25. +9
    -6
      libs/juce/source/modules/juce_audio_basics/midi/juce_MidiBuffer.h
  26. +5
    -0
      libs/juce/source/modules/juce_audio_basics/midi/juce_MidiFile.cpp
  27. +4
    -2
      libs/juce/source/modules/juce_audio_basics/midi/juce_MidiFile.h
  28. +5
    -0
      libs/juce/source/modules/juce_audio_basics/midi/juce_MidiKeyboardState.cpp
  29. +4
    -1
      libs/juce/source/modules/juce_audio_basics/midi/juce_MidiKeyboardState.h
  30. +5
    -0
      libs/juce/source/modules/juce_audio_basics/midi/juce_MidiMessage.cpp
  31. +4
    -2
      libs/juce/source/modules/juce_audio_basics/midi/juce_MidiMessage.h
  32. +4
    -0
      libs/juce/source/modules/juce_audio_basics/midi/juce_MidiMessageSequence.cpp
  33. +4
    -2
      libs/juce/source/modules/juce_audio_basics/midi/juce_MidiMessageSequence.h
  34. +5
    -0
      libs/juce/source/modules/juce_audio_basics/midi/juce_MidiRPN.cpp
  35. +4
    -2
      libs/juce/source/modules/juce_audio_basics/midi/juce_MidiRPN.h
  36. +5
    -0
      libs/juce/source/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp
  37. +4
    -2
      libs/juce/source/modules/juce_audio_basics/mpe/juce_MPEInstrument.h
  38. +5
    -0
      libs/juce/source/modules/juce_audio_basics/mpe/juce_MPEMessages.cpp
  39. +4
    -2
      libs/juce/source/modules/juce_audio_basics/mpe/juce_MPEMessages.h
  40. +5
    -0
      libs/juce/source/modules/juce_audio_basics/mpe/juce_MPENote.cpp
  41. +4
    -2
      libs/juce/source/modules/juce_audio_basics/mpe/juce_MPENote.h
  42. +5
    -0
      libs/juce/source/modules/juce_audio_basics/mpe/juce_MPESynthesiser.cpp
  43. +4
    -2
      libs/juce/source/modules/juce_audio_basics/mpe/juce_MPESynthesiser.h
  44. +5
    -0
      libs/juce/source/modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.cpp
  45. +4
    -2
      libs/juce/source/modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.h
  46. +5
    -0
      libs/juce/source/modules/juce_audio_basics/mpe/juce_MPESynthesiserVoice.cpp
  47. +4
    -1
      libs/juce/source/modules/juce_audio_basics/mpe/juce_MPESynthesiserVoice.h
  48. +5
    -0
      libs/juce/source/modules/juce_audio_basics/mpe/juce_MPEValue.cpp
  49. +4
    -2
      libs/juce/source/modules/juce_audio_basics/mpe/juce_MPEValue.h
  50. +5
    -0
      libs/juce/source/modules/juce_audio_basics/mpe/juce_MPEZone.cpp
  51. +4
    -2
      libs/juce/source/modules/juce_audio_basics/mpe/juce_MPEZone.h
  52. +5
    -0
      libs/juce/source/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.cpp
  53. +4
    -2
      libs/juce/source/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.h
  54. +4
    -1
      libs/juce/source/modules/juce_audio_basics/native/juce_mac_CoreAudioLayouts.h
  55. +4
    -2
      libs/juce/source/modules/juce_audio_basics/sources/juce_AudioSource.h
  56. +5
    -0
      libs/juce/source/modules/juce_audio_basics/sources/juce_BufferingAudioSource.cpp
  57. +4
    -2
      libs/juce/source/modules/juce_audio_basics/sources/juce_BufferingAudioSource.h
  58. +5
    -0
      libs/juce/source/modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.cpp
  59. +4
    -2
      libs/juce/source/modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.h
  60. +5
    -0
      libs/juce/source/modules/juce_audio_basics/sources/juce_IIRFilterAudioSource.cpp
  61. +4
    -2
      libs/juce/source/modules/juce_audio_basics/sources/juce_IIRFilterAudioSource.h
  62. +5
    -1
      libs/juce/source/modules/juce_audio_basics/sources/juce_MemoryAudioSource.cpp
  63. +4
    -2
      libs/juce/source/modules/juce_audio_basics/sources/juce_MemoryAudioSource.h
  64. +5
    -0
      libs/juce/source/modules/juce_audio_basics/sources/juce_MixerAudioSource.cpp
  65. +4
    -2
      libs/juce/source/modules/juce_audio_basics/sources/juce_MixerAudioSource.h
  66. +4
    -2
      libs/juce/source/modules/juce_audio_basics/sources/juce_PositionableAudioSource.h
  67. +5
    -0
      libs/juce/source/modules/juce_audio_basics/sources/juce_ResamplingAudioSource.cpp
  68. +4
    -2
      libs/juce/source/modules/juce_audio_basics/sources/juce_ResamplingAudioSource.h
  69. +5
    -0
      libs/juce/source/modules/juce_audio_basics/sources/juce_ReverbAudioSource.cpp
  70. +4
    -2
      libs/juce/source/modules/juce_audio_basics/sources/juce_ReverbAudioSource.h
  71. +5
    -0
      libs/juce/source/modules/juce_audio_basics/sources/juce_ToneGeneratorAudioSource.cpp
  72. +4
    -2
      libs/juce/source/modules/juce_audio_basics/sources/juce_ToneGeneratorAudioSource.h
  73. +13
    -8
      libs/juce/source/modules/juce_audio_basics/synthesisers/juce_Synthesiser.cpp
  74. +16
    -8
      libs/juce/source/modules/juce_audio_basics/synthesisers/juce_Synthesiser.h
  75. +6
    -1
      libs/juce/source/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp
  76. +4
    -2
      libs/juce/source/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.h
  77. +6
    -0
      libs/juce/source/modules/juce_audio_devices/audio_io/juce_AudioIODevice.cpp
  78. +17
    -1
      libs/juce/source/modules/juce_audio_devices/audio_io/juce_AudioIODevice.h
  79. +5
    -0
      libs/juce/source/modules/juce_audio_devices/audio_io/juce_AudioIODeviceType.cpp
  80. +4
    -2
      libs/juce/source/modules/juce_audio_devices/audio_io/juce_AudioIODeviceType.h
  81. +4
    -2
      libs/juce/source/modules/juce_audio_devices/audio_io/juce_SystemAudioVolume.h
  82. +8
    -10
      libs/juce/source/modules/juce_audio_devices/juce_audio_devices.cpp
  83. +1
    -6
      libs/juce/source/modules/juce_audio_devices/juce_audio_devices.h
  84. +4
    -1
      libs/juce/source/modules/juce_audio_devices/midi_io/juce_MidiInput.h
  85. +5
    -0
      libs/juce/source/modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.cpp
  86. +4
    -2
      libs/juce/source/modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.h
  87. +5
    -0
      libs/juce/source/modules/juce_audio_devices/midi_io/juce_MidiOutput.cpp
  88. +4
    -2
      libs/juce/source/modules/juce_audio_devices/midi_io/juce_MidiOutput.h
  89. +9
    -7
      libs/juce/source/modules/juce_audio_devices/native/juce_MidiDataConcatenator.h
  90. +24
    -1
      libs/juce/source/modules/juce_audio_devices/native/juce_android_Audio.cpp
  91. +7
    -2
      libs/juce/source/modules/juce_audio_devices/native/juce_android_Midi.cpp
  92. +57
    -21
      libs/juce/source/modules/juce_audio_devices/native/juce_android_OpenSL.cpp
  93. +40
    -4
      libs/juce/source/modules/juce_audio_devices/native/juce_ios_Audio.cpp
  94. +6
    -1
      libs/juce/source/modules/juce_audio_devices/native/juce_ios_Audio.h
  95. +77
    -24
      libs/juce/source/modules/juce_audio_devices/native/juce_linux_ALSA.cpp
  96. +21
    -1
      libs/juce/source/modules/juce_audio_devices/native/juce_linux_JackAudio.cpp
  97. +6
    -1
      libs/juce/source/modules/juce_audio_devices/native/juce_linux_Midi.cpp
  98. +15
    -2
      libs/juce/source/modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp
  99. +5
    -0
      libs/juce/source/modules/juce_audio_devices/native/juce_mac_CoreMidi.cpp
  100. +15
    -2
      libs/juce/source/modules/juce_audio_devices/native/juce_win32_ASIO.cpp

+ 5
- 0
libs/juce/patches/juce_IIRFilterOld.cpp View File

@@ -28,6 +28,9 @@
#define JUCE_SNAP_TO_ZERO(n)
#endif
namespace juce
{
//==============================================================================
IIRFilterOld::IIRFilterOld()
: active (false), v1 (0), v2 (0)
@@ -237,3 +240,5 @@ void IIRFilterOld::setCoefficients (double c1, double c2, double c3,
}
#undef JUCE_SNAP_TO_ZERO
} // namespace juce

+ 3
- 0
libs/juce/patches/juce_IIRFilterOld.h View File

@@ -25,6 +25,8 @@
#ifndef __JUCE_IIRFILTER_OLD_JUCEHEADER__
#define __JUCE_IIRFILTER_OLD_JUCEHEADER__
namespace juce
{
//==============================================================================
/**
@@ -144,5 +146,6 @@ protected:
JUCE_LEAK_DETECTOR (IIRFilterOld)
};
} // namespace juce
#endif // __JUCE_IIRFILTER_OLD_JUCEHEADER__

+ 17
- 14
libs/juce/source/modules/juce_audio_basics/audio_play_head/juce_AudioPlayHead.h View File

@@ -20,8 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/**
@@ -46,14 +46,15 @@ public:
/** Frame rate types. */
enum FrameRateType
{
fps24 = 0,
fps25 = 1,
fps2997 = 2,
fps30 = 3,
fps2997drop = 4,
fps30drop = 5,
fps60 = 6,
fps60drop = 7,
fps23976 = 0,
fps24 = 1,
fps25 = 2,
fps2997 = 3,
fps30 = 4,
fps2997drop = 5,
fps30drop = 6,
fps60 = 7,
fps60drop = 8,
fpsUnknown = 99
};
@@ -70,12 +71,12 @@ public:
/** Time signature denominator, e.g. the 4 of a 3/4 time sig */
int timeSigDenominator;
/** The current play position, in samples from the start of the edit. */
/** The current play position, in samples from the start of the timeline. */
int64 timeInSamples;
/** The current play position, in seconds from the start of the edit. */
/** The current play position, in seconds from the start of the timeline. */
double timeInSeconds;
/** For timecode, the position of the start of the edit, in seconds from 00:00:00:00. */
/** For timecode, the position of the start of the timeline, in seconds from 00:00:00:00. */
double editOriginTime;
/** The current play position, in pulses-per-quarter-note. */
@@ -83,7 +84,7 @@ public:
/** The position of the start of the last bar, in pulses-per-quarter-note.
This is the time from the start of the edit to the start of the current
This is the time from the start of the timeline to the start of the current
bar, in ppq units.
Note - this value may be unavailable on some hosts, e.g. Pro-Tools. If
@@ -150,3 +151,5 @@ public:
/** Rewinds the audio. */
virtual void transportRewind() {}
};
} // namespace juce

+ 47
- 32
libs/juce/source/modules/juce_audio_basics/buffers/juce_AudioChannelSet.cpp View File

@@ -20,6 +20,9 @@
==============================================================================
*/
namespace juce
{
AudioChannelSet::AudioChannelSet (uint32 c) : channels (c) {}
AudioChannelSet::AudioChannelSet (const Array<ChannelType>& c)
{
@@ -65,6 +68,8 @@ String AudioChannelSet::getChannelTypeName (AudioChannelSet::ChannelType type)
case ambisonicX: return NEEDS_TRANS("Ambisonic X");
case ambisonicY: return NEEDS_TRANS("Ambisonic Y");
case ambisonicZ: return NEEDS_TRANS("Ambisonic Z");
case topSideLeft: return NEEDS_TRANS("Top Side Left");
case topSideRight: return NEEDS_TRANS("Top Side Right");
default: break;
}
@@ -105,6 +110,8 @@ String AudioChannelSet::getAbbreviatedChannelTypeName (AudioChannelSet::ChannelT
case ambisonicX: return "X";
case ambisonicY: return "Y";
case ambisonicZ: return "Z";
case topSideLeft: return "Tsl";
case topSideRight: return "Tsr";
default: break;
}
@@ -144,6 +151,8 @@ AudioChannelSet::ChannelType AudioChannelSet::getChannelTypeFromAbbreviation (co
if (abbr == "X") return ambisonicX;
if (abbr == "Y") return ambisonicY;
if (abbr == "Z") return ambisonicZ;
if (abbr == "Tsl") return topSideLeft;
if (abbr == "Tsr") return topSideRight;
return unknown;
}
@@ -189,16 +198,18 @@ String AudioChannelSet::getDescription() const
if (*this == createLRS()) return "LRS";
if (*this == createLCRS()) return "LCRS";
if (*this == create5point0()) return "5.0 Surround";
if (*this == create5point1()) return "5.1 Surround";
if (*this == create6point0()) return "6.0 Surround";
if (*this == create6point1()) return "6.1 Surround";
if (*this == create6point0Music()) return "6.0 (Music) Surround";
if (*this == create6point1Music()) return "6.1 (Music) Surround";
if (*this == create7point0()) return "7.0 Surround";
if (*this == create7point1()) return "7.1 Surround";
if (*this == create7point0SDDS()) return "7.0 Surround SDDS";
if (*this == create7point1SDDS()) return "7.1 Surround SDDS";
if (*this == create5point0()) return "5.0 Surround";
if (*this == create5point1()) return "5.1 Surround";
if (*this == create6point0()) return "6.0 Surround";
if (*this == create6point1()) return "6.1 Surround";
if (*this == create6point0Music()) return "6.0 (Music) Surround";
if (*this == create6point1Music()) return "6.1 (Music) Surround";
if (*this == create7point0()) return "7.0 Surround";
if (*this == create7point1()) return "7.1 Surround";
if (*this == create7point0SDDS()) return "7.0 Surround SDDS";
if (*this == create7point1SDDS()) return "7.1 Surround SDDS";
if (*this == create7point0point2()) return "7.0.2 Surround";
if (*this == create7point1point2()) return "7.1.2 Surround";
if (*this == quadraphonic()) return "Quadraphonic";
if (*this == pentagonal()) return "Pentagonal";
@@ -212,7 +223,7 @@ String AudioChannelSet::getDescription() const
bool AudioChannelSet::isDiscreteLayout() const noexcept
{
for (auto& speaker : getChannelTypes())
if (speaker <= ambisonicZ)
if (speaker <= topSideRight)
return false;
return true;
@@ -272,27 +283,29 @@ void AudioChannelSet::removeChannel (ChannelType newChannel)
channels.clearBit (bit);
}
AudioChannelSet AudioChannelSet::disabled() { return {}; }
AudioChannelSet AudioChannelSet::mono() { return AudioChannelSet (1u << centre); }
AudioChannelSet AudioChannelSet::stereo() { return AudioChannelSet ((1u << left) | (1u << right)); }
AudioChannelSet AudioChannelSet::createLCR() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre)); }
AudioChannelSet AudioChannelSet::createLRS() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << surround)); }
AudioChannelSet AudioChannelSet::createLCRS() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << surround)); }
AudioChannelSet AudioChannelSet::create5point0() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << leftSurround) | (1u << rightSurround)); }
AudioChannelSet AudioChannelSet::create5point1() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << LFE) | (1u << leftSurround) | (1u << rightSurround)); }
AudioChannelSet AudioChannelSet::create6point0() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << leftSurround) | (1u << rightSurround) | (1u << centreSurround)); }
AudioChannelSet AudioChannelSet::create6point1() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << LFE) | (1u << leftSurround) | (1u << rightSurround) | (1u << centreSurround)); }
AudioChannelSet AudioChannelSet::create6point0Music() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << leftSurround) | (1u << rightSurround) | (1u << leftSurroundSide) | (1u << rightSurroundSide)); }
AudioChannelSet AudioChannelSet::create6point1Music() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << LFE) | (1u << leftSurround) | (1u << rightSurround) | (1u << leftSurroundSide) | (1u << rightSurroundSide)); }
AudioChannelSet AudioChannelSet::create7point0() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << leftSurroundSide) | (1u << rightSurroundSide) | (1u << leftSurroundRear) | (1u << rightSurroundRear)); }
AudioChannelSet AudioChannelSet::create7point0SDDS() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << leftSurround) | (1u << rightSurround) | (1u << leftCentre) | (1u << rightCentre)); }
AudioChannelSet AudioChannelSet::create7point1() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << LFE) | (1u << leftSurroundSide) | (1u << rightSurroundSide) | (1u << leftSurroundRear) | (1u << rightSurroundRear)); }
AudioChannelSet AudioChannelSet::create7point1SDDS() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << LFE) | (1u << leftSurround) | (1u << rightSurround) | (1u << leftCentre) | (1u << rightCentre)); }
AudioChannelSet AudioChannelSet::ambisonic() { return AudioChannelSet ((1u << ambisonicW) | (1u << ambisonicX) | (1u << ambisonicY) | (1u << ambisonicZ)); }
AudioChannelSet AudioChannelSet::quadraphonic() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << leftSurround) | (1u << rightSurround)); }
AudioChannelSet AudioChannelSet::pentagonal() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << leftSurroundRear) | (1u << rightSurroundRear)); }
AudioChannelSet AudioChannelSet::hexagonal() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << centreSurround) | (1u << leftSurroundRear) | (1u << rightSurroundRear)); }
AudioChannelSet AudioChannelSet::octagonal() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << leftSurround) | (1u << rightSurround) | (1u << centreSurround) | (1u << wideLeft) | (1u << wideRight)); }
AudioChannelSet AudioChannelSet::disabled() { return {}; }
AudioChannelSet AudioChannelSet::mono() { return AudioChannelSet (1u << centre); }
AudioChannelSet AudioChannelSet::stereo() { return AudioChannelSet ((1u << left) | (1u << right)); }
AudioChannelSet AudioChannelSet::createLCR() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre)); }
AudioChannelSet AudioChannelSet::createLRS() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << surround)); }
AudioChannelSet AudioChannelSet::createLCRS() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << surround)); }
AudioChannelSet AudioChannelSet::create5point0() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << leftSurround) | (1u << rightSurround)); }
AudioChannelSet AudioChannelSet::create5point1() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << LFE) | (1u << leftSurround) | (1u << rightSurround)); }
AudioChannelSet AudioChannelSet::create6point0() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << leftSurround) | (1u << rightSurround) | (1u << centreSurround)); }
AudioChannelSet AudioChannelSet::create6point1() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << LFE) | (1u << leftSurround) | (1u << rightSurround) | (1u << centreSurround)); }
AudioChannelSet AudioChannelSet::create6point0Music() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << leftSurround) | (1u << rightSurround) | (1u << leftSurroundSide) | (1u << rightSurroundSide)); }
AudioChannelSet AudioChannelSet::create6point1Music() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << LFE) | (1u << leftSurround) | (1u << rightSurround) | (1u << leftSurroundSide) | (1u << rightSurroundSide)); }
AudioChannelSet AudioChannelSet::create7point0() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << leftSurroundSide) | (1u << rightSurroundSide) | (1u << leftSurroundRear) | (1u << rightSurroundRear)); }
AudioChannelSet AudioChannelSet::create7point0SDDS() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << leftSurround) | (1u << rightSurround) | (1u << leftCentre) | (1u << rightCentre)); }
AudioChannelSet AudioChannelSet::create7point1() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << LFE) | (1u << leftSurroundSide) | (1u << rightSurroundSide) | (1u << leftSurroundRear) | (1u << rightSurroundRear)); }
AudioChannelSet AudioChannelSet::create7point1SDDS() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << LFE) | (1u << leftSurround) | (1u << rightSurround) | (1u << leftCentre) | (1u << rightCentre)); }
AudioChannelSet AudioChannelSet::ambisonic() { return AudioChannelSet ((1u << ambisonicW) | (1u << ambisonicX) | (1u << ambisonicY) | (1u << ambisonicZ)); }
AudioChannelSet AudioChannelSet::quadraphonic() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << leftSurround) | (1u << rightSurround)); }
AudioChannelSet AudioChannelSet::pentagonal() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << leftSurroundRear) | (1u << rightSurroundRear)); }
AudioChannelSet AudioChannelSet::hexagonal() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << centreSurround) | (1u << leftSurroundRear) | (1u << rightSurroundRear)); }
AudioChannelSet AudioChannelSet::octagonal() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << leftSurround) | (1u << rightSurround) | (1u << centreSurround) | (1u << wideLeft) | (1u << wideRight)); }
AudioChannelSet AudioChannelSet::create7point0point2() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << leftSurroundSide) | (1u << rightSurroundSide) | (1u << leftSurroundRear) | (1u << rightSurroundRear) | (1u << topSideLeft) | (1u << topSideRight)); }
AudioChannelSet AudioChannelSet::create7point1point2() { return AudioChannelSet ((1u << left) | (1u << right) | (1u << centre) | (1u << LFE) | (1u << leftSurroundSide) | (1u << rightSurroundSide) | (1u << leftSurroundRear) | (1u << rightSurroundRear) | (1u << topSideLeft) | (1u << topSideRight)); }
AudioChannelSet AudioChannelSet::discreteChannels (int numChannels)
@@ -414,3 +427,5 @@ int32 AudioChannelSet::getWaveChannelMask() const noexcept
return (channels.toInteger() >> 1);
}
} // namespace juce

+ 21
- 3
libs/juce/source/modules/juce_audio_basics/buffers/juce_AudioChannelSet.h View File

@@ -20,8 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/**
@@ -194,6 +194,18 @@ public:
*/
static AudioChannelSet JUCE_CALLTYPE create7point1SDDS();
/** Creates a set for Dolby Atmos 7.0.2 surround setup (left, right, centre, leftSurroundSide, rightSurroundSide, leftSurroundRear, rightSurroundRear, topSideLeft, topSideRight).
Is equivalent to: n/a (VST), AAX_eStemFormat_7_0_2 (AAX), n/a (CoreAudio)
*/
static AudioChannelSet JUCE_CALLTYPE create7point0point2();
/** Creates a set for Dolby Atmos 7.1.2 surround setup (left, right, centre, leftSurroundSide, rightSurroundSide, leftSurroundRear, rightSurroundRear, LFE, topSideLeft, topSideRight).
Is equivalent to: k71_2 (VST), AAX_eStemFormat_7_1_2 (AAX), n/a (CoreAudio)
*/
static AudioChannelSet JUCE_CALLTYPE create7point1point2();
//==============================================================================
/** Creates a set for ambisonic surround setups (ambisonicW, ambisonicX, ambisonicY, ambisonicZ).
@@ -289,6 +301,10 @@ public:
ambisonicY = 26,
ambisonicZ = 27,
// Used by Dolby Atmos 7.0.2 and 7.1.2
topSideLeft = 28, // Lts (AAX), Tsl (VST)
topSideRight = 29, // Rts (AAX), Tsr (VST)
discreteChannel0 = 64 /**< Non-typed individual channels are indexed upwards from this value. */
};
@@ -305,7 +321,7 @@ public:
//==============================================================================
enum
{
maxChannelsOfNamedLayout = 8
maxChannelsOfNamedLayout = 10
};
/** Adds a channel to the set. */
@@ -388,3 +404,5 @@ private:
explicit AudioChannelSet (uint32);
explicit AudioChannelSet (const Array<ChannelType>&);
};
} // namespace juce

+ 7
- 2
libs/juce/source/modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp View File

@@ -20,6 +20,9 @@
==============================================================================
*/
namespace juce
{
void AudioDataConverters::convertFloatToInt16LE (const float* source, void* dest, int numSamples, const int destBytesPerSample)
{
const double maxVal = (double) 0x7fff;
@@ -309,7 +312,7 @@ void AudioDataConverters::convertInt24BEToFloat (const void* const source, float
void AudioDataConverters::convertInt32LEToFloat (const void* const source, float* const dest, int numSamples, const int srcBytesPerSample)
{
const float scale = 1.0f / 0x7fffffff;
const auto scale = 1.0f / (float) 0x7fffffff;
const char* intData = static_cast<const char*> (source);
if (source != (void*) dest || srcBytesPerSample >= 4)
@@ -334,7 +337,7 @@ void AudioDataConverters::convertInt32LEToFloat (const void* const source, float
void AudioDataConverters::convertInt32BEToFloat (const void* const source, float* const dest, int numSamples, const int srcBytesPerSample)
{
const float scale = 1.0f / 0x7fffffff;
const auto scale = 1.0f / (float) 0x7fffffff;
const char* intData = static_cast<const char*> (source);
if (source != (void*) dest || srcBytesPerSample >= 4)
@@ -596,3 +599,5 @@ public:
static AudioConversionTests audioConversionUnitTests;
#endif
} // namespace juce

+ 4
- 2
libs/juce/source/modules/juce_audio_basics/buffers/juce_AudioDataConverters.h View File

@@ -20,8 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/**
@@ -708,3 +708,5 @@ private:
AudioDataConverters();
JUCE_DECLARE_NON_COPYABLE (AudioDataConverters)
};
} // namespace juce

+ 30
- 11
libs/juce/source/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h View File

@@ -20,8 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/**
@@ -184,11 +184,19 @@ public:
: numChannels (other.numChannels),
size (other.size),
allocatedBytes (other.allocatedBytes),
channels (other.channels),
allocatedData (static_cast<HeapBlock<char, true>&&> (other.allocatedData)),
isClear (other.isClear)
{
memcpy (preallocatedChannelSpace, other.preallocatedChannelSpace, sizeof (preallocatedChannelSpace));
if (numChannels < (int) numElementsInArray (preallocatedChannelSpace))
{
channels = preallocatedChannelSpace;
memcpy (preallocatedChannelSpace, other.channels, sizeof (preallocatedChannelSpace));
}
else
{
channels = other.channels;
}
other.numChannels = 0;
other.size = 0;
other.allocatedBytes = 0;
@@ -200,10 +208,19 @@ public:
numChannels = other.numChannels;
size = other.size;
allocatedBytes = other.allocatedBytes;
channels = other.channels;
allocatedData = static_cast<HeapBlock<char, true>&&> (other.allocatedData);
isClear = other.isClear;
memcpy (preallocatedChannelSpace, other.preallocatedChannelSpace, sizeof (preallocatedChannelSpace));
if (numChannels < (int) numElementsInArray (preallocatedChannelSpace))
{
channels = preallocatedChannelSpace;
memcpy (preallocatedChannelSpace, other.channels, sizeof (preallocatedChannelSpace));
}
else
{
channels = other.channels;
}
other.numChannels = 0;
other.size = 0;
other.allocatedBytes = 0;
@@ -332,7 +349,7 @@ public:
auto numSamplesToCopy = (size_t) jmin (newNumSamples, size);
auto newChannels = reinterpret_cast<Type**> (newData.getData());
auto newChannels = reinterpret_cast<Type**> (newData.get());
auto newChan = reinterpret_cast<Type*> (newData + channelListSize);
for (int j = 0; j < newNumChannels; ++j)
@@ -364,7 +381,7 @@ public:
{
allocatedBytes = newTotalBytes;
allocatedData.allocate (newTotalBytes, clearExtraSpace || isClear);
channels = reinterpret_cast<Type**> (allocatedData.getData());
channels = reinterpret_cast<Type**> (allocatedData.get());
}
auto* chan = reinterpret_cast<Type*> (allocatedData + channelListSize);
@@ -629,7 +646,7 @@ public:
jassert (isPositiveAndBelow (channel, numChannels));
jassert (startSample >= 0 && numSamples >= 0 && startSample + numSamples <= size);
const auto increment = (endGain - startGain) / numSamples;
const auto increment = (endGain - startGain) / (float) numSamples;
auto* d = channels[channel] + startSample;
while (--numSamples >= 0)
@@ -1051,7 +1068,7 @@ private:
auto channelListSize = sizeof (Type*) * (size_t) (numChannels + 1);
allocatedBytes = (size_t) numChannels * (size_t) size * sizeof (Type) + channelListSize + 32;
allocatedData.malloc (allocatedBytes);
channels = reinterpret_cast<Type**> (allocatedData.getData());
channels = reinterpret_cast<Type**> (allocatedData.get());
auto* chan = (Type*) (allocatedData + channelListSize);
for (int i = 0; i < numChannels; ++i)
@@ -1076,7 +1093,7 @@ private:
else
{
allocatedData.malloc ((size_t) numChannels + 1, sizeof (Type*));
channels = reinterpret_cast<Type**> (allocatedData.getData());
channels = reinterpret_cast<Type**> (allocatedData.get());
}
for (int i = 0; i < numChannels; ++i)
@@ -1105,3 +1122,5 @@ private:
@see AudioBuffer
*/
typedef AudioBuffer<float> AudioSampleBuffer;
} // namespace juce

+ 10
- 5
libs/juce/source/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp View File

@@ -20,6 +20,9 @@
==============================================================================
*/
namespace juce
{
namespace FloatVectorHelpers
{
#define JUCE_INCREMENT_SRC_DEST dest += (16 / sizeof (*dest)); src += (16 / sizeof (*dest));
@@ -874,7 +877,7 @@ void JUCE_CALLTYPE FloatVectorOperations::convertFixedToFloat (float* dest, cons
vmulq_n_f32 (vcvtq_f32_s32 (vld1q_s32 (src)), multiplier),
JUCE_LOAD_NONE, JUCE_INCREMENT_SRC_DEST, )
#else
JUCE_PERFORM_VEC_OP_SRC_DEST (dest[i] = src[i] * multiplier,
JUCE_PERFORM_VEC_OP_SRC_DEST (dest[i] = (float) src[i] * multiplier,
Mode::mul (mult, _mm_cvtepi32_ps (_mm_loadu_si128 ((const __m128i*) src))),
JUCE_LOAD_NONE, JUCE_INCREMENT_SRC_DEST,
const Mode::ParallelType mult = Mode::load1 (multiplier);)
@@ -1068,9 +1071,9 @@ public:
#else
// These tests deliberately operate on misaligned memory and will be flagged up by
// checks for undefined behavior!
ValueType* const data1 = addBytesToPointer (buffer1.getData(), random.nextInt (16));
ValueType* const data2 = addBytesToPointer (buffer2.getData(), random.nextInt (16));
int* const int1 = addBytesToPointer (buffer3.getData(), random.nextInt (16));
ValueType* const data1 = addBytesToPointer (buffer1.get(), random.nextInt (16));
ValueType* const data2 = addBytesToPointer (buffer2.get(), random.nextInt (16));
int* const int1 = addBytesToPointer (buffer3.get(), random.nextInt (16));
#endif
fillRandomly (random, data1, num);
@@ -1158,7 +1161,7 @@ public:
static void convertFixed (float* d, const int* s, ValueType multiplier, int num)
{
while (--num >= 0)
*d++ = *s++ * multiplier;
*d++ = (float) *s++ * multiplier;
}
static bool areAllValuesEqual (const ValueType* d, int num, ValueType target)
@@ -1200,3 +1203,5 @@ public:
static FloatVectorOperationsTests vectorOpTests;
#endif
} // namespace juce

+ 34
- 1
libs/juce/source/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.h View File

@@ -20,7 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
#if JUCE_INTEL
#define JUCE_SNAP_TO_ZERO(n) if (! (n < -1.0e-8f || n > 1.0e-8f)) n = 0;
@@ -219,3 +220,35 @@ public:
*/
static void JUCE_CALLTYPE disableDenormalisedNumberSupport() noexcept;
};
//==============================================================================
/**
Helper class providing an RAII-based mechanism for temporarily disabling
denormals on your CPU.
*/
class ScopedNoDenormals
{
public:
inline ScopedNoDenormals() noexcept
{
#if JUCE_USE_SSE_INTRINSICS
mxcsr = _mm_getcsr();
_mm_setcsr (mxcsr | 0x8040); // add the DAZ and FZ bits
#endif
}
inline ~ScopedNoDenormals() noexcept
{
#if JUCE_USE_SSE_INTRINSICS
_mm_setcsr (mxcsr);
#endif
}
private:
#if JUCE_USE_SSE_INTRINSICS
unsigned int mxcsr;
#endif
};
} // namespace juce

+ 5
- 0
libs/juce/source/modules/juce_audio_basics/effects/juce_CatmullRomInterpolator.cpp View File

@@ -20,6 +20,9 @@
==============================================================================
*/
namespace juce
{
struct CatmullRomAlgorithm
{
static forcedinline float valueAtOffset (const float* const inputs, const float offset) noexcept
@@ -58,3 +61,5 @@ int CatmullRomInterpolator::processAdding (double actualRatio, const float* in,
{
return interpolateAdding<CatmullRomAlgorithm> (lastInputSamples, subSamplePos, actualRatio, in, out, numOut, gain);
}
} // namespace juce

+ 5
- 0
libs/juce/source/modules/juce_audio_basics/effects/juce_CatmullRomInterpolator.h View File

@@ -20,6 +20,9 @@
==============================================================================
*/
namespace juce
{
/**
Interpolator for resampling a stream of floats using Catmull-Rom interpolation.
@@ -84,3 +87,5 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CatmullRomInterpolator)
};
} // namespace juce

+ 4
- 2
libs/juce/source/modules/juce_audio_basics/effects/juce_Decibels.h View File

@@ -20,8 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/**
@@ -96,3 +96,5 @@ private:
Decibels(); // This class can't be instantiated, it's just a holder for static methods..
JUCE_DECLARE_NON_COPYABLE (Decibels)
};
} // namespace juce

+ 5
- 1
libs/juce/source/modules/juce_audio_basics/effects/juce_IIRFilter.cpp View File

@@ -20,7 +20,9 @@
==============================================================================
*/
//==============================================================================
namespace juce
{
IIRCoefficients::IIRCoefficients() noexcept
{
zeromem (coefficients, sizeof (coefficients));
@@ -335,3 +337,5 @@ void IIRFilter::processSamples (float* const samples, const int numSamples) noex
}
#undef JUCE_SNAP_TO_ZERO
} // namespace juce

+ 4
- 1
libs/juce/source/modules/juce_audio_basics/effects/juce_IIRFilter.h View File

@@ -20,7 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
class IIRFilter;
@@ -205,3 +206,5 @@ protected:
IIRFilter& operator= (const IIRFilter&);
JUCE_LEAK_DETECTOR (IIRFilter)
};
} // namespace juce

+ 5
- 0
libs/juce/source/modules/juce_audio_basics/effects/juce_IIRFilterOld.cpp View File

@@ -28,6 +28,9 @@
#define JUCE_SNAP_TO_ZERO(n)
#endif
namespace juce
{
//==============================================================================
IIRFilterOld::IIRFilterOld()
: active (false), v1 (0), v2 (0)
@@ -237,3 +240,5 @@ void IIRFilterOld::setCoefficients (double c1, double c2, double c3,
}
#undef JUCE_SNAP_TO_ZERO
} // namespace juce

+ 5
- 0
libs/juce/source/modules/juce_audio_basics/effects/juce_IIRFilterOld.h View File

@@ -26,6 +26,9 @@
#define __JUCE_IIRFILTER_OLD_JUCEHEADER__
namespace juce
{
//==============================================================================
/**
An IIR filter that can perform low, high, or band-pass filtering on an
@@ -145,4 +148,6 @@ protected:
};
} // namespace juce
#endif // __JUCE_IIRFILTER_OLD_JUCEHEADER__

+ 5
- 0
libs/juce/source/modules/juce_audio_basics/effects/juce_LagrangeInterpolator.cpp View File

@@ -20,6 +20,9 @@
==============================================================================
*/
namespace juce
{
namespace
{
static forcedinline void pushInterpolationSample (float* lastInputSamples, const float newValue) noexcept
@@ -196,3 +199,5 @@ int LagrangeInterpolator::processAdding (double actualRatio, const float* in, fl
{
return interpolateAdding<LagrangeAlgorithm> (lastInputSamples, subSamplePos, actualRatio, in, out, numOut, gain);
}
} // namespace juce

+ 5
- 0
libs/juce/source/modules/juce_audio_basics/effects/juce_LagrangeInterpolator.h View File

@@ -20,6 +20,9 @@
==============================================================================
*/
namespace juce
{
/**
Interpolator for resampling a stream of floats using 4-point lagrange interpolation.
@@ -84,3 +87,5 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LagrangeInterpolator)
};
} // namespace juce

+ 4
- 2
libs/juce/source/modules/juce_audio_basics/effects/juce_LinearSmoothedValue.h View File

@@ -20,8 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/**
@@ -182,3 +182,5 @@ private:
FloatType currentValue = 0, target = 0, step = 0;
int countdown = 0, stepsToTarget = 0;
};
} // namespace juce

+ 4
- 2
libs/juce/source/modules/juce_audio_basics/effects/juce_Reverb.h View File

@@ -20,8 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/**
@@ -316,3 +316,5 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Reverb)
};
} // namespace juce

+ 0
- 5
libs/juce/source/modules/juce_audio_basics/juce_audio_basics.cpp View File

@@ -76,9 +76,6 @@
#include <arm_neon.h>
#endif
namespace juce
{
#include "buffers/juce_AudioDataConverters.cpp"
#include "buffers/juce_FloatVectorOperations.cpp"
#include "buffers/juce_AudioChannelSet.cpp"
@@ -110,5 +107,3 @@ namespace juce
#include "sources/juce_ReverbAudioSource.cpp"
#include "sources/juce_ToneGeneratorAudioSource.cpp"
#include "synthesisers/juce_Synthesiser.cpp"
}

+ 2
- 6
libs/juce/source/modules/juce_audio_basics/juce_audio_basics.h View File

@@ -31,7 +31,7 @@
ID: juce_audio_basics
vendor: juce
version: 5.1.1
version: 5.1.2
name: JUCE audio and MIDI data classes
description: Classes for audio buffer manipulation, midi message handling, synthesis, etc.
website: http://www.juce.com/juce
@@ -51,9 +51,7 @@
#include <juce_core/juce_core.h>
namespace juce
{
//==============================================================================
#undef Complex // apparently some C libraries actually define these symbols (!)
#undef Factor
@@ -95,5 +93,3 @@ namespace juce
#include "sources/juce_ToneGeneratorAudioSource.h"
#include "synthesisers/juce_Synthesiser.h"
#include "audio_play_head/juce_AudioPlayHead.h"
}

+ 6
- 1
libs/juce/source/modules/juce_audio_basics/midi/juce_MidiBuffer.cpp View File

@@ -20,6 +20,9 @@
==============================================================================
*/
namespace juce
{
namespace MidiBufferHelpers
{
inline int getEventTime (const void* const d) noexcept
@@ -34,7 +37,7 @@ namespace MidiBufferHelpers
inline uint16 getEventTotalSize (const void* const d) noexcept
{
return getEventDataSize (d) + sizeof (int32) + sizeof (uint16);
return (uint16) (getEventDataSize (d) + sizeof (int32) + sizeof (uint16));
}
static int findActualEventLength (const uint8* const data, const int maxBytes) noexcept
@@ -225,3 +228,5 @@ bool MidiBuffer::Iterator::getNextEvent (MidiMessage& result, int& samplePositio
return true;
}
} // namespace juce

+ 9
- 6
libs/juce/source/modules/juce_audio_basics/midi/juce_MidiBuffer.h View File

@@ -20,8 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/**
@@ -160,8 +160,8 @@ public:
/**
Used to iterate through the events in a MidiBuffer.
Note that altering the buffer while an iterator is using it isn't a
safe operation.
Note that altering the buffer while an iterator is using it will produce
undefined behaviour.
@see MidiBuffer
*/
@@ -172,6 +172,9 @@ public:
/** Creates an Iterator for this MidiBuffer. */
Iterator (const MidiBuffer&) noexcept;
/** Creates a copy of an iterator. */
Iterator (const Iterator&) noexcept = default;
/** Destructor. */
~Iterator() noexcept;
@@ -214,8 +217,6 @@ public:
//==============================================================================
const MidiBuffer& buffer;
const uint8* data;
JUCE_DECLARE_NON_COPYABLE (Iterator)
};
/** The raw data holding this buffer.
@@ -227,3 +228,5 @@ public:
private:
JUCE_LEAK_DETECTOR (MidiBuffer)
};
} // namespace juce

+ 5
- 0
libs/juce/source/modules/juce_audio_basics/midi/juce_MidiFile.cpp View File

@@ -20,6 +20,9 @@
==============================================================================
*/
namespace juce
{
namespace MidiFileHelpers
{
static void writeVariableLengthInt (OutputStream& out, unsigned int v)
@@ -443,3 +446,5 @@ bool MidiFile::writeTrack (OutputStream& mainOut, const int trackNum)
return true;
}
} // namespace juce

+ 4
- 2
libs/juce/source/modules/juce_audio_basics/midi/juce_MidiFile.h View File

@@ -20,8 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/**
@@ -178,3 +178,5 @@ private:
JUCE_LEAK_DETECTOR (MidiFile)
};
} // namespace juce

+ 5
- 0
libs/juce/source/modules/juce_audio_basics/midi/juce_MidiKeyboardState.cpp View File

@@ -20,6 +20,9 @@
==============================================================================
*/
namespace juce
{
MidiKeyboardState::MidiKeyboardState()
{
zerostruct (noteStates);
@@ -179,3 +182,5 @@ void MidiKeyboardState::removeListener (MidiKeyboardStateListener* const listene
const ScopedLock sl (lock);
listeners.removeFirstMatchingValue (listener);
}
} // namespace juce

+ 4
- 1
libs/juce/source/modules/juce_audio_basics/midi/juce_MidiKeyboardState.h View File

@@ -20,7 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
class MidiKeyboardState;
@@ -197,3 +198,5 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiKeyboardState)
};
} // namespace juce

+ 5
- 0
libs/juce/source/modules/juce_audio_basics/midi/juce_MidiMessage.cpp View File

@@ -20,6 +20,9 @@
==============================================================================
*/
namespace juce
{
namespace MidiHelpers
{
inline uint8 initialByte (const int type, const int channel) noexcept
@@ -1119,3 +1122,5 @@ const char* MidiMessage::getControllerName (const int n)
return isPositiveAndBelow (n, numElementsInArray (names)) ? names[n] : nullptr;
}
} // namespace juce

+ 4
- 2
libs/juce/source/modules/juce_audio_basics/midi/juce_MidiMessage.h View File

@@ -20,8 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/**
@@ -936,3 +936,5 @@ private:
inline uint8* getData() const noexcept { return isHeapAllocated() ? packedData.allocatedData : (uint8*) packedData.asBytes; }
uint8* allocateSpace (int);
};
} // namespace juce

+ 4
- 0
libs/juce/source/modules/juce_audio_basics/midi/juce_MidiMessageSequence.cpp View File

@@ -20,6 +20,8 @@
==============================================================================
*/
namespace juce
{
MidiMessageSequence::MidiEventHolder::MidiEventHolder (const MidiMessage& mm) : message (mm) {}
MidiMessageSequence::MidiEventHolder::MidiEventHolder (MidiMessage&& mm) : message (static_cast<MidiMessage&&> (mm)) {}
@@ -334,3 +336,5 @@ void MidiMessageSequence::createControllerUpdatesForTime (int channelNumber, dou
}
}
}
} // namespace juce

+ 4
- 2
libs/juce/source/modules/juce_audio_basics/midi/juce_MidiMessageSequence.h View File

@@ -20,8 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/**
@@ -294,3 +294,5 @@ private:
JUCE_LEAK_DETECTOR (MidiMessageSequence)
};
} // namespace juce

+ 5
- 0
libs/juce/source/modules/juce_audio_basics/midi/juce_MidiRPN.cpp View File

@@ -20,6 +20,9 @@
==============================================================================
*/
namespace juce
{
MidiRPNDetector::MidiRPNDetector() noexcept
{
}
@@ -369,3 +372,5 @@ private:
static MidiRPNGeneratorTests MidiRPNGeneratorUnitTests;
#endif // JUCE_UNIT_TESTS
} // namespace juce

+ 4
- 2
libs/juce/source/modules/juce_audio_basics/midi/juce_MidiRPN.h View File

@@ -20,8 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/** Represents a MIDI RPN (registered parameter number) or NRPN (non-registered
@@ -144,3 +144,5 @@ public:
bool isNRPN = false,
bool use14BitValue = true);
};
} // namespace juce

+ 5
- 0
libs/juce/source/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp View File

@@ -20,6 +20,9 @@
==============================================================================
*/
namespace juce
{
namespace
{
const uint8 noLSBValueReceived = 0xff;
@@ -2148,3 +2151,5 @@ private:
static MPEInstrumentTests MPEInstrumentUnitTests;
#endif // JUCE_UNIT_TESTS
} // namespace juce

+ 4
- 2
libs/juce/source/modules/juce_audio_basics/mpe/juce_MPEInstrument.h View File

@@ -20,8 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/*
@@ -374,3 +374,5 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MPEInstrument)
};
} // namespace juce

+ 5
- 0
libs/juce/source/modules/juce_audio_basics/mpe/juce_MPEMessages.cpp View File

@@ -20,6 +20,9 @@
==============================================================================
*/
namespace juce
{
MidiBuffer MPEMessages::addZone (MPEZone zone)
{
MidiBuffer buffer (MidiRPNGenerator::generate (zone.getFirstNoteChannel(),
@@ -193,3 +196,5 @@ private:
static MPEMessagesTests MPEMessagesUnitTests;
#endif // JUCE_UNIT_TESTS
} // namespace juce

+ 4
- 2
libs/juce/source/modules/juce_audio_basics/mpe/juce_MPEMessages.h View File

@@ -20,8 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/**
@@ -87,3 +87,5 @@ public:
*/
static const int zoneLayoutMessagesRpnNumber = 6;
};
} // namespace juce

+ 5
- 0
libs/juce/source/modules/juce_audio_basics/mpe/juce_MPENote.cpp View File

@@ -20,6 +20,9 @@
==============================================================================
*/
namespace juce
{
namespace
{
uint16 generateNoteID (int midiChannel, int midiNoteNumber) noexcept
@@ -128,3 +131,5 @@ private:
static MPENoteTests MPENoteUnitTests;
#endif // JUCE_UNIT_TESTS
} // namespace juce

+ 4
- 2
libs/juce/source/modules/juce_audio_basics/mpe/juce_MPENote.h View File

@@ -20,8 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/**
@@ -172,3 +172,5 @@ struct JUCE_API MPENote
/** Returns true if two notes are different notes, determined by their unique ID. */
bool operator!= (const MPENote& other) const noexcept;
};
} // namespace juce

+ 5
- 0
libs/juce/source/modules/juce_audio_basics/mpe/juce_MPESynthesiser.cpp View File

@@ -20,6 +20,9 @@
==============================================================================
*/
namespace juce
{
MPESynthesiser::MPESynthesiser()
{
}
@@ -352,3 +355,5 @@ void MPESynthesiser::renderNextSubBlock (AudioBuffer<double>& buffer, int startS
voice->renderNextBlock (buffer, startSample, numSamples);
}
}
} // namespace juce

+ 4
- 2
libs/juce/source/modules/juce_audio_basics/mpe/juce_MPESynthesiser.h View File

@@ -20,8 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/**
@@ -305,3 +305,5 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MPESynthesiser)
};
} // namespace juce

+ 5
- 0
libs/juce/source/modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.cpp View File

@@ -20,6 +20,9 @@
==============================================================================
*/
namespace juce
{
MPESynthesiserBase::MPESynthesiserBase()
: instrument (new MPEInstrument),
sampleRate (0),
@@ -178,3 +181,5 @@ void MPESynthesiserBase::setMinimumRenderingSubdivisionSize (int numSamples, boo
minimumSubBlockSize = numSamples;
subBlockSubdivisionIsStrict = shouldBeStrict;
}
} // namespace juce

+ 4
- 2
libs/juce/source/modules/juce_audio_basics/mpe/juce_MPESynthesiserBase.h View File

@@ -20,8 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/**
@@ -204,3 +204,5 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MPESynthesiserBase)
};
} // namespace juce

+ 5
- 0
libs/juce/source/modules/juce_audio_basics/mpe/juce_MPESynthesiserVoice.cpp View File

@@ -20,6 +20,9 @@
==============================================================================
*/
namespace juce
{
MPESynthesiserVoice::MPESynthesiserVoice()
: currentSampleRate (0), noteStartTime (0)
{
@@ -49,3 +52,5 @@ void MPESynthesiserVoice::clearCurrentNote() noexcept
{
currentlyPlayingNote = MPENote();
}
} // namespace juce

+ 4
- 1
libs/juce/source/modules/juce_audio_basics/mpe/juce_MPESynthesiserVoice.h View File

@@ -20,7 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/**
@@ -183,3 +184,5 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MPESynthesiserVoice)
};
} // namespace juce

+ 5
- 0
libs/juce/source/modules/juce_audio_basics/mpe/juce_MPEValue.cpp View File

@@ -20,6 +20,9 @@
==============================================================================
*/
namespace juce
{
MPEValue::MPEValue() noexcept : normalisedValue (8192)
{
}
@@ -166,3 +169,5 @@ private:
static MPEValueTests MPEValueUnitTests;
#endif // JUCE_UNIT_TESTS
} // namespace juce

+ 4
- 2
libs/juce/source/modules/juce_audio_basics/mpe/juce_MPEValue.h View File

@@ -20,8 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/**
@@ -88,3 +88,5 @@ private:
MPEValue (int normalisedValue);
int normalisedValue;
};
} // namespace juce

+ 5
- 0
libs/juce/source/modules/juce_audio_basics/mpe/juce_MPEZone.cpp View File

@@ -20,6 +20,9 @@
==============================================================================
*/
namespace juce
{
namespace
{
void checkAndLimitZoneParameters (int minValue,
@@ -312,3 +315,5 @@ private:
static MPEZoneTests MPEZoneUnitTests;
#endif // JUCE_UNIT_TESTS
} // namespace juce

+ 4
- 2
libs/juce/source/modules/juce_audio_basics/mpe/juce_MPEZone.h View File

@@ -20,8 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/**
@@ -138,3 +138,5 @@ private:
int perNotePitchbendRange;
int masterPitchbendRange;
};
} // namespace juce

+ 5
- 0
libs/juce/source/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.cpp View File

@@ -20,6 +20,9 @@
==============================================================================
*/
namespace juce
{
MPEZoneLayout::MPEZoneLayout() noexcept
{
}
@@ -378,3 +381,5 @@ static MPEZoneLayoutTests MPEZoneLayoutUnitTests;
#endif // JUCE_UNIT_TESTS
} // namespace juce

+ 4
- 2
libs/juce/source/modules/juce_audio_basics/mpe/juce_MPEZoneLayout.h View File

@@ -20,8 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/**
@@ -157,3 +157,5 @@ private:
void processZoneLayoutRpnMessage (MidiRPNMessage);
void processPitchbendRangeRpnMessage (MidiRPNMessage);
};
} // namespace juce

+ 4
- 1
libs/juce/source/modules/juce_audio_basics/native/juce_mac_CoreAudioLayouts.h View File

@@ -20,7 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
#if JUCE_MAC || JUCE_IOS
@@ -304,3 +305,5 @@ private:
};
#endif
} // namespace juce

+ 4
- 2
libs/juce/source/modules/juce_audio_basics/sources/juce_AudioSource.h View File

@@ -20,8 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/**
@@ -173,3 +173,5 @@ public:
*/
virtual void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill) = 0;
};
} // namespace juce

+ 5
- 0
libs/juce/source/modules/juce_audio_basics/sources/juce_BufferingAudioSource.cpp View File

@@ -20,6 +20,9 @@
==============================================================================
*/
namespace juce
{
BufferingAudioSource::BufferingAudioSource (PositionableAudioSource* s,
TimeSliceThread& thread,
const bool deleteSourceWhenDeleted,
@@ -307,3 +310,5 @@ int BufferingAudioSource::useTimeSlice()
{
return readNextBufferChunk() ? 1 : 100;
}
} // namespace juce

+ 4
- 2
libs/juce/source/modules/juce_audio_basics/sources/juce_BufferingAudioSource.h View File

@@ -20,8 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/**
@@ -113,3 +113,5 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (BufferingAudioSource)
};
} // namespace juce

+ 5
- 0
libs/juce/source/modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.cpp View File

@@ -20,6 +20,9 @@
==============================================================================
*/
namespace juce
{
ChannelRemappingAudioSource::ChannelRemappingAudioSource (AudioSource* const source_,
const bool deleteSourceWhenDeleted)
: source (source_, deleteSourceWhenDeleted),
@@ -180,3 +183,5 @@ void ChannelRemappingAudioSource::restoreFromXml (const XmlElement& e)
remappedOutputs.add (outs[i].getIntValue());
}
}
} // namespace juce

+ 4
- 2
libs/juce/source/modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.h View File

@@ -20,8 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/**
@@ -135,3 +135,5 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChannelRemappingAudioSource)
};
} // namespace juce

+ 5
- 0
libs/juce/source/modules/juce_audio_basics/sources/juce_IIRFilterAudioSource.cpp View File

@@ -20,6 +20,9 @@
==============================================================================
*/
namespace juce
{
IIRFilterAudioSource::IIRFilterAudioSource (AudioSource* const inputSource,
const bool deleteInputWhenDeleted)
: input (inputSource, deleteInputWhenDeleted)
@@ -73,3 +76,5 @@ void IIRFilterAudioSource::getNextAudioBlock (const AudioSourceChannelInfo& buff
->processSamples (bufferToFill.buffer->getWritePointer (i, bufferToFill.startSample),
bufferToFill.numSamples);
}
} // namespace juce

+ 4
- 2
libs/juce/source/modules/juce_audio_basics/sources/juce_IIRFilterAudioSource.h View File

@@ -20,8 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/**
@@ -62,3 +62,5 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (IIRFilterAudioSource)
};
} // namespace juce

+ 5
- 1
libs/juce/source/modules/juce_audio_basics/sources/juce_MemoryAudioSource.cpp View File

@@ -20,7 +20,9 @@
==============================================================================
*/
//==============================================================================
namespace juce
{
MemoryAudioSource::MemoryAudioSource (AudioBuffer<float>& bufferToUse, bool copyMemory, bool shouldLoop)
: isLooping (shouldLoop)
{
@@ -64,3 +66,5 @@ void MemoryAudioSource::getNextAudioBlock (const AudioSourceChannelInfo& bufferT
if (pos < m)
dst.clear (bufferToFill.startSample + pos, m - pos);
}
} // namespace juce

+ 4
- 2
libs/juce/source/modules/juce_audio_basics/sources/juce_MemoryAudioSource.h View File

@@ -20,8 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/**
@@ -59,3 +59,5 @@ private:
//==============================================================================
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MemoryAudioSource)
};
} // namespace juce

+ 5
- 0
libs/juce/source/modules/juce_audio_basics/sources/juce_MixerAudioSource.cpp View File

@@ -20,6 +20,9 @@
==============================================================================
*/
namespace juce
{
MixerAudioSource::MixerAudioSource()
: currentSampleRate (0.0), bufferSizeExpected (0)
{
@@ -151,3 +154,5 @@ void MixerAudioSource::getNextAudioBlock (const AudioSourceChannelInfo& info)
info.clearActiveBufferRegion();
}
}
} // namespace juce

+ 4
- 2
libs/juce/source/modules/juce_audio_basics/sources/juce_MixerAudioSource.h View File

@@ -20,8 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/**
@@ -93,3 +93,5 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MixerAudioSource)
};
} // namespace juce

+ 4
- 2
libs/juce/source/modules/juce_audio_basics/sources/juce_PositionableAudioSource.h View File

@@ -20,8 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/**
@@ -70,3 +70,5 @@ public:
/** Tells the source whether you'd like it to play in a loop. */
virtual void setLooping (bool shouldLoop) { ignoreUnused (shouldLoop); }
};
} // namespace juce

+ 5
- 0
libs/juce/source/modules/juce_audio_basics/sources/juce_ResamplingAudioSource.cpp View File

@@ -20,6 +20,9 @@
==============================================================================
*/
namespace juce
{
ResamplingAudioSource::ResamplingAudioSource (AudioSource* const inputSource,
const bool deleteInputWhenDeleted,
const int channels)
@@ -259,3 +262,5 @@ void ResamplingAudioSource::applyFilter (float* samples, int num, FilterState& f
*samples++ = (float) out;
}
}
} // namespace juce

+ 4
- 2
libs/juce/source/modules/juce_audio_basics/sources/juce_ResamplingAudioSource.h View File

@@ -20,8 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/**
@@ -99,3 +99,5 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ResamplingAudioSource)
};
} // namespace juce

+ 5
- 0
libs/juce/source/modules/juce_audio_basics/sources/juce_ReverbAudioSource.cpp View File

@@ -20,6 +20,9 @@
==============================================================================
*/
namespace juce
{
ReverbAudioSource::ReverbAudioSource (AudioSource* const inputSource, const bool deleteInputWhenDeleted)
: input (inputSource, deleteInputWhenDeleted),
bypass (false)
@@ -76,3 +79,5 @@ void ReverbAudioSource::setBypassed (bool b) noexcept
reverb.reset();
}
}
} // namespace juce

+ 4
- 2
libs/juce/source/modules/juce_audio_basics/sources/juce_ReverbAudioSource.h View File

@@ -20,8 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/**
@@ -68,3 +68,5 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ReverbAudioSource)
};
} // namespace juce

+ 5
- 0
libs/juce/source/modules/juce_audio_basics/sources/juce_ToneGeneratorAudioSource.cpp View File

@@ -20,6 +20,9 @@
==============================================================================
*/
namespace juce
{
ToneGeneratorAudioSource::ToneGeneratorAudioSource()
: frequency (1000.0),
sampleRate (44100.0),
@@ -71,3 +74,5 @@ void ToneGeneratorAudioSource::getNextAudioBlock (const AudioSourceChannelInfo&
info.buffer->setSample (j, info.startSample + i, sample);
}
}
} // namespace juce

+ 4
- 2
libs/juce/source/modules/juce_audio_basics/sources/juce_ToneGeneratorAudioSource.h View File

@@ -20,8 +20,8 @@
==============================================================================
*/
#pragma once
namespace juce
{
//==============================================================================
/**
@@ -65,3 +65,5 @@ private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ToneGeneratorAudioSource)
};