Browse Source

Fixed some warnings flagged up when enabling -Wswitch-enum, -Wswitch-default, -Wredundant-decls, and -Wimplicit-fallthrough

tags/2021-05-28
ed 5 years ago
parent
commit
59a058fdc6
69 changed files with 518 additions and 409 deletions
  1. +3
    -0
      examples/Assets/Box2DTests/ApplyForce.h
  2. +38
    -0
      examples/BLOCKS/BlocksMonitorDemo.h
  3. +3
    -7
      examples/GUI/DialogsDemo.h
  4. +1
    -0
      examples/GUI/FlexBoxDemo.h
  5. +1
    -0
      examples/Utilities/SystemInfoDemo.h
  6. +1
    -0
      extras/AudioPluginHost/Source/UI/PluginWindow.h
  7. +6
    -3
      extras/Projucer/Source/Licenses/jucer_LicenseController.cpp
  8. +1
    -0
      extras/Projucer/Source/LiveBuildEngine/jucer_DiagnosticMessage.h
  9. +7
    -0
      extras/Projucer/Source/Project/jucer_Project.cpp
  10. +5
    -0
      extras/Projucer/Source/Project/jucer_ProjectType.h
  11. +2
    -12
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h
  12. +2
    -0
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CLion.h
  13. +16
    -26
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h
  14. +24
    -41
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h
  15. +11
    -9
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Make.h
  16. +8
    -0
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h
  17. +1
    -0
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.cpp
  18. +4
    -0
      extras/Projucer/Source/ProjectSaving/jucer_XcodeProjectParser.h
  19. +68
    -1
      modules/juce_audio_basics/buffers/juce_AudioChannelSet.cpp
  20. +5
    -4
      modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp
  21. +10
    -0
      modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp
  22. +3
    -0
      modules/juce_audio_formats/codecs/juce_MP3AudioFormat.cpp
  23. +4
    -0
      modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp
  24. +1
    -5
      modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h
  25. +0
    -204
      modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp
  26. +1
    -0
      modules/juce_audio_plugin_client/utility/juce_PluginHostType.h
  27. +66
    -35
      modules/juce_audio_processors/format_types/juce_VSTCommon.h
  28. +18
    -13
      modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp
  29. +2
    -0
      modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp
  30. +1
    -0
      modules/juce_audio_utils/native/juce_android_BluetoothMidiDevicePairingDialogue.cpp
  31. +7
    -2
      modules/juce_blocks_basics/littlefoot/juce_LittleFootRunner.h
  32. +10
    -8
      modules/juce_blocks_basics/protocol/juce_BlockModels.h
  33. +4
    -0
      modules/juce_blocks_basics/topology/internal/juce_Detector.cpp
  34. +3
    -0
      modules/juce_box2d/juce_box2d.cpp
  35. +0
    -2
      modules/juce_core/files/juce_FileOutputStream.cpp
  36. +2
    -0
      modules/juce_core/javascript/juce_JSON.cpp
  37. +6
    -0
      modules/juce_core/native/juce_BasicNativeHeaders.h
  38. +2
    -1
      modules/juce_core/native/juce_linux_Files.cpp
  39. +1
    -0
      modules/juce_core/native/juce_mac_Files.mm
  40. +20
    -0
      modules/juce_core/system/juce_PlatformDefs.h
  41. +11
    -4
      modules/juce_core/text/juce_CharacterFunctions.h
  42. +1
    -1
      modules/juce_core/xml/juce_XmlElement.cpp
  43. +1
    -1
      modules/juce_core/zip/juce_GZIPCompressorOutputStream.cpp
  44. +12
    -2
      modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp
  45. +3
    -0
      modules/juce_data_structures/values/juce_ValueTreeSynchroniser.cpp
  46. +1
    -0
      modules/juce_dsp/frequency/juce_Convolution.cpp
  47. +11
    -9
      modules/juce_dsp/frequency/juce_Windowing.cpp
  48. +0
    -2
      modules/juce_events/messages/juce_MessageManager.cpp
  49. +5
    -4
      modules/juce_graphics/geometry/juce_Rectangle.h
  50. +9
    -0
      modules/juce_graphics/image_formats/juce_JPEGLoader.cpp
  51. +6
    -0
      modules/juce_graphics/image_formats/juce_PNGLoader.cpp
  52. +3
    -0
      modules/juce_graphics/images/juce_Image.cpp
  53. +22
    -0
      modules/juce_graphics/native/juce_RenderingHelpers.h
  54. +2
    -0
      modules/juce_graphics/native/juce_mac_Fonts.mm
  55. +0
    -2
      modules/juce_gui_basics/filebrowser/juce_FileTreeComponent.cpp
  56. +1
    -0
      modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp
  57. +1
    -0
      modules/juce_gui_basics/native/juce_linux_X11_Windowing.cpp
  58. +1
    -0
      modules/juce_gui_basics/native/juce_mac_MouseCursor.mm
  59. +20
    -0
      modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm
  60. +1
    -0
      modules/juce_gui_basics/native/juce_win32_Windowing.cpp
  61. +8
    -6
      modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.cpp
  62. +9
    -0
      modules/juce_gui_basics/positioning/juce_RelativeRectangle.cpp
  63. +5
    -3
      modules/juce_gui_basics/widgets/juce_Toolbar.cpp
  64. +1
    -1
      modules/juce_gui_extra/code_editor/juce_CPlusPlusCodeTokeniserFunctions.h
  65. +9
    -0
      modules/juce_gui_extra/native/juce_linux_XEmbedComponent.cpp
  66. +1
    -0
      modules/juce_opengl/opengl/juce_OpenGLTexture.cpp
  67. +1
    -0
      modules/juce_osc/osc/juce_OSCAddress.cpp
  68. +1
    -0
      modules/juce_video/native/juce_android_CameraDevice.h
  69. +4
    -1
      modules/juce_video/native/juce_mac_Video.h

+ 3
- 0
examples/Assets/Box2DTests/ApplyForce.h View File

@@ -166,6 +166,9 @@ public:
m_body->ApplyTorque(-50.0f); m_body->ApplyTorque(-50.0f);
} }
break; break;
default:
break;
} }
} }


+ 38
- 0
examples/BLOCKS/BlocksMonitorDemo.h View File

@@ -175,7 +175,11 @@ public:
return { static_cast<float> (port.index), static_cast<float> (block->getHeight()) }; return { static_cast<float> (port.index), static_cast<float> (block->getHeight()) };
case e::west: case e::west:
return { 0.0f, static_cast<float> (port.index) }; return { 0.0f, static_cast<float> (port.index) };
default:
break;
} }
break;
} }
case 90: case 90:
{ {
@@ -189,7 +193,11 @@ public:
return { static_cast<float> (0.0f - block->getHeight()), static_cast<float> (port.index) }; return { static_cast<float> (0.0f - block->getHeight()), static_cast<float> (port.index) };
case e::west: case e::west:
return { static_cast<float> (-1.0f - port.index), 0.0f }; return { static_cast<float> (-1.0f - port.index), 0.0f };
default:
break;
} }
break;
} }
case 180: case 180:
{ {
@@ -203,7 +211,11 @@ public:
return { static_cast<float> (-1.0f - port.index), static_cast<float> (0.0f - block->getHeight()) }; return { static_cast<float> (-1.0f - port.index), static_cast<float> (0.0f - block->getHeight()) };
case e::west: case e::west:
return { 0.0f, static_cast<float> (-1.0f - port.index) }; return { 0.0f, static_cast<float> (-1.0f - port.index) };
default:
break;
} }
break;
} }
case 270: case 270:
{ {
@@ -217,8 +229,15 @@ public:
return { static_cast<float> (block->getHeight()), static_cast<float> (-1.0f - port.index) }; return { static_cast<float> (block->getHeight()), static_cast<float> (-1.0f - port.index) };
case e::west: case e::west:
return { static_cast<float> (port.index), 0.0f }; return { static_cast<float> (port.index), 0.0f };
default:
break;
} }
break;
} }
default:
break;
} }
return {}; return {};
@@ -921,7 +940,11 @@ private:
return 90; return 90;
case edge::west: case edge::west:
return 270; return 270;
default:
break;
} }
break;
} }
case edge::south: case edge::south:
{ {
@@ -935,7 +958,11 @@ private:
return 270; return 270;
case edge::west: case edge::west:
return 90; return 90;
default:
break;
} }
break;
} }
case edge::east: case edge::east:
{ {
@@ -949,7 +976,11 @@ private:
return 180; return 180;
case edge::west: case edge::west:
return 0; return 0;
default:
break;
} }
break;
} }
case edge::west: case edge::west:
@@ -964,8 +995,15 @@ private:
return 0; return 0;
case edge::west: case edge::west:
return 180; return 180;
default:
break;
} }
break;
} }
default:
break;
} }
return 0; return 0;


+ 3
- 7
examples/GUI/DialogsDemo.h View File

@@ -219,13 +219,9 @@ private:
{ {
AlertWindow::AlertIconType icon = AlertWindow::NoIcon; AlertWindow::AlertIconType icon = AlertWindow::NoIcon;
switch (type)
{
case warningAlertWindow: icon = AlertWindow::WarningIcon; break;
case infoAlertWindow: icon = AlertWindow::InfoIcon; break;
case questionAlertWindow: icon = AlertWindow::QuestionIcon; break;
default: break;
}
if (type == warningAlertWindow) icon = AlertWindow::WarningIcon;
if (type == infoAlertWindow) icon = AlertWindow::InfoIcon;
if (type == questionAlertWindow) icon = AlertWindow::QuestionIcon;
AlertWindow::showMessageBoxAsync (icon, "This is an AlertWindow", AlertWindow::showMessageBoxAsync (icon, "This is an AlertWindow",
"And this is the AlertWindow's message. Blah blah blah blah blah blah blah blah blah blah blah blah blah.", "And this is the AlertWindow's message. Blah blah blah blah blah blah blah blah blah blah blah blah blah.",


+ 1
- 0
examples/GUI/FlexBoxDemo.h View File

@@ -118,6 +118,7 @@ struct DemoFlexPanel : public juce::Component
case 3: flexItem.alignSelf = FlexItem::AlignSelf::flexEnd; break; case 3: flexItem.alignSelf = FlexItem::AlignSelf::flexEnd; break;
case 4: flexItem.alignSelf = FlexItem::AlignSelf::center; break; case 4: flexItem.alignSelf = FlexItem::AlignSelf::center; break;
case 5: flexItem.alignSelf = FlexItem::AlignSelf::stretch; break; case 5: flexItem.alignSelf = FlexItem::AlignSelf::stretch; break;
default: break;
} }
refreshLayout(); refreshLayout();


+ 1
- 0
examples/Utilities/SystemInfoDemo.h View File

@@ -89,6 +89,7 @@ static const char* getDisplayOrientation()
case Desktop::upsideDown: return "Upside-down"; case Desktop::upsideDown: return "Upside-down";
case Desktop::rotatedClockwise: return "Rotated Clockwise"; case Desktop::rotatedClockwise: return "Rotated Clockwise";
case Desktop::rotatedAntiClockwise: return "Rotated Anti-clockwise"; case Desktop::rotatedAntiClockwise: return "Rotated Anti-clockwise";
case Desktop::allOrientations: return "All";
default: jassertfalse; break; default: jassertfalse; break;
} }


+ 1
- 0
extras/AudioPluginHost/Source/UI/PluginWindow.h View File

@@ -227,6 +227,7 @@ private:
case Type::programs: return "Programs"; case Type::programs: return "Programs";
case Type::audioIO: return "IO"; case Type::audioIO: return "IO";
case Type::debug: return "Debug"; case Type::debug: return "Debug";
case Type::numTypes:
default: return {}; default: return {};
} }
} }


+ 6
- 3
extras/Projucer/Source/Licenses/jucer_LicenseController.cpp View File

@@ -59,6 +59,8 @@ static const char* getLicenseStateValue (LicenseState::Type type)
case LicenseState::Type::edu: return "edu"; case LicenseState::Type::edu: return "edu";
case LicenseState::Type::indie: return "indie"; case LicenseState::Type::indie: return "indie";
case LicenseState::Type::pro: return "pro"; case LicenseState::Type::pro: return "pro";
case LicenseState::Type::notLoggedIn:
case LicenseState::Type::noLicenseChosenYet:
default: return nullptr; default: return nullptr;
} }
} }
@@ -77,9 +79,10 @@ static const char* getApplicationUsageDataStateValue (LicenseState::ApplicationU
{ {
switch (type) switch (type)
{ {
case LicenseState::ApplicationUsageData::enabled: return "enabled";
case LicenseState::ApplicationUsageData::disabled: return "disabled";
default: return "notChosen";
case LicenseState::ApplicationUsageData::enabled: return "enabled";
case LicenseState::ApplicationUsageData::disabled: return "disabled";
case LicenseState::ApplicationUsageData::notChosenYet:
default: return "notChosen";
} }
} }


+ 1
- 0
extras/Projucer/Source/LiveBuildEngine/jucer_DiagnosticMessage.h View File

@@ -79,6 +79,7 @@ struct DiagnosticMessage
case error: res << "error: "; break; case error: res << "error: "; break;
case warning: res << "warning: "; break; case warning: res << "warning: "; break;
case note: res << "note: "; break; case note: res << "note: "; break;
default: break;
}; };
res << mainFile << ": "; res << mainFile << ": ";


+ 7
- 0
extras/Projucer/Source/Project/jucer_Project.cpp View File

@@ -855,6 +855,10 @@ bool Project::shouldBuildTargetType (ProjectType::Target::Type targetType) const
return projectType.isAudioPlugin(); return projectType.isAudioPlugin();
case ProjectType::Target::unspecified: case ProjectType::Target::unspecified:
return false; return false;
case ProjectType::Target::GUIApp:
case ProjectType::Target::ConsoleApp:
case ProjectType::Target::StaticLibrary:
case ProjectType::Target::DynamicLibrary:
default: default:
break; break;
} }
@@ -894,6 +898,7 @@ const char* ProjectType::Target::getName() const noexcept
case UnityPlugIn: return "Unity Plugin"; case UnityPlugIn: return "Unity Plugin";
case SharedCodeTarget: return "Shared Code"; case SharedCodeTarget: return "Shared Code";
case AggregateTarget: return "All"; case AggregateTarget: return "All";
case unspecified:
default: return "undefined"; default: return "undefined";
} }
} }
@@ -915,6 +920,8 @@ ProjectType::Target::TargetFileType ProjectType::Target::getTargetFileType() con
case RTASPlugIn: return pluginBundle; case RTASPlugIn: return pluginBundle;
case UnityPlugIn: return pluginBundle; case UnityPlugIn: return pluginBundle;
case SharedCodeTarget: return staticLibrary; case SharedCodeTarget: return staticLibrary;
case AggregateTarget:
case unspecified:
default: default:
break; break;
} }


+ 5
- 0
extras/Projucer/Source/Project/jucer_ProjectType.h View File

@@ -191,6 +191,11 @@ struct ProjectType_AudioPlugin : public ProjectType
case Target::SharedCodeTarget: case Target::SharedCodeTarget:
case Target::AggregateTarget: case Target::AggregateTarget:
return true; return true;
case Target::GUIApp:
case Target::ConsoleApp:
case Target::StaticLibrary:
case Target::DynamicLibrary:
case Target::unspecified:
default: default:
break; break;
} }


+ 2
- 12
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h View File

@@ -51,18 +51,8 @@ public:
bool supportsTargetType (ProjectType::Target::Type type) const override bool supportsTargetType (ProjectType::Target::Type type) const override
{ {
switch (type)
{
case ProjectType::Target::GUIApp:
case ProjectType::Target::StaticLibrary:
case ProjectType::Target::DynamicLibrary:
case ProjectType::Target::StandalonePlugIn:
return true;
default:
break;
}
return false;
return type == ProjectType::Target::GUIApp || type == ProjectType::Target::StaticLibrary
|| type == ProjectType::Target::DynamicLibrary || type == ProjectType::Target::StandalonePlugIn;
} }
//============================================================================== //==============================================================================


+ 2
- 0
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CLion.h View File

@@ -356,6 +356,8 @@ private:
properties.add ("MODULE"); properties.add ("MODULE");
break; break;
case ProjectType::Target::TargetFileType::macOSAppex:
case ProjectType::Target::TargetFileType::unknown:
default: default:
continue; continue;
} }


+ 16
- 26
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h View File

@@ -122,6 +122,13 @@ public:
case ProjectType::Target::VSTPlugIn: case ProjectType::Target::VSTPlugIn:
case ProjectType::Target::DynamicLibrary: case ProjectType::Target::DynamicLibrary:
return true; return true;
case ProjectType::Target::AAXPlugIn:
case ProjectType::Target::RTASPlugIn:
case ProjectType::Target::UnityPlugIn:
case ProjectType::Target::VST3PlugIn:
case ProjectType::Target::AudioUnitPlugIn:
case ProjectType::Target::AudioUnitv3PlugIn:
case ProjectType::Target::unspecified:
default: default:
break; break;
} }
@@ -274,6 +281,8 @@ private:
case staticLibrary: return ".lib"; case staticLibrary: return ".lib";
case sharedLibraryOrDLL: case sharedLibraryOrDLL:
case pluginBundle: return ".dll"; case pluginBundle: return ".dll";
case macOSAppex:
case unknown:
default: default:
break; break;
} }
@@ -284,17 +293,10 @@ private:
{ {
case executable: return {}; case executable: return {};
case staticLibrary: return ".a"; case staticLibrary: return ".a";
case sharedLibraryOrDLL: return ".so";
case pluginBundle: case pluginBundle:
switch (type)
{
case VSTPlugIn: return ".so";
default: break;
}
return ".so";
case sharedLibraryOrDLL: return ".so";
case macOSAppex:
case unknown:
default: default:
break; break;
} }
@@ -523,22 +525,10 @@ private:
static int getTypeIndex (const ProjectType::Target::Type& type) static int getTypeIndex (const ProjectType::Target::Type& type)
{ {
switch (type)
{
case ProjectType::Target::GUIApp:
case ProjectType::Target::StandalonePlugIn:
return 0;
case ProjectType::Target::ConsoleApp:
return 1;
case ProjectType::Target::StaticLibrary:
case ProjectType::Target::SharedCodeTarget:
return 2;
case ProjectType::Target::DynamicLibrary:
case ProjectType::Target::VSTPlugIn:
return 3;
default:
break;
}
if (type == ProjectType::Target::GUIApp || type == ProjectType::Target::StandalonePlugIn) return 0;
if (type == ProjectType::Target::ConsoleApp) return 1;
if (type == ProjectType::Target::StaticLibrary || type == ProjectType::Target::SharedCodeTarget) return 2;
if (type == ProjectType::Target::DynamicLibrary || type == ProjectType::Target::VSTPlugIn) return 3;
return 0; return 0;
} }


+ 24
- 41
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h View File

@@ -726,15 +726,10 @@ public:
String getProjectType() const String getProjectType() const
{ {
switch (getTargetFileType())
{
case executable:
return "Application";
case staticLibrary:
return "StaticLibrary";
default:
break;
}
auto targetFileType = getTargetFileType();
if (targetFileType == executable) return "Application";
if (targetFileType == staticLibrary) return "StaticLibrary";
return "DynamicLibrary"; return "DynamicLibrary";
} }
@@ -977,25 +972,17 @@ public:
{ {
auto fileType = getTargetFileType(); auto fileType = getTargetFileType();
switch (fileType)
{
case executable: return ".exe";
case staticLibrary: return ".lib";
case sharedLibraryOrDLL: return ".dll";
case pluginBundle:
switch (type)
{
case VST3PlugIn: return ".vst3";
case AAXPlugIn: return ".aaxdll";
case RTASPlugIn: return ".dpm";
default: break;
}
if (fileType == executable) return ".exe";
if (fileType == staticLibrary) return ".lib";
if (fileType == sharedLibraryOrDLL) return ".dll";
return ".dll";
if (fileType == pluginBundle)
{
if (type == VST3PlugIn) return ".vst3";
if (type == AAXPlugIn) return ".aaxdll";
if (type == RTASPlugIn) return ".dpm";
default:
break;
return ".dll";
} }
return {}; return {};
@@ -1150,22 +1137,15 @@ public:
void addExtraPreprocessorDefines (StringPairArray& defines) const void addExtraPreprocessorDefines (StringPairArray& defines) const
{ {
switch (type)
if (type == AAXPlugIn)
{ {
case AAXPlugIn:
{
auto aaxLibsFolder = RelativePath (owner.getAAXPathString(), RelativePath::projectFolder).getChildFile ("Libs");
defines.set ("JucePlugin_AAXLibs_path", createRebasedPath (aaxLibsFolder));
}
break;
case RTASPlugIn:
{
RelativePath rtasFolder (owner.getRTASPathString(), RelativePath::projectFolder);
defines.set ("JucePlugin_WinBag_path", createRebasedPath (rtasFolder.getChildFile ("WinBag")));
}
break;
default:
break;
auto aaxLibsFolder = RelativePath (owner.getAAXPathString(), RelativePath::projectFolder).getChildFile ("Libs");
defines.set ("JucePlugin_AAXLibs_path", createRebasedPath (aaxLibsFolder));
}
else if (type == RTASPlugIn)
{
RelativePath rtasFolder (owner.getRTASPathString(), RelativePath::projectFolder);
defines.set ("JucePlugin_WinBag_path", createRebasedPath (rtasFolder.getChildFile ("WinBag")));
} }
} }
@@ -1353,6 +1333,9 @@ public:
case ProjectType::Target::UnityPlugIn: case ProjectType::Target::UnityPlugIn:
case ProjectType::Target::DynamicLibrary: case ProjectType::Target::DynamicLibrary:
return true; return true;
case ProjectType::Target::AudioUnitPlugIn:
case ProjectType::Target::AudioUnitv3PlugIn:
case ProjectType::Target::unspecified:
default: default:
break; break;
} }


+ 11
- 9
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Make.h View File

@@ -175,15 +175,11 @@ public:
String getTargetFileSuffix() const String getTargetFileSuffix() const
{ {
switch (type)
{
case VSTPlugIn:
case UnityPlugIn:
case DynamicLibrary: return ".so";
case SharedCodeTarget:
case StaticLibrary: return ".a";
default: break;
}
if (type == VSTPlugIn || type == UnityPlugIn || type == DynamicLibrary)
return ".so";
if (type == SharedCodeTarget || type == StaticLibrary)
return ".a";
return {}; return {};
} }
@@ -357,6 +353,12 @@ public:
case ProjectType::Target::DynamicLibrary: case ProjectType::Target::DynamicLibrary:
case ProjectType::Target::UnityPlugIn: case ProjectType::Target::UnityPlugIn:
return true; return true;
case ProjectType::Target::VST3PlugIn:
case ProjectType::Target::AAXPlugIn:
case ProjectType::Target::RTASPlugIn:
case ProjectType::Target::AudioUnitPlugIn:
case ProjectType::Target::AudioUnitv3PlugIn:
case ProjectType::Target::unspecified:
default: default:
break; break;
} }


+ 8
- 0
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h View File

@@ -247,6 +247,7 @@ public:
case ProjectType::Target::AudioUnitPlugIn: case ProjectType::Target::AudioUnitPlugIn:
case ProjectType::Target::UnityPlugIn: case ProjectType::Target::UnityPlugIn:
return ! iOS; return ! iOS;
case ProjectType::Target::unspecified:
default: default:
break; break;
} }
@@ -978,6 +979,7 @@ public:
xcodeCopyToProductInstallPathAfterBuild = false; xcodeCopyToProductInstallPathAfterBuild = false;
break; break;
case ProjectType::Target::unspecified:
default: default:
// unknown target type! // unknown target type!
jassertfalse; jassertfalse;
@@ -1493,6 +1495,12 @@ public:
case AAXPlugIn: return config.isPluginBinaryCopyStepEnabled() ? config.getAAXBinaryLocationString() : String(); case AAXPlugIn: return config.isPluginBinaryCopyStepEnabled() ? config.getAAXBinaryLocationString() : String();
case UnityPlugIn: return config.isPluginBinaryCopyStepEnabled() ? config.getUnityPluginBinaryLocationString() : String(); case UnityPlugIn: return config.isPluginBinaryCopyStepEnabled() ? config.getUnityPluginBinaryLocationString() : String();
case SharedCodeTarget: return owner.isiOS() ? "@executable_path/Frameworks" : "@executable_path/../Frameworks"; case SharedCodeTarget: return owner.isiOS() ? "@executable_path/Frameworks" : "@executable_path/../Frameworks";
case StaticLibrary:
case DynamicLibrary:
case AudioUnitv3PlugIn:
case StandalonePlugIn:
case AggregateTarget:
case unspecified:
default: return {}; default: return {};
} }
} }


+ 1
- 0
extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.cpp View File

@@ -80,6 +80,7 @@ ProjectExporter* ProjectExporter::createNewExporter (Project& project, const int
case 7: exp = new CodeBlocksProjectExporter (project, ValueTree (CodeBlocksProjectExporter ::getValueTreeTypeName (CodeBlocksProjectExporter::windowsTarget)), CodeBlocksProjectExporter::windowsTarget); break; case 7: exp = new CodeBlocksProjectExporter (project, ValueTree (CodeBlocksProjectExporter ::getValueTreeTypeName (CodeBlocksProjectExporter::windowsTarget)), CodeBlocksProjectExporter::windowsTarget); break;
case 8: exp = new CodeBlocksProjectExporter (project, ValueTree (CodeBlocksProjectExporter ::getValueTreeTypeName (CodeBlocksProjectExporter::linuxTarget)), CodeBlocksProjectExporter::linuxTarget); break; case 8: exp = new CodeBlocksProjectExporter (project, ValueTree (CodeBlocksProjectExporter ::getValueTreeTypeName (CodeBlocksProjectExporter::linuxTarget)), CodeBlocksProjectExporter::linuxTarget); break;
case 9: exp = new CLionProjectExporter (project, ValueTree (CLionProjectExporter ::getValueTreeTypeName())); break; case 9: exp = new CLionProjectExporter (project, ValueTree (CLionProjectExporter ::getValueTreeTypeName())); break;
default: break;
} }
exp->createDefaultConfigs(); exp->createDefaultConfigs();


+ 4
- 0
extras/Projucer/Source/ProjectSaving/jucer_XcodeProjectParser.h View File

@@ -200,10 +200,14 @@ private:
case '{': case '{':
++braceDepth; ++braceDepth;
break; break;
case '}': case '}':
if (--braceDepth == 0) if (--braceDepth == 0)
return content.substr ((size_t) std::distance (content.begin(), start), return content.substr ((size_t) std::distance (content.begin(), start),
(size_t) std::distance (start, ptr)); (size_t) std::distance (start, ptr));
default:
break;
} }
} }


+ 68
- 1
modules/juce_audio_basics/buffers/juce_AudioChannelSet.cpp View File

@@ -87,15 +87,38 @@ String AudioChannelSet::getChannelTypeName (AudioChannelSet::ChannelType type)
case ambisonicACN13: return NEEDS_TRANS("Ambisonic 13"); case ambisonicACN13: return NEEDS_TRANS("Ambisonic 13");
case ambisonicACN14: return NEEDS_TRANS("Ambisonic 14"); case ambisonicACN14: return NEEDS_TRANS("Ambisonic 14");
case ambisonicACN15: return NEEDS_TRANS("Ambisonic 15"); case ambisonicACN15: return NEEDS_TRANS("Ambisonic 15");
case ambisonicACN16: return NEEDS_TRANS("Ambisonic 16");
case ambisonicACN17: return NEEDS_TRANS("Ambisonic 17");
case ambisonicACN18: return NEEDS_TRANS("Ambisonic 18");
case ambisonicACN19: return NEEDS_TRANS("Ambisonic 19");
case ambisonicACN20: return NEEDS_TRANS("Ambisonic 20");
case ambisonicACN21: return NEEDS_TRANS("Ambisonic 21");
case ambisonicACN22: return NEEDS_TRANS("Ambisonic 22");
case ambisonicACN23: return NEEDS_TRANS("Ambisonic 23");
case ambisonicACN24: return NEEDS_TRANS("Ambisonic 24");
case ambisonicACN25: return NEEDS_TRANS("Ambisonic 25");
case ambisonicACN26: return NEEDS_TRANS("Ambisonic 26");
case ambisonicACN27: return NEEDS_TRANS("Ambisonic 27");
case ambisonicACN28: return NEEDS_TRANS("Ambisonic 28");
case ambisonicACN29: return NEEDS_TRANS("Ambisonic 29");
case ambisonicACN30: return NEEDS_TRANS("Ambisonic 30");
case ambisonicACN31: return NEEDS_TRANS("Ambisonic 31");
case ambisonicACN32: return NEEDS_TRANS("Ambisonic 32");
case ambisonicACN33: return NEEDS_TRANS("Ambisonic 33");
case ambisonicACN34: return NEEDS_TRANS("Ambisonic 34");
case ambisonicACN35: return NEEDS_TRANS("Ambisonic 35");
case bottomFrontLeft: return NEEDS_TRANS("Bottom Front Left"); case bottomFrontLeft: return NEEDS_TRANS("Bottom Front Left");
case bottomFrontCentre: return NEEDS_TRANS("Bottom Front Centre"); case bottomFrontCentre: return NEEDS_TRANS("Bottom Front Centre");
case bottomFrontRight: return NEEDS_TRANS("Bottom Front Right"); case bottomFrontRight: return NEEDS_TRANS("Bottom Front Right");
case proxymityLeft: return NEEDS_TRANS("Proximity Left");
case proximityRight: return NEEDS_TRANS("Proximity Right");
case bottomSideLeft: return NEEDS_TRANS("Bottom Side Left"); case bottomSideLeft: return NEEDS_TRANS("Bottom Side Left");
case bottomSideRight: return NEEDS_TRANS("Bottom Side Right"); case bottomSideRight: return NEEDS_TRANS("Bottom Side Right");
case bottomRearLeft: return NEEDS_TRANS("Bottom Rear Left"); case bottomRearLeft: return NEEDS_TRANS("Bottom Rear Left");
case bottomRearCentre: return NEEDS_TRANS("Bottom Rear Centre"); case bottomRearCentre: return NEEDS_TRANS("Bottom Rear Centre");
case bottomRearRight: return NEEDS_TRANS("Bottom Rear Right"); case bottomRearRight: return NEEDS_TRANS("Bottom Rear Right");
case discreteChannel0: return NEEDS_TRANS("Discrete channel");
case discreteChannel0:
case unknown:
default: break; default: break;
} }
@@ -148,16 +171,40 @@ String AudioChannelSet::getAbbreviatedChannelTypeName (AudioChannelSet::ChannelT
case ambisonicACN13: return "ACN13"; case ambisonicACN13: return "ACN13";
case ambisonicACN14: return "ACN14"; case ambisonicACN14: return "ACN14";
case ambisonicACN15: return "ACN15"; case ambisonicACN15: return "ACN15";
case ambisonicACN16: return "ACN16";
case ambisonicACN17: return "ACN17";
case ambisonicACN18: return "ACN18";
case ambisonicACN19: return "ACN19";
case ambisonicACN20: return "ACN20";
case ambisonicACN21: return "ACN21";
case ambisonicACN22: return "ACN22";
case ambisonicACN23: return "ACN23";
case ambisonicACN24: return "ACN24";
case ambisonicACN25: return "ACN25";
case ambisonicACN26: return "ACN26";
case ambisonicACN27: return "ACN27";
case ambisonicACN28: return "ACN28";
case ambisonicACN29: return "ACN29";
case ambisonicACN30: return "ACN30";
case ambisonicACN31: return "ACN31";
case ambisonicACN32: return "ACN32";
case ambisonicACN33: return "ACN33";
case ambisonicACN34: return "ACN34";
case ambisonicACN35: return "ACN35";
case topSideLeft: return "Tsl"; case topSideLeft: return "Tsl";
case topSideRight: return "Tsr"; case topSideRight: return "Tsr";
case bottomFrontLeft: return "Bfl"; case bottomFrontLeft: return "Bfl";
case bottomFrontCentre: return "Bfc"; case bottomFrontCentre: return "Bfc";
case bottomFrontRight: return "Bfr"; case bottomFrontRight: return "Bfr";
case proxymityLeft: return "Pl";
case proximityRight: return "Pr";
case bottomSideLeft: return "Bsl"; case bottomSideLeft: return "Bsl";
case bottomSideRight: return "Bsr"; case bottomSideRight: return "Bsr";
case bottomRearLeft: return "Brl"; case bottomRearLeft: return "Brl";
case bottomRearCentre: return "Brc"; case bottomRearCentre: return "Brc";
case bottomRearRight: return "Brr"; case bottomRearRight: return "Brr";
case discreteChannel0:
case unknown:
default: break; default: break;
} }
@@ -216,6 +263,26 @@ AudioChannelSet::ChannelType AudioChannelSet::getChannelTypeFromAbbreviation (co
if (abbr == "ACN13") return ambisonicACN13; if (abbr == "ACN13") return ambisonicACN13;
if (abbr == "ACN14") return ambisonicACN14; if (abbr == "ACN14") return ambisonicACN14;
if (abbr == "ACN15") return ambisonicACN15; if (abbr == "ACN15") return ambisonicACN15;
if (abbr == "ACN16") return ambisonicACN16;
if (abbr == "ACN17") return ambisonicACN17;
if (abbr == "ACN18") return ambisonicACN18;
if (abbr == "ACN19") return ambisonicACN19;
if (abbr == "ACN20") return ambisonicACN20;
if (abbr == "ACN21") return ambisonicACN21;
if (abbr == "ACN22") return ambisonicACN22;
if (abbr == "ACN23") return ambisonicACN23;
if (abbr == "ACN24") return ambisonicACN24;
if (abbr == "ACN25") return ambisonicACN25;
if (abbr == "ACN26") return ambisonicACN26;
if (abbr == "ACN27") return ambisonicACN27;
if (abbr == "ACN28") return ambisonicACN28;
if (abbr == "ACN29") return ambisonicACN29;
if (abbr == "ACN30") return ambisonicACN30;
if (abbr == "ACN31") return ambisonicACN31;
if (abbr == "ACN32") return ambisonicACN32;
if (abbr == "ACN33") return ambisonicACN33;
if (abbr == "ACN34") return ambisonicACN34;
if (abbr == "ACN35") return ambisonicACN35;
if (abbr == "Tsl") return topSideLeft; if (abbr == "Tsl") return topSideLeft;
if (abbr == "Tsr") return topSideRight; if (abbr == "Tsr") return topSideRight;
if (abbr == "Bfl") return bottomFrontLeft; if (abbr == "Bfl") return bottomFrontLeft;


+ 5
- 4
modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp View File

@@ -168,10 +168,11 @@ namespace AiffFileHelpers
switch (key) switch (key)
{ {
case minor: keyString = "minor"; break;
case major: keyString = "major"; break;
case neither: keyString = "neither"; break;
case both: keyString = "both"; break;
case minor: keyString = "minor"; break;
case major: keyString = "major"; break;
case neither: keyString = "neither"; break;
case both: keyString = "both"; break;
default: break;
} }
if (keyString != nullptr) if (keyString != nullptr)


+ 10
- 0
modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp View File

@@ -117,6 +117,10 @@ namespace FlacNamespace
#pragma clang diagnostic ignored "-Wconversion" #pragma clang diagnostic ignored "-Wconversion"
#pragma clang diagnostic ignored "-Wshadow" #pragma clang diagnostic ignored "-Wshadow"
#pragma clang diagnostic ignored "-Wdeprecated-register" #pragma clang diagnostic ignored "-Wdeprecated-register"
#pragma clang diagnostic ignored "-Wswitch-enum"
#if __has_warning ("-Wimplicit-fallthrough")
#pragma clang diagnostic ignored "-Wimplicit-fallthrough"
#endif
#if __has_warning("-Wzero-as-null-pointer-constant") #if __has_warning("-Wzero-as-null-pointer-constant")
#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
#endif #endif
@@ -127,6 +131,12 @@ namespace FlacNamespace
#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" #pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
#pragma GCC diagnostic ignored "-Wconversion" #pragma GCC diagnostic ignored "-Wconversion"
#pragma GCC diagnostic ignored "-Wsign-conversion" #pragma GCC diagnostic ignored "-Wsign-conversion"
#pragma GCC diagnostic ignored "-Wswitch-enum"
#pragma GCC diagnostic ignored "-Wswitch-default"
#pragma GCC diagnostic ignored "-Wredundant-decls"
#if __GNUC__ >= 7
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
#endif
#endif #endif
#if JUCE_INTEL #if JUCE_INTEL


+ 3
- 0
modules/juce_audio_formats/codecs/juce_MP3AudioFormat.cpp View File

@@ -1878,6 +1878,9 @@ private:
*in0++ = *in1++; *in0++ = *in1++;
} }
break; break;
default:
break;
} }
} }


+ 4
- 0
modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp View File

@@ -44,6 +44,7 @@ namespace OggVorbisNamespace
#pragma clang diagnostic ignored "-Wconversion" #pragma clang diagnostic ignored "-Wconversion"
#pragma clang diagnostic ignored "-Wshadow" #pragma clang diagnostic ignored "-Wshadow"
#pragma clang diagnostic ignored "-Wdeprecated-register" #pragma clang diagnostic ignored "-Wdeprecated-register"
#pragma clang diagnostic ignored "-Wswitch-enum"
#if __has_warning("-Wzero-as-null-pointer-constant") #if __has_warning("-Wzero-as-null-pointer-constant")
#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
#endif #endif
@@ -53,6 +54,9 @@ namespace OggVorbisNamespace
#pragma GCC diagnostic ignored "-Wshadow" #pragma GCC diagnostic ignored "-Wshadow"
#pragma GCC diagnostic ignored "-Wsign-conversion" #pragma GCC diagnostic ignored "-Wsign-conversion"
#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" #pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
#pragma GCC diagnostic ignored "-Wswitch-enum"
#pragma GCC diagnostic ignored "-Wswitch-default"
#pragma GCC diagnostic ignored "-Wredundant-decls"
#endif #endif
#include "oggvorbis/vorbisenc.h" #include "oggvorbis/vorbisenc.h"


+ 1
- 5
modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h View File

@@ -24,10 +24,6 @@
============================================================================== ==============================================================================
*/ */
#if JUCE_MODULE_AVAILABLE_juce_audio_plugin_client
extern juce::AudioProcessor* JUCE_API JUCE_CALLTYPE createPluginFilterOfType (juce::AudioProcessor::WrapperType type);
#endif
namespace juce namespace juce
{ {
@@ -124,7 +120,7 @@ public:
virtual void createPlugin() virtual void createPlugin()
{ {
#if JUCE_MODULE_AVAILABLE_juce_audio_plugin_client #if JUCE_MODULE_AVAILABLE_juce_audio_plugin_client
processor.reset (::createPluginFilterOfType (AudioProcessor::wrapperType_Standalone));
processor.reset (createPluginFilterOfType (AudioProcessor::wrapperType_Standalone));
#else #else
AudioProcessor::setTypeOfNextNewPlugin (AudioProcessor::wrapperType_Standalone); AudioProcessor::setTypeOfNextNewPlugin (AudioProcessor::wrapperType_Standalone);
processor.reset (createPluginFilter()); processor.reset (createPluginFilter());


+ 0
- 204
modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp View File

@@ -901,210 +901,6 @@ public:
} }
//============================================================================== //==============================================================================
struct SpeakerMappings : private AudioChannelSet // (inheritance only to give easier access to items in the namespace)
{
struct Mapping
{
int32 vst2;
ChannelType channels[13];
bool matches (const Array<ChannelType>& chans) const noexcept
{
const int n = sizeof (channels) / sizeof (ChannelType);
for (int i = 0; i < n; ++i)
{
if (channels[i] == unknown) return (i == chans.size());
if (i == chans.size()) return (channels[i] == unknown);
if (channels[i] != chans.getUnchecked(i))
return false;
}
return true;
}
};
static AudioChannelSet vstArrangementTypeToChannelSet (const Vst2::VstSpeakerArrangement& arr)
{
if (arr.type == Vst2::kSpeakerArrEmpty) return AudioChannelSet::disabled();
if (arr.type == Vst2::kSpeakerArrMono) return AudioChannelSet::mono();
if (arr.type == Vst2::kSpeakerArrStereo) return AudioChannelSet::stereo();
if (arr.type == Vst2::kSpeakerArr30Cine) return AudioChannelSet::createLCR();
if (arr.type == Vst2::kSpeakerArr30Music) return AudioChannelSet::createLRS();
if (arr.type == Vst2::kSpeakerArr40Cine) return AudioChannelSet::createLCRS();
if (arr.type == Vst2::kSpeakerArr50) return AudioChannelSet::create5point0();
if (arr.type == Vst2::kSpeakerArr51) return AudioChannelSet::create5point1();
if (arr.type == Vst2::kSpeakerArr60Cine) return AudioChannelSet::create6point0();
if (arr.type == Vst2::kSpeakerArr61Cine) return AudioChannelSet::create6point1();
if (arr.type == Vst2::kSpeakerArr60Music) return AudioChannelSet::create6point0Music();
if (arr.type == Vst2::kSpeakerArr61Music) return AudioChannelSet::create6point1Music();
if (arr.type == Vst2::kSpeakerArr70Music) return AudioChannelSet::create7point0();
if (arr.type == Vst2::kSpeakerArr70Cine) return AudioChannelSet::create7point0SDDS();
if (arr.type == Vst2::kSpeakerArr71Music) return AudioChannelSet::create7point1();
if (arr.type == Vst2::kSpeakerArr71Cine) return AudioChannelSet::create7point1SDDS();
if (arr.type == Vst2::kSpeakerArr40Music) return AudioChannelSet::quadraphonic();
for (auto* m = getMappings(); m->vst2 != Vst2::kSpeakerArrEmpty; ++m)
{
if (m->vst2 == arr.type)
{
AudioChannelSet s;
for (int i = 0; m->channels[i] != 0; ++i)
s.addChannel (m->channels[i]);
return s;
}
}
return AudioChannelSet::discreteChannels (arr.numChannels);
}
static int32 channelSetToVstArrangementType (AudioChannelSet channels)
{
if (channels == AudioChannelSet::disabled()) return Vst2::kSpeakerArrEmpty;
if (channels == AudioChannelSet::mono()) return Vst2::kSpeakerArrMono;
if (channels == AudioChannelSet::stereo()) return Vst2::kSpeakerArrStereo;
if (channels == AudioChannelSet::createLCR()) return Vst2::kSpeakerArr30Cine;
if (channels == AudioChannelSet::createLRS()) return Vst2::kSpeakerArr30Music;
if (channels == AudioChannelSet::createLCRS()) return Vst2::kSpeakerArr40Cine;
if (channels == AudioChannelSet::create5point0()) return Vst2::kSpeakerArr50;
if (channels == AudioChannelSet::create5point1()) return Vst2::kSpeakerArr51;
if (channels == AudioChannelSet::create6point0()) return Vst2::kSpeakerArr60Cine;
if (channels == AudioChannelSet::create6point1()) return Vst2::kSpeakerArr61Cine;
if (channels == AudioChannelSet::create6point0Music()) return Vst2::kSpeakerArr60Music;
if (channels == AudioChannelSet::create6point1Music()) return Vst2::kSpeakerArr61Music;
if (channels == AudioChannelSet::create7point0()) return Vst2::kSpeakerArr70Music;
if (channels == AudioChannelSet::create7point0SDDS()) return Vst2::kSpeakerArr70Cine;
if (channels == AudioChannelSet::create7point1()) return Vst2::kSpeakerArr71Music;
if (channels == AudioChannelSet::create7point1SDDS()) return Vst2::kSpeakerArr71Cine;
if (channels == AudioChannelSet::quadraphonic()) return Vst2::kSpeakerArr40Music;
if (channels == AudioChannelSet::disabled())
return Vst2::kSpeakerArrEmpty;
auto chans = channels.getChannelTypes();
for (auto* m = getMappings(); m->vst2 != Vst2::kSpeakerArrEmpty; ++m)
if (m->matches (chans))
return m->vst2;
return Vst2::kSpeakerArrUserDefined;
}
static void channelSetToVstArrangement (const AudioChannelSet& channels, Vst2::VstSpeakerArrangement& result)
{
result.type = channelSetToVstArrangementType (channels);
result.numChannels = channels.size();
for (int i = 0; i < result.numChannels; ++i)
{
auto& speaker = result.speakers[i];
zeromem (&speaker, sizeof (Vst2::VstSpeakerProperties));
speaker.type = getSpeakerType (channels.getTypeOfChannel (i));
}
}
static const Mapping* getMappings() noexcept
{
static const Mapping mappings[] =
{
{ Vst2::kSpeakerArrMono, { centre, unknown } },
{ Vst2::kSpeakerArrStereo, { left, right, unknown } },
{ Vst2::kSpeakerArrStereoSurround, { leftSurround, rightSurround, unknown } },
{ Vst2::kSpeakerArrStereoCenter, { leftCentre, rightCentre, unknown } },
{ Vst2::kSpeakerArrStereoSide, { leftSurroundRear, rightSurroundRear, unknown } },
{ Vst2::kSpeakerArrStereoCLfe, { centre, LFE, unknown } },
{ Vst2::kSpeakerArr30Cine, { left, right, centre, unknown } },
{ Vst2::kSpeakerArr30Music, { left, right, surround, unknown } },
{ Vst2::kSpeakerArr31Cine, { left, right, centre, LFE, unknown } },
{ Vst2::kSpeakerArr31Music, { left, right, LFE, surround, unknown } },
{ Vst2::kSpeakerArr40Cine, { left, right, centre, surround, unknown } },
{ Vst2::kSpeakerArr40Music, { left, right, leftSurround, rightSurround, unknown } },
{ Vst2::kSpeakerArr41Cine, { left, right, centre, LFE, surround, unknown } },
{ Vst2::kSpeakerArr41Music, { left, right, LFE, leftSurround, rightSurround, unknown } },
{ Vst2::kSpeakerArr50, { left, right, centre, leftSurround, rightSurround, unknown } },
{ Vst2::kSpeakerArr51, { left, right, centre, LFE, leftSurround, rightSurround, unknown } },
{ Vst2::kSpeakerArr60Cine, { left, right, centre, leftSurround, rightSurround, surround, unknown } },
{ Vst2::kSpeakerArr60Music, { left, right, leftSurround, rightSurround, leftSurroundRear, rightSurroundRear, unknown } },
{ Vst2::kSpeakerArr61Cine, { left, right, centre, LFE, leftSurround, rightSurround, surround, unknown } },
{ Vst2::kSpeakerArr61Music, { left, right, LFE, leftSurround, rightSurround, leftSurroundRear, rightSurroundRear, unknown } },
{ Vst2::kSpeakerArr70Cine, { left, right, centre, leftSurround, rightSurround, topFrontLeft, topFrontRight, unknown } },
{ Vst2::kSpeakerArr70Music, { left, right, centre, leftSurround, rightSurround, leftSurroundRear, rightSurroundRear, unknown } },
{ Vst2::kSpeakerArr71Cine, { left, right, centre, LFE, leftSurround, rightSurround, topFrontLeft, topFrontRight, unknown } },
{ Vst2::kSpeakerArr71Music, { left, right, centre, LFE, leftSurround, rightSurround, leftSurroundRear, rightSurroundRear, unknown } },
{ Vst2::kSpeakerArr80Cine, { left, right, centre, leftSurround, rightSurround, topFrontLeft, topFrontRight, surround, unknown } },
{ Vst2::kSpeakerArr80Music, { left, right, centre, leftSurround, rightSurround, surround, leftSurroundRear, rightSurroundRear, unknown } },
{ Vst2::kSpeakerArr81Cine, { left, right, centre, LFE, leftSurround, rightSurround, topFrontLeft, topFrontRight, surround, unknown } },
{ Vst2::kSpeakerArr81Music, { left, right, centre, LFE, leftSurround, rightSurround, surround, leftSurroundRear, rightSurroundRear, unknown } },
{ Vst2::kSpeakerArr102, { left, right, centre, LFE, leftSurround, rightSurround, topFrontLeft, topFrontCentre, topFrontRight, topRearLeft, topRearRight, LFE2, unknown } },
{ Vst2::kSpeakerArrEmpty, { unknown } }
};
return mappings;
}
static inline int32 getSpeakerType (AudioChannelSet::ChannelType type) noexcept
{
switch (type)
{
case AudioChannelSet::left: return Vst2::kSpeakerL;
case AudioChannelSet::right: return Vst2::kSpeakerR;
case AudioChannelSet::centre: return Vst2::kSpeakerC;
case AudioChannelSet::LFE: return Vst2::kSpeakerLfe;
case AudioChannelSet::leftSurround: return Vst2::kSpeakerLs;
case AudioChannelSet::rightSurround: return Vst2::kSpeakerRs;
case AudioChannelSet::leftCentre: return Vst2::kSpeakerLc;
case AudioChannelSet::rightCentre: return Vst2::kSpeakerRc;
case AudioChannelSet::surround: return Vst2::kSpeakerS;
case AudioChannelSet::leftSurroundRear: return Vst2::kSpeakerSl;
case AudioChannelSet::rightSurroundRear: return Vst2::kSpeakerSr;
case AudioChannelSet::topMiddle: return Vst2::kSpeakerTm;
case AudioChannelSet::topFrontLeft: return Vst2::kSpeakerTfl;
case AudioChannelSet::topFrontCentre: return Vst2::kSpeakerTfc;
case AudioChannelSet::topFrontRight: return Vst2::kSpeakerTfr;
case AudioChannelSet::topRearLeft: return Vst2::kSpeakerTrl;
case AudioChannelSet::topRearCentre: return Vst2::kSpeakerTrc;
case AudioChannelSet::topRearRight: return Vst2::kSpeakerTrr;
case AudioChannelSet::LFE2: return Vst2::kSpeakerLfe2;
default: break;
}
return 0;
}
static inline AudioChannelSet::ChannelType getChannelType (int32 type) noexcept
{
switch (type)
{
case Vst2::kSpeakerL: return AudioChannelSet::left;
case Vst2::kSpeakerR: return AudioChannelSet::right;
case Vst2::kSpeakerC: return AudioChannelSet::centre;
case Vst2::kSpeakerLfe: return AudioChannelSet::LFE;
case Vst2::kSpeakerLs: return AudioChannelSet::leftSurround;
case Vst2::kSpeakerRs: return AudioChannelSet::rightSurround;
case Vst2::kSpeakerLc: return AudioChannelSet::leftCentre;
case Vst2::kSpeakerRc: return AudioChannelSet::rightCentre;
case Vst2::kSpeakerS: return AudioChannelSet::surround;
case Vst2::kSpeakerSl: return AudioChannelSet::leftSurroundRear;
case Vst2::kSpeakerSr: return AudioChannelSet::rightSurroundRear;
case Vst2::kSpeakerTm: return AudioChannelSet::topMiddle;
case Vst2::kSpeakerTfl: return AudioChannelSet::topFrontLeft;
case Vst2::kSpeakerTfc: return AudioChannelSet::topFrontCentre;
case Vst2::kSpeakerTfr: return AudioChannelSet::topFrontRight;
case Vst2::kSpeakerTrl: return AudioChannelSet::topRearLeft;
case Vst2::kSpeakerTrc: return AudioChannelSet::topRearCentre;
case Vst2::kSpeakerTrr: return AudioChannelSet::topRearRight;
case Vst2::kSpeakerLfe2: return AudioChannelSet::LFE2;
default: break;
}
return AudioChannelSet::unknown;
}
};
void timerCallback() override void timerCallback() override
{ {
if (shouldDeleteEditor) if (shouldDeleteEditor)


+ 1
- 0
modules/juce_audio_plugin_client/utility/juce_PluginHostType.h View File

@@ -260,6 +260,7 @@ public:
case VBVSTScanner: return "VBVSTScanner"; case VBVSTScanner: return "VBVSTScanner";
case ViennaEnsemblePro: return "Vienna Ensemble Pro"; case ViennaEnsemblePro: return "Vienna Ensemble Pro";
case WaveBurner: return "WaveBurner"; case WaveBurner: return "WaveBurner";
case UnknownHost:
default: break; default: break;
} }


+ 66
- 35
modules/juce_audio_processors/format_types/juce_VSTCommon.h View File

@@ -49,14 +49,14 @@ struct SpeakerMappings : private AudioChannelSet // (inheritance only to give e
bool matches (const Array<ChannelType>& chans) const noexcept bool matches (const Array<ChannelType>& chans) const noexcept
{ {
const int n = sizeof (channels) / sizeof (ChannelType);
auto n = static_cast<int> (sizeof (channels) / sizeof (ChannelType));
for (int i = 0; i < n; ++i) for (int i = 0; i < n; ++i)
{ {
if (channels[i] == unknown) return (i == chans.size()); if (channels[i] == unknown) return (i == chans.size());
if (i == chans.size()) return (channels[i] == unknown); if (i == chans.size()) return (channels[i] == unknown);
if (channels[i] != chans.getUnchecked(i))
if (channels[i] != chans.getUnchecked (i))
return false; return false;
} }
@@ -125,27 +125,56 @@ struct SpeakerMappings : private AudioChannelSet // (inheritance only to give e
else if (channels == AudioChannelSet::create7point1SDDS()) return Vst2::kSpeakerArr71Cine; else if (channels == AudioChannelSet::create7point1SDDS()) return Vst2::kSpeakerArr71Cine;
else if (channels == AudioChannelSet::quadraphonic()) return Vst2::kSpeakerArr40Music; else if (channels == AudioChannelSet::quadraphonic()) return Vst2::kSpeakerArr40Music;
Array<AudioChannelSet::ChannelType> chans (channels.getChannelTypes());
if (channels == AudioChannelSet::disabled()) if (channels == AudioChannelSet::disabled())
return Vst2::kSpeakerArrEmpty; return Vst2::kSpeakerArrEmpty;
for (const Mapping* m = getMappings(); m->vst2 != Vst2::kSpeakerArrEmpty; ++m)
auto chans = channels.getChannelTypes();
for (auto* m = getMappings(); m->vst2 != Vst2::kSpeakerArrEmpty; ++m)
if (m->matches (chans)) if (m->matches (chans))
return m->vst2; return m->vst2;
return Vst2::kSpeakerArrUserDefined; return Vst2::kSpeakerArrUserDefined;
} }
static void channelSetToVstArrangement (const AudioChannelSet& channels, Vst2::VstSpeakerArrangement& result)
{
result.type = channelSetToVstArrangementType (channels);
result.numChannels = channels.size();
for (int i = 0; i < result.numChannels; ++i)
{
auto& speaker = result.speakers[i];
zeromem (&speaker, sizeof (Vst2::VstSpeakerProperties));
speaker.type = getSpeakerType (channels.getTypeOfChannel (i));
}
}
/** Class to hold a speaker configuration */ /** Class to hold a speaker configuration */
class VstSpeakerConfigurationHolder class VstSpeakerConfigurationHolder
{ {
public: public:
VstSpeakerConfigurationHolder() { clear(); }
VstSpeakerConfigurationHolder (const Vst2::VstSpeakerArrangement& vstConfig) { operator= (vstConfig); }
VstSpeakerConfigurationHolder (const VstSpeakerConfigurationHolder& other) { operator= (other.get()); }
VstSpeakerConfigurationHolder()
{
clear();
}
VstSpeakerConfigurationHolder (const Vst2::VstSpeakerArrangement& vstConfig)
{
operator= (vstConfig);
}
VstSpeakerConfigurationHolder (const VstSpeakerConfigurationHolder& other)
{
operator= (other.get());
}
VstSpeakerConfigurationHolder (VstSpeakerConfigurationHolder&& other) VstSpeakerConfigurationHolder (VstSpeakerConfigurationHolder&& other)
: storage (std::move (other.storage)) { other.clear(); }
: storage (std::move (other.storage))
{
other.clear();
}
VstSpeakerConfigurationHolder (const AudioChannelSet& channels) VstSpeakerConfigurationHolder (const AudioChannelSet& channels)
{ {
@@ -241,9 +270,9 @@ struct SpeakerMappings : private AudioChannelSet // (inheritance only to give e
{ Vst2::kSpeakerArr71Music, { left, right, centre, LFE, leftSurround, rightSurround, leftSurroundRear, rightSurroundRear, unknown } }, { Vst2::kSpeakerArr71Music, { left, right, centre, LFE, leftSurround, rightSurround, leftSurroundRear, rightSurroundRear, unknown } },
{ Vst2::kSpeakerArr80Cine, { left, right, centre, leftSurround, rightSurround, topFrontLeft, topFrontRight, surround, unknown } }, { Vst2::kSpeakerArr80Cine, { left, right, centre, leftSurround, rightSurround, topFrontLeft, topFrontRight, surround, unknown } },
{ Vst2::kSpeakerArr80Music, { left, right, centre, leftSurround, rightSurround, surround, leftSurroundRear, rightSurroundRear, unknown } }, { Vst2::kSpeakerArr80Music, { left, right, centre, leftSurround, rightSurround, surround, leftSurroundRear, rightSurroundRear, unknown } },
{ Vst2::kSpeakerArr81Cine, { left, right, centre, LFE, leftSurround, rightSurround, topFrontLeft, topFrontRight, surround, unknown } },
{ Vst2::kSpeakerArr81Music, { left, right, centre, LFE, leftSurround, rightSurround, surround, leftSurroundRear, rightSurroundRear, unknown } },
{ Vst2::kSpeakerArr102, { left, right, centre, LFE, leftSurround, rightSurround, topFrontLeft, topFrontCentre, topFrontRight, topRearLeft, topRearRight, LFE2, unknown } },
{ Vst2::kSpeakerArr81Cine, { left, right, centre, LFE, leftSurround, rightSurround, topFrontLeft, topFrontRight, surround, unknown } },
{ Vst2::kSpeakerArr81Music, { left, right, centre, LFE, leftSurround, rightSurround, surround, leftSurroundRear, rightSurroundRear, unknown } },
{ Vst2::kSpeakerArr102, { left, right, centre, LFE, leftSurround, rightSurround, topFrontLeft, topFrontCentre, topFrontRight, topRearLeft, topRearRight, LFE2, unknown } },
{ Vst2::kSpeakerArrEmpty, { unknown } } { Vst2::kSpeakerArrEmpty, { unknown } }
}; };
@@ -252,31 +281,33 @@ struct SpeakerMappings : private AudioChannelSet // (inheritance only to give e
static inline int32 getSpeakerType (AudioChannelSet::ChannelType type) noexcept static inline int32 getSpeakerType (AudioChannelSet::ChannelType type) noexcept
{ {
switch (type)
static const std::map<AudioChannelSet::ChannelType, int32> speakerTypeMap =
{ {
case AudioChannelSet::left: return Vst2::kSpeakerL;
case AudioChannelSet::right: return Vst2::kSpeakerR;
case AudioChannelSet::centre: return Vst2::kSpeakerC;
case AudioChannelSet::LFE: return Vst2::kSpeakerLfe;
case AudioChannelSet::leftSurround: return Vst2::kSpeakerLs;
case AudioChannelSet::rightSurround: return Vst2::kSpeakerRs;
case AudioChannelSet::leftCentre: return Vst2::kSpeakerLc;
case AudioChannelSet::rightCentre: return Vst2::kSpeakerRc;
case AudioChannelSet::surround: return Vst2::kSpeakerS;
case AudioChannelSet::leftSurroundRear: return Vst2::kSpeakerSl;
case AudioChannelSet::rightSurroundRear: return Vst2::kSpeakerSr;
case AudioChannelSet::topMiddle: return Vst2::kSpeakerTm;
case AudioChannelSet::topFrontLeft: return Vst2::kSpeakerTfl;
case AudioChannelSet::topFrontCentre: return Vst2::kSpeakerTfc;
case AudioChannelSet::topFrontRight: return Vst2::kSpeakerTfr;
case AudioChannelSet::topRearLeft: return Vst2::kSpeakerTrl;
case AudioChannelSet::topRearCentre: return Vst2::kSpeakerTrc;
case AudioChannelSet::topRearRight: return Vst2::kSpeakerTrr;
case AudioChannelSet::LFE2: return Vst2::kSpeakerLfe2;
default: break;
}
{ AudioChannelSet::left, Vst2::kSpeakerL },
{ AudioChannelSet::right, Vst2::kSpeakerR },
{ AudioChannelSet::centre, Vst2::kSpeakerC },
{ AudioChannelSet::LFE, Vst2::kSpeakerLfe },
{ AudioChannelSet::leftSurround, Vst2::kSpeakerLs },
{ AudioChannelSet::rightSurround, Vst2::kSpeakerRs },
{ AudioChannelSet::leftCentre, Vst2::kSpeakerLc },
{ AudioChannelSet::rightCentre, Vst2::kSpeakerRc },
{ AudioChannelSet::surround, Vst2::kSpeakerS },
{ AudioChannelSet::leftSurroundRear, Vst2::kSpeakerSl },
{ AudioChannelSet::rightSurroundRear, Vst2::kSpeakerSr },
{ AudioChannelSet::topMiddle, Vst2::kSpeakerTm },
{ AudioChannelSet::topFrontLeft, Vst2::kSpeakerTfl },
{ AudioChannelSet::topFrontCentre, Vst2::kSpeakerTfc },
{ AudioChannelSet::topFrontRight, Vst2::kSpeakerTfr },
{ AudioChannelSet::topRearLeft, Vst2::kSpeakerTrl },
{ AudioChannelSet::topRearCentre, Vst2::kSpeakerTrc },
{ AudioChannelSet::topRearRight, Vst2::kSpeakerTrr },
{ AudioChannelSet::LFE2, Vst2::kSpeakerLfe2 }
};
if (speakerTypeMap.find (type) == speakerTypeMap.end())
return 0;
return 0;
return speakerTypeMap.at (type);
} }
static inline AudioChannelSet::ChannelType getChannelType (int32 type) noexcept static inline AudioChannelSet::ChannelType getChannelType (int32 type) noexcept


+ 18
- 13
modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp View File

@@ -2392,11 +2392,12 @@ private:
case AudioPlayHead::fps30: setHostTimeFrameRate (Vst2::kVstSmpte30fps, 30.0, position.timeInSeconds); break; case AudioPlayHead::fps30: setHostTimeFrameRate (Vst2::kVstSmpte30fps, 30.0, position.timeInSeconds); break;
case AudioPlayHead::fps60: setHostTimeFrameRate (Vst2::kVstSmpte60fps, 60.0, position.timeInSeconds); break; case AudioPlayHead::fps60: setHostTimeFrameRate (Vst2::kVstSmpte60fps, 60.0, position.timeInSeconds); break;
case AudioPlayHead::fps23976: setHostTimeFrameRateDrop (Vst2::kVstSmpte239fps, 24.0, position.timeInSeconds); break;
case AudioPlayHead::fps2997: setHostTimeFrameRateDrop (Vst2::kVstSmpte2997fps, 30.0, position.timeInSeconds); break;
case AudioPlayHead::fps23976: setHostTimeFrameRateDrop (Vst2::kVstSmpte239fps, 24.0, position.timeInSeconds); break;
case AudioPlayHead::fps2997: setHostTimeFrameRateDrop (Vst2::kVstSmpte2997fps, 30.0, position.timeInSeconds); break;
case AudioPlayHead::fps2997drop: setHostTimeFrameRateDrop (Vst2::kVstSmpte2997dfps, 30.0, position.timeInSeconds); break; case AudioPlayHead::fps2997drop: setHostTimeFrameRateDrop (Vst2::kVstSmpte2997dfps, 30.0, position.timeInSeconds); break;
case AudioPlayHead::fps30drop: setHostTimeFrameRateDrop (Vst2::kVstSmpte30dfps, 30.0, position.timeInSeconds); break; case AudioPlayHead::fps30drop: setHostTimeFrameRateDrop (Vst2::kVstSmpte30dfps, 30.0, position.timeInSeconds); break;
case AudioPlayHead::fps60drop: setHostTimeFrameRateDrop (Vst2::kVstSmpte599fps, 60.0, position.timeInSeconds); break;
case AudioPlayHead::fps60drop: setHostTimeFrameRateDrop (Vst2::kVstSmpte599fps, 60.0, position.timeInSeconds); break;
case AudioPlayHead::fpsUnknown:
default: break; default: break;
} }
@@ -2715,16 +2716,20 @@ private:
{ {
switch (getVstCategory()) switch (getVstCategory())
{ {
case Vst2::kPlugCategEffect: return "Effect";
case Vst2::kPlugCategSynth: return "Synth";
case Vst2::kPlugCategAnalysis: return "Analysis";
case Vst2::kPlugCategMastering: return "Mastering";
case Vst2::kPlugCategSpacializer: return "Spacial";
case Vst2::kPlugCategRoomFx: return "Reverb";
case Vst2::kPlugSurroundFx: return "Surround";
case Vst2::kPlugCategRestoration: return "Restoration";
case Vst2::kPlugCategGenerator: return "Tone generation";
default: break;
case Vst2::kPlugCategEffect: return "Effect";
case Vst2::kPlugCategSynth: return "Synth";
case Vst2::kPlugCategAnalysis: return "Analysis";
case Vst2::kPlugCategMastering: return "Mastering";
case Vst2::kPlugCategSpacializer: return "Spacial";
case Vst2::kPlugCategRoomFx: return "Reverb";
case Vst2::kPlugSurroundFx: return "Surround";
case Vst2::kPlugCategRestoration: return "Restoration";
case Vst2::kPlugCategGenerator: return "Tone generation";
case Vst2::kPlugCategOfflineProcess: return "Offline Process";
case Vst2::kPlugCategShell: return "Shell";
case Vst2::kPlugCategUnknown: return "Unknown";
case Vst2::kPlugCategMaxCount:
default: break;
} }
return nullptr; return nullptr;


+ 2
- 0
modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp View File

@@ -297,6 +297,8 @@ struct PluginSorter
case KnownPluginList::sortByFormat: diff = first.pluginFormatName.compare (second.pluginFormatName); break; case KnownPluginList::sortByFormat: diff = first.pluginFormatName.compare (second.pluginFormatName); break;
case KnownPluginList::sortByFileSystemLocation: diff = lastPathPart (first.fileOrIdentifier).compare (lastPathPart (second.fileOrIdentifier)); break; case KnownPluginList::sortByFileSystemLocation: diff = lastPathPart (first.fileOrIdentifier).compare (lastPathPart (second.fileOrIdentifier)); break;
case KnownPluginList::sortByInfoUpdateTime: diff = compare (first.lastInfoUpdateTime, second.lastInfoUpdateTime); break; case KnownPluginList::sortByInfoUpdateTime: diff = compare (first.lastInfoUpdateTime, second.lastInfoUpdateTime); break;
case KnownPluginList::sortAlphabetically:
case KnownPluginList::defaultOrder:
default: break; default: break;
} }


+ 1
- 0
modules/juce_audio_utils/native/juce_android_BluetoothMidiDevicePairingDialogue.cpp View File

@@ -377,6 +377,7 @@ private:
case AndroidBluetoothMidiInterface::paired: case AndroidBluetoothMidiInterface::paired:
status = AndroidBluetoothMidiDevice::connected; status = AndroidBluetoothMidiDevice::connected;
break; break;
case AndroidBluetoothMidiInterface::unpaired:
default: default:
status = AndroidBluetoothMidiDevice::disconnected; status = AndroidBluetoothMidiDevice::disconnected;
} }


+ 7
- 2
modules/juce_blocks_basics/littlefoot/juce_LittleFootRunner.h View File

@@ -336,7 +336,8 @@ struct Program
#undef LITTLEFOOT_OP_INT16 #undef LITTLEFOOT_OP_INT16
#undef LITTLEFOOT_OP_INT32 #undef LITTLEFOOT_OP_INT32
default: s << "???"; break;
case OpCode::endOfOpcodes:
default: s << "???"; break;
} }
return s; return s;
@@ -370,8 +371,11 @@ struct Program
#undef LITTLEFOOT_OP_INT16 #undef LITTLEFOOT_OP_INT16
#undef LITTLEFOOT_OP_INT32 #undef LITTLEFOOT_OP_INT32
default: jassertfalse; return 0;
case OpCode::endOfOpcodes:
default: jassertfalse; break;
} }
return 0;
} }
//============================================================================== //==============================================================================
@@ -676,6 +680,7 @@ struct Runner
switch (op) switch (op)
{ {
LITTLEFOOT_OPCODES (LITTLEFOOT_PERFORM_OP, LITTLEFOOT_PERFORM_OP_INT8, LITTLEFOOT_PERFORM_OP_INT16, LITTLEFOOT_PERFORM_OP_INT32) LITTLEFOOT_OPCODES (LITTLEFOOT_PERFORM_OP, LITTLEFOOT_PERFORM_OP_INT8, LITTLEFOOT_PERFORM_OP_INT16, LITTLEFOOT_PERFORM_OP_INT32)
case OpCode::endOfOpcodes:
default: setError (ErrorCode::unknownInstruction); break; default: setError (ErrorCode::unknownInstruction); break;
} }


+ 10
- 8
modules/juce_blocks_basics/protocol/juce_BlockModels.h View File

@@ -345,14 +345,16 @@ static const char* getButtonNameForFunction (ControlButton::ButtonFunction fn) n
case BF::button6: return "6"; case BF::button6: return "6";
case BF::button7: return "7"; case BF::button7: return "7";
case BF::velocitySensitivity: return "Velocity Sensitivity";
case BF::glideSensitivity: return "Glide Sensitivity";
case BF::slideSensitivity: return "Slide Sensitivity";
case BF::pressSensitivity: return "Press Sensitivity";
case BF::liftSensitivity: return "Lift Sensitivity";
case BF::fixedVelocity: return "Fixed Velocity";
case BF::glideLock: return "Glide Lock";
case BF::pianoMode: return "Piano Mode";
case BF::velocitySensitivity: return "Velocity Sensitivity";
case BF::glideSensitivity: return "Glide Sensitivity";
case BF::slideSensitivity: return "Slide Sensitivity";
case BF::pressSensitivity: return "Press Sensitivity";
case BF::liftSensitivity: return "Lift Sensitivity";
case BF::fixedVelocity: return "Fixed Velocity";
case BF::glideLock: return "Glide Lock";
case BF::pianoMode: return "Piano Mode";
default: break;
} }
jassertfalse; jassertfalse;


+ 4
- 0
modules/juce_blocks_basics/topology/internal/juce_Detector.cpp View File

@@ -571,6 +571,7 @@ private:
case Block::ConnectionPort::DeviceEdge::east: return 1; case Block::ConnectionPort::DeviceEdge::east: return 1;
case Block::ConnectionPort::DeviceEdge::south: return 2; case Block::ConnectionPort::DeviceEdge::south: return 2;
case Block::ConnectionPort::DeviceEdge::west: return 3; case Block::ConnectionPort::DeviceEdge::west: return 3;
default: break;
} }
jassertfalse; jassertfalse;
@@ -629,6 +630,8 @@ private:
case 3: // left of me case 3: // left of me
delta = { -theirBounds.width, (myBounds.height - (myOffset + 1)) - theirOffset }; delta = { -theirBounds.width, (myBounds.height - (myOffset + 1)) - theirOffset };
break; break;
default:
break;
} }
{ {
@@ -671,6 +674,7 @@ private:
case Block::ConnectionPort::DeviceEdge::south: return "south"; case Block::ConnectionPort::DeviceEdge::south: return "south";
case Block::ConnectionPort::DeviceEdge::east: return "east"; case Block::ConnectionPort::DeviceEdge::east: return "east";
case Block::ConnectionPort::DeviceEdge::west: return "west"; case Block::ConnectionPort::DeviceEdge::west: return "west";
default: break;
} }
return {}; return {};


+ 3
- 0
modules/juce_box2d/juce_box2d.cpp View File

@@ -40,6 +40,7 @@
#pragma clang diagnostic ignored "-Wsign-conversion" #pragma clang diagnostic ignored "-Wsign-conversion"
#pragma clang diagnostic ignored "-Wfloat-conversion" #pragma clang diagnostic ignored "-Wfloat-conversion"
#pragma clang diagnostic ignored "-Wcast-align" #pragma clang diagnostic ignored "-Wcast-align"
#pragma clang diagnostic ignored "-Wswitch-enum"
#if __has_warning("-Wzero-as-null-pointer-constant") #if __has_warning("-Wzero-as-null-pointer-constant")
#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
#endif #endif
@@ -48,6 +49,8 @@
#pragma GCC diagnostic ignored "-Wsign-conversion" #pragma GCC diagnostic ignored "-Wsign-conversion"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" #pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
#pragma GCC diagnostic ignored "-Wswitch-enum"
#pragma GCC diagnostic ignored "-Wswitch-default"
#endif #endif
#include <cstdarg> #include <cstdarg>


+ 0
- 2
modules/juce_core/files/juce_FileOutputStream.cpp View File

@@ -23,8 +23,6 @@
namespace juce namespace juce
{ {
int64 juce_fileSetPosition (void* handle, int64 pos);
//============================================================================== //==============================================================================
FileOutputStream::FileOutputStream (const File& f, const size_t bufferSizeToUse) FileOutputStream::FileOutputStream (const File& f, const size_t bufferSizeToUse)
: file (f), : file (f),


+ 2
- 0
modules/juce_core/javascript/juce_JSON.cpp View File

@@ -126,6 +126,8 @@ struct JSONParser
break; break;
} }
default: break;
} }
} }


+ 6
- 0
modules/juce_core/native/juce_BasicNativeHeaders.h View File

@@ -82,6 +82,12 @@
#define NSAlertStyleInformational NSInformationalAlertStyle #define NSAlertStyleInformational NSInformationalAlertStyle
#define NSEventTypeTabletPoint NSTabletPoint #define NSEventTypeTabletPoint NSTabletPoint
#define NSEventTypeTabletProximity NSTabletProximity #define NSEventTypeTabletProximity NSTabletProximity
#define NSEventTypeFlagsChanged NSFlagsChanged
#define NSEventTypeAppKitDefined NSAppKitDefined
#define NSEventTypeSystemDefined NSSystemDefined
#define NSEventTypeApplicationDefined NSApplicationDefined
#define NSEventTypePeriodic NSPeriodic
#define NSEventTypeSmartMagnify NSEventTypeSmartMagnify
#endif #endif
#import <CoreAudio/HostTime.h> #import <CoreAudio/HostTime.h>
#include <sys/dir.h> #include <sys/dir.h>


+ 2
- 1
modules/juce_core/native/juce_linux_Files.cpp View File

@@ -136,7 +136,7 @@ File File::getSpecialLocation (const SpecialLocationType type)
case invokedExecutableFile: case invokedExecutableFile:
if (juce_argv != nullptr && juce_argc > 0) if (juce_argv != nullptr && juce_argc > 0)
return File (CharPointer_UTF8 (juce_argv[0])); return File (CharPointer_UTF8 (juce_argv[0]));
// deliberate fall-through...
// Falls through
case currentExecutableFile: case currentExecutableFile:
case currentApplicationFile: case currentApplicationFile:
@@ -144,6 +144,7 @@ File File::getSpecialLocation (const SpecialLocationType type)
return juce_getExecutableFile(); return juce_getExecutableFile();
#endif #endif
// deliberate fall-through if this is not a shared-library // deliberate fall-through if this is not a shared-library
JUCE_FALLTHROUGH
case hostApplicationPath: case hostApplicationPath:
{ {


+ 1
- 0
modules/juce_core/native/juce_mac_Files.mm View File

@@ -203,6 +203,7 @@ File File::getSpecialLocation (const SpecialLocationType type)
if (juce_argv != nullptr && juce_argc > 0) if (juce_argv != nullptr && juce_argc > 0)
return File::getCurrentWorkingDirectory().getChildFile (String (juce_argv[0])); return File::getCurrentWorkingDirectory().getChildFile (String (juce_argv[0]));
// deliberate fall-through... // deliberate fall-through...
JUCE_FALLTHROUGH
case currentExecutableFile: case currentExecutableFile:
return juce_getExecutableFile(); return juce_getExecutableFile();


+ 20
- 0
modules/juce_core/system/juce_PlatformDefs.h View File

@@ -92,6 +92,26 @@ namespace juce
#define JUCE_ANALYZER_NORETURN #define JUCE_ANALYZER_NORETURN
#endif #endif
/** Used to silence Wimplicit-fallthrough on Clang and GCC where available
as there are a few places in the codebase where we need to do this
deliberately and want to ignore the warning.
*/
#if JUCE_CLANG
#if __has_cpp_attribute(clang::fallthrough)
#define JUCE_FALLTHROUGH [[clang::fallthrough]];
#else
#define JUCE_FALLTHROUGH
#endif
#elif JUCE_GCC
#if __GNUC__ >= 7
#define JUCE_FALLTHROUGH [[gnu::fallthrough]];
#else
#define JUCE_FALLTHROUGH
#endif
#else
#define JUCE_FALLTHROUGH
#endif
//============================================================================== //==============================================================================
#if JUCE_MSVC && ! DOXYGEN #if JUCE_MSVC && ! DOXYGEN
#define JUCE_BLOCK_WITH_FORCED_SEMICOLON(x) \ #define JUCE_BLOCK_WITH_FORCED_SEMICOLON(x) \


+ 11
- 4
modules/juce_core/text/juce_CharacterFunctions.h View File

@@ -166,9 +166,12 @@ public:
#else #else
*currentCharacter++ = '-'; *currentCharacter++ = '-';
#endif #endif
// Fall-through..
JUCE_FALLTHROUGH
case '+': case '+':
c = *++text; c = *++text;
break;
default:
break;
} }
switch (c) switch (c)
@@ -184,6 +187,9 @@ public:
if ((text[1] == 'n' || text[1] == 'N') && (text[2] == 'f' || text[2] == 'F')) if ((text[1] == 'n' || text[1] == 'N') && (text[2] == 'f' || text[2] == 'F'))
return std::numeric_limits<double>::infinity(); return std::numeric_limits<double>::infinity();
break; break;
default:
break;
} }
#if JUCE_MINGW #if JUCE_MINGW
@@ -274,7 +280,7 @@ public:
switch (*++text) switch (*++text)
{ {
case '-': negativeExponent = true; // fall-through..
case '-': negativeExponent = true; JUCE_FALLTHROUGH
case '+': ++text; case '+': ++text;
} }
@@ -359,8 +365,9 @@ public:
switch (*++text) switch (*++text)
{ {
case '-': parsedExponentIsPositive = false; // Fall-through..
case '+': ++text;
case '-': parsedExponentIsPositive = false; JUCE_FALLTHROUGH
case '+': ++text; break;
default: break;
} }
int exponent = 0; int exponent = 0;


+ 1
- 1
modules/juce_core/xml/juce_XmlElement.cpp View File

@@ -237,7 +237,7 @@ namespace XmlOutputFunctions
outputStream << (char) character; outputStream << (char) character;
break; break;
} }
// Note: Deliberate fall-through here!
JUCE_FALLTHROUGH
default: default:
outputStream << "&#" << ((int) character) << ';'; outputStream << "&#" << ((int) character) << ';';
break; break;


+ 1
- 1
modules/juce_core/zip/juce_GZIPCompressorOutputStream.cpp View File

@@ -92,7 +92,7 @@ private:
{ {
case Z_STREAM_END: case Z_STREAM_END:
finished = true; finished = true;
// Deliberate fall-through..
JUCE_FALLTHROUGH
case Z_OK: case Z_OK:
{ {
data += dataSize - stream.avail_in; data += dataSize - stream.avail_in;


+ 12
- 2
modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp View File

@@ -36,6 +36,10 @@ namespace zlibNamespace
#pragma clang diagnostic ignored "-Wconversion" #pragma clang diagnostic ignored "-Wconversion"
#pragma clang diagnostic ignored "-Wshadow" #pragma clang diagnostic ignored "-Wshadow"
#pragma clang diagnostic ignored "-Wdeprecated-register" #pragma clang diagnostic ignored "-Wdeprecated-register"
#pragma clang diagnostic ignored "-Wswitch-enum"
#if __has_warning ("-Wimplicit-fallthrough")
#pragma clang diagnostic ignored "-Wimplicit-fallthrough"
#endif
#if __has_warning("-Wzero-as-null-pointer-constant") #if __has_warning("-Wzero-as-null-pointer-constant")
#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
#endif #endif
@@ -50,6 +54,12 @@ namespace zlibNamespace
#pragma GCC diagnostic ignored "-Wsign-conversion" #pragma GCC diagnostic ignored "-Wsign-conversion"
#pragma GCC diagnostic ignored "-Wshadow" #pragma GCC diagnostic ignored "-Wshadow"
#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" #pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
#pragma GCC diagnostic ignored "-Wswitch-enum"
#pragma GCC diagnostic ignored "-Wswitch-default"
#pragma GCC diagnostic ignored "-Wredundant-decls"
#if __GNUC__ >= 7
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
#endif
#endif #endif
#undef OS_CODE #undef OS_CODE
@@ -151,7 +161,7 @@ public:
{ {
case Z_STREAM_END: case Z_STREAM_END:
finished = true; finished = true;
// deliberate fall-through
JUCE_FALLTHROUGH
case Z_OK: case Z_OK:
data += dataSize - stream.avail_in; data += dataSize - stream.avail_in;
dataSize = (z_uInt) stream.avail_in; dataSize = (z_uInt) stream.avail_in;
@@ -166,7 +176,7 @@ public:
case Z_DATA_ERROR: case Z_DATA_ERROR:
case Z_MEM_ERROR: case Z_MEM_ERROR:
error = true; error = true;
JUCE_FALLTHROUGH
default: default:
break; break;
} }


+ 3
- 0
modules/juce_data_structures/values/juce_ValueTreeSynchroniser.cpp View File

@@ -229,6 +229,9 @@ bool ValueTreeSynchroniser::applyChange (ValueTree& root, const void* data, size
break; break;
} }
case ValueTreeSynchroniserHelpers::fullSync:
break;
default: default:
jassertfalse; // Seem to have received some corrupt data? jassertfalse; // Seem to have received some corrupt data?
break; break;


+ 1
- 0
modules/juce_dsp/frequency/juce_Convolution.cpp View File

@@ -643,6 +643,7 @@ struct Convolution::Pimpl : private Thread
} }
break; break;
case ChangeRequest::numChangeRequestTypes:
case ChangeRequest::changeIgnore: case ChangeRequest::changeIgnore:
break; break;


+ 11
- 9
modules/juce_dsp/frequency/juce_Windowing.cpp View File

@@ -145,6 +145,7 @@ void WindowingFunction<FloatType>::fillWindowingTables (FloatType* samples, size
} }
break; break;
case numWindowingMethods:
default: default:
jassertfalse; jassertfalse;
break; break;
@@ -175,15 +176,16 @@ const char* WindowingFunction<FloatType>::getWindowingMethodName (WindowingMetho
{ {
switch (type) switch (type)
{ {
case rectangular: return "Rectangular";
case triangular: return "Triangular";
case hann: return "Hann";
case hamming: return "Hamming";
case blackman: return "Blackman";
case blackmanHarris: return "Blackman-Harris";
case flatTop: return "Flat Top";
case kaiser: return "Kaiser";
default: jassertfalse; return "";
case rectangular: return "Rectangular";
case triangular: return "Triangular";
case hann: return "Hann";
case hamming: return "Hamming";
case blackman: return "Blackman";
case blackmanHarris: return "Blackman-Harris";
case flatTop: return "Flat Top";
case kaiser: return "Kaiser";
case numWindowingMethods:
default: jassertfalse; return "";
} }
} }


+ 0
- 2
modules/juce_events/messages/juce_MessageManager.cpp View File

@@ -453,7 +453,6 @@ void MessageManagerLock::exitSignalSent()
} }
//============================================================================== //==============================================================================
JUCE_API void JUCE_CALLTYPE initialiseJuce_GUI();
JUCE_API void JUCE_CALLTYPE initialiseJuce_GUI() JUCE_API void JUCE_CALLTYPE initialiseJuce_GUI()
{ {
JUCE_AUTORELEASEPOOL JUCE_AUTORELEASEPOOL
@@ -462,7 +461,6 @@ JUCE_API void JUCE_CALLTYPE initialiseJuce_GUI()
} }
} }
JUCE_API void JUCE_CALLTYPE shutdownJuce_GUI();
JUCE_API void JUCE_CALLTYPE shutdownJuce_GUI() JUCE_API void JUCE_CALLTYPE shutdownJuce_GUI()
{ {
JUCE_AUTORELEASEPOOL JUCE_AUTORELEASEPOOL


+ 5
- 4
modules/juce_graphics/geometry/juce_Rectangle.h View File

@@ -751,10 +751,11 @@ public:
switch (inside) switch (inside)
{ {
case 1 + 2 + 8: w = r - otherR; pos.x = otherR; return true;
case 1 + 2 + 4: h = b - otherB; pos.y = otherB; return true;
case 2 + 4 + 8: w = other.pos.x - pos.x; return true;
case 1 + 4 + 8: h = other.pos.y - pos.y; return true;
case 1 + 2 + 8: w = r - otherR; pos.x = otherR; return true;
case 1 + 2 + 4: h = b - otherB; pos.y = otherB; return true;
case 2 + 4 + 8: w = other.pos.x - pos.x; return true;
case 1 + 4 + 8: h = other.pos.y - pos.y; return true;
default: break;
} }
return false; return false;


+ 9
- 0
modules/juce_graphics/image_formats/juce_JPEGLoader.cpp View File

@@ -44,6 +44,10 @@ namespace jpeglibNamespace
#pragma clang diagnostic ignored "-Wconversion" #pragma clang diagnostic ignored "-Wconversion"
#pragma clang diagnostic ignored "-Wdeprecated-register" #pragma clang diagnostic ignored "-Wdeprecated-register"
#pragma clang diagnostic ignored "-Wcast-align" #pragma clang diagnostic ignored "-Wcast-align"
#pragma clang diagnostic ignored "-Wswitch-enum"
#if __has_warning ("-Wimplicit-fallthrough")
#pragma clang diagnostic ignored "-Wimplicit-fallthrough"
#endif
#if __has_warning("-Wzero-as-null-pointer-constant") #if __has_warning("-Wzero-as-null-pointer-constant")
#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
#endif #endif
@@ -57,8 +61,13 @@ namespace jpeglibNamespace
#pragma GCC diagnostic ignored "-Wconversion" #pragma GCC diagnostic ignored "-Wconversion"
#pragma GCC diagnostic ignored "-Wsign-conversion" #pragma GCC diagnostic ignored "-Wsign-conversion"
#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" #pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
#pragma GCC diagnostic ignored "-Wswitch-enum"
#pragma GCC diagnostic ignored "-Wswitch-default"
#if __GNUC__ > 5 #if __GNUC__ > 5
#pragma GCC diagnostic ignored "-Wshift-negative-value" #pragma GCC diagnostic ignored "-Wshift-negative-value"
#if __GNUC__ >= 7
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
#endif
#endif #endif
#endif #endif


+ 6
- 0
modules/juce_graphics/image_formats/juce_PNGLoader.cpp View File

@@ -66,6 +66,9 @@ namespace pnglibNamespace
#if JUCE_CLANG #if JUCE_CLANG
#pragma clang diagnostic push #pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wsign-conversion" #pragma clang diagnostic ignored "-Wsign-conversion"
#if __has_warning ("-Wimplicit-fallthrough")
#pragma clang diagnostic ignored "-Wimplicit-fallthrough"
#endif
#if __has_warning("-Wzero-as-null-pointer-constant") #if __has_warning("-Wzero-as-null-pointer-constant")
#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
#endif #endif
@@ -78,6 +81,9 @@ namespace pnglibNamespace
#pragma GCC diagnostic push #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsign-conversion" #pragma GCC diagnostic ignored "-Wsign-conversion"
#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" #pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
#if __GNUC__ >= 7
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
#endif
#endif #endif
#undef check #undef check


+ 3
- 0
modules/juce_graphics/images/juce_Image.cpp View File

@@ -426,6 +426,7 @@ Colour Image::BitmapData::getPixelColour (int x, int y) const noexcept
case Image::ARGB: return Colour ( ((const PixelARGB*) pixel)->getUnpremultiplied()); case Image::ARGB: return Colour ( ((const PixelARGB*) pixel)->getUnpremultiplied());
case Image::RGB: return Colour (*((const PixelRGB*) pixel)); case Image::RGB: return Colour (*((const PixelRGB*) pixel));
case Image::SingleChannel: return Colour (*((const PixelAlpha*) pixel)); case Image::SingleChannel: return Colour (*((const PixelAlpha*) pixel));
case Image::UnknownFormat:
default: jassertfalse; break; default: jassertfalse; break;
} }
@@ -444,6 +445,7 @@ void Image::BitmapData::setPixelColour (int x, int y, Colour colour) const noexc
case Image::ARGB: ((PixelARGB*) pixel)->set (col); break; case Image::ARGB: ((PixelARGB*) pixel)->set (col); break;
case Image::RGB: ((PixelRGB*) pixel)->set (col); break; case Image::RGB: ((PixelRGB*) pixel)->set (col); break;
case Image::SingleChannel: ((PixelAlpha*) pixel)->set (col); break; case Image::SingleChannel: ((PixelAlpha*) pixel)->set (col); break;
case Image::UnknownFormat:
default: jassertfalse; break; default: jassertfalse; break;
} }
} }
@@ -521,6 +523,7 @@ static void performPixelOp (const Image::BitmapData& data, const PixelOperation&
case Image::ARGB: PixelIterator<PixelARGB> ::iterate (data, pixelOp); break; case Image::ARGB: PixelIterator<PixelARGB> ::iterate (data, pixelOp); break;
case Image::RGB: PixelIterator<PixelRGB> ::iterate (data, pixelOp); break; case Image::RGB: PixelIterator<PixelRGB> ::iterate (data, pixelOp); break;
case Image::SingleChannel: PixelIterator<PixelAlpha>::iterate (data, pixelOp); break; case Image::SingleChannel: PixelIterator<PixelAlpha>::iterate (data, pixelOp); break;
case Image::UnknownFormat:
default: jassertfalse; break; default: jassertfalse; break;
} }
} }


+ 22
- 0
modules/juce_graphics/native/juce_RenderingHelpers.h View File

@@ -1426,6 +1426,8 @@ namespace EdgeTableFillers
if (tiledFill) { TransformedImageFill<PixelARGB, PixelRGB, true> r (destData, srcData, transform, alpha, quality); iter.iterate (r); } if (tiledFill) { TransformedImageFill<PixelARGB, PixelRGB, true> r (destData, srcData, transform, alpha, quality); iter.iterate (r); }
else { TransformedImageFill<PixelARGB, PixelRGB, false> r (destData, srcData, transform, alpha, quality); iter.iterate (r); } else { TransformedImageFill<PixelARGB, PixelRGB, false> r (destData, srcData, transform, alpha, quality); iter.iterate (r); }
break; break;
case Image::SingleChannel:
case Image::UnknownFormat:
default: default:
if (tiledFill) { TransformedImageFill<PixelARGB, PixelAlpha, true> r (destData, srcData, transform, alpha, quality); iter.iterate (r); } if (tiledFill) { TransformedImageFill<PixelARGB, PixelAlpha, true> r (destData, srcData, transform, alpha, quality); iter.iterate (r); }
else { TransformedImageFill<PixelARGB, PixelAlpha, false> r (destData, srcData, transform, alpha, quality); iter.iterate (r); } else { TransformedImageFill<PixelARGB, PixelAlpha, false> r (destData, srcData, transform, alpha, quality); iter.iterate (r); }
@@ -1434,6 +1436,7 @@ namespace EdgeTableFillers
break; break;
case Image::RGB: case Image::RGB:
{
switch (srcData.pixelFormat) switch (srcData.pixelFormat)
{ {
case Image::ARGB: case Image::ARGB:
@@ -1444,13 +1447,18 @@ namespace EdgeTableFillers
if (tiledFill) { TransformedImageFill<PixelRGB, PixelRGB, true> r (destData, srcData, transform, alpha, quality); iter.iterate (r); } if (tiledFill) { TransformedImageFill<PixelRGB, PixelRGB, true> r (destData, srcData, transform, alpha, quality); iter.iterate (r); }
else { TransformedImageFill<PixelRGB, PixelRGB, false> r (destData, srcData, transform, alpha, quality); iter.iterate (r); } else { TransformedImageFill<PixelRGB, PixelRGB, false> r (destData, srcData, transform, alpha, quality); iter.iterate (r); }
break; break;
case Image::SingleChannel:
case Image::UnknownFormat:
default: default:
if (tiledFill) { TransformedImageFill<PixelRGB, PixelAlpha, true> r (destData, srcData, transform, alpha, quality); iter.iterate (r); } if (tiledFill) { TransformedImageFill<PixelRGB, PixelAlpha, true> r (destData, srcData, transform, alpha, quality); iter.iterate (r); }
else { TransformedImageFill<PixelRGB, PixelAlpha, false> r (destData, srcData, transform, alpha, quality); iter.iterate (r); } else { TransformedImageFill<PixelRGB, PixelAlpha, false> r (destData, srcData, transform, alpha, quality); iter.iterate (r); }
break; break;
} }
break; break;
}
case Image::SingleChannel:
case Image::UnknownFormat:
default: default:
switch (srcData.pixelFormat) switch (srcData.pixelFormat)
{ {
@@ -1462,6 +1470,8 @@ namespace EdgeTableFillers
if (tiledFill) { TransformedImageFill<PixelAlpha, PixelRGB, true> r (destData, srcData, transform, alpha, quality); iter.iterate (r); } if (tiledFill) { TransformedImageFill<PixelAlpha, PixelRGB, true> r (destData, srcData, transform, alpha, quality); iter.iterate (r); }
else { TransformedImageFill<PixelAlpha, PixelRGB, false> r (destData, srcData, transform, alpha, quality); iter.iterate (r); } else { TransformedImageFill<PixelAlpha, PixelRGB, false> r (destData, srcData, transform, alpha, quality); iter.iterate (r); }
break; break;
case Image::SingleChannel:
case Image::UnknownFormat:
default: default:
if (tiledFill) { TransformedImageFill<PixelAlpha, PixelAlpha, true> r (destData, srcData, transform, alpha, quality); iter.iterate (r); } if (tiledFill) { TransformedImageFill<PixelAlpha, PixelAlpha, true> r (destData, srcData, transform, alpha, quality); iter.iterate (r); }
else { TransformedImageFill<PixelAlpha, PixelAlpha, false> r (destData, srcData, transform, alpha, quality); iter.iterate (r); } else { TransformedImageFill<PixelAlpha, PixelAlpha, false> r (destData, srcData, transform, alpha, quality); iter.iterate (r); }
@@ -1487,6 +1497,8 @@ namespace EdgeTableFillers
if (tiledFill) { ImageFill<PixelARGB, PixelRGB, true> r (destData, srcData, alpha, x, y); iter.iterate (r); } if (tiledFill) { ImageFill<PixelARGB, PixelRGB, true> r (destData, srcData, alpha, x, y); iter.iterate (r); }
else { ImageFill<PixelARGB, PixelRGB, false> r (destData, srcData, alpha, x, y); iter.iterate (r); } else { ImageFill<PixelARGB, PixelRGB, false> r (destData, srcData, alpha, x, y); iter.iterate (r); }
break; break;
case Image::SingleChannel:
case Image::UnknownFormat:
default: default:
if (tiledFill) { ImageFill<PixelARGB, PixelAlpha, true> r (destData, srcData, alpha, x, y); iter.iterate (r); } if (tiledFill) { ImageFill<PixelARGB, PixelAlpha, true> r (destData, srcData, alpha, x, y); iter.iterate (r); }
else { ImageFill<PixelARGB, PixelAlpha, false> r (destData, srcData, alpha, x, y); iter.iterate (r); } else { ImageFill<PixelARGB, PixelAlpha, false> r (destData, srcData, alpha, x, y); iter.iterate (r); }
@@ -1505,6 +1517,8 @@ namespace EdgeTableFillers
if (tiledFill) { ImageFill<PixelRGB, PixelRGB, true> r (destData, srcData, alpha, x, y); iter.iterate (r); } if (tiledFill) { ImageFill<PixelRGB, PixelRGB, true> r (destData, srcData, alpha, x, y); iter.iterate (r); }
else { ImageFill<PixelRGB, PixelRGB, false> r (destData, srcData, alpha, x, y); iter.iterate (r); } else { ImageFill<PixelRGB, PixelRGB, false> r (destData, srcData, alpha, x, y); iter.iterate (r); }
break; break;
case Image::SingleChannel:
case Image::UnknownFormat:
default: default:
if (tiledFill) { ImageFill<PixelRGB, PixelAlpha, true> r (destData, srcData, alpha, x, y); iter.iterate (r); } if (tiledFill) { ImageFill<PixelRGB, PixelAlpha, true> r (destData, srcData, alpha, x, y); iter.iterate (r); }
else { ImageFill<PixelRGB, PixelAlpha, false> r (destData, srcData, alpha, x, y); iter.iterate (r); } else { ImageFill<PixelRGB, PixelAlpha, false> r (destData, srcData, alpha, x, y); iter.iterate (r); }
@@ -1512,6 +1526,8 @@ namespace EdgeTableFillers
} }
break; break;
case Image::SingleChannel:
case Image::UnknownFormat:
default: default:
switch (srcData.pixelFormat) switch (srcData.pixelFormat)
{ {
@@ -1523,6 +1539,8 @@ namespace EdgeTableFillers
if (tiledFill) { ImageFill<PixelAlpha, PixelRGB, true> r (destData, srcData, alpha, x, y); iter.iterate (r); } if (tiledFill) { ImageFill<PixelAlpha, PixelRGB, true> r (destData, srcData, alpha, x, y); iter.iterate (r); }
else { ImageFill<PixelAlpha, PixelRGB, false> r (destData, srcData, alpha, x, y); iter.iterate (r); } else { ImageFill<PixelAlpha, PixelRGB, false> r (destData, srcData, alpha, x, y); iter.iterate (r); }
break; break;
case Image::SingleChannel:
case Image::UnknownFormat:
default: default:
if (tiledFill) { ImageFill<PixelAlpha, PixelAlpha, true> r (destData, srcData, alpha, x, y); iter.iterate (r); } if (tiledFill) { ImageFill<PixelAlpha, PixelAlpha, true> r (destData, srcData, alpha, x, y); iter.iterate (r); }
else { ImageFill<PixelAlpha, PixelAlpha, false> r (destData, srcData, alpha, x, y); iter.iterate (r); } else { ImageFill<PixelAlpha, PixelAlpha, false> r (destData, srcData, alpha, x, y); iter.iterate (r); }
@@ -2589,6 +2607,8 @@ public:
{ {
case Image::ARGB: EdgeTableFillers::renderSolidFill (iter, destData, colour, replaceContents, (PixelARGB*) nullptr); break; case Image::ARGB: EdgeTableFillers::renderSolidFill (iter, destData, colour, replaceContents, (PixelARGB*) nullptr); break;
case Image::RGB: EdgeTableFillers::renderSolidFill (iter, destData, colour, replaceContents, (PixelRGB*) nullptr); break; case Image::RGB: EdgeTableFillers::renderSolidFill (iter, destData, colour, replaceContents, (PixelRGB*) nullptr); break;
case Image::SingleChannel:
case Image::UnknownFormat:
default: EdgeTableFillers::renderSolidFill (iter, destData, colour, replaceContents, (PixelAlpha*) nullptr); break; default: EdgeTableFillers::renderSolidFill (iter, destData, colour, replaceContents, (PixelAlpha*) nullptr); break;
} }
} }
@@ -2606,6 +2626,8 @@ public:
{ {
case Image::ARGB: EdgeTableFillers::renderGradient (iter, destData, gradient, trans, lookupTable, numLookupEntries, isIdentity, (PixelARGB*) nullptr); break; case Image::ARGB: EdgeTableFillers::renderGradient (iter, destData, gradient, trans, lookupTable, numLookupEntries, isIdentity, (PixelARGB*) nullptr); break;
case Image::RGB: EdgeTableFillers::renderGradient (iter, destData, gradient, trans, lookupTable, numLookupEntries, isIdentity, (PixelRGB*) nullptr); break; case Image::RGB: EdgeTableFillers::renderGradient (iter, destData, gradient, trans, lookupTable, numLookupEntries, isIdentity, (PixelRGB*) nullptr); break;
case Image::SingleChannel:
case Image::UnknownFormat:
default: EdgeTableFillers::renderGradient (iter, destData, gradient, trans, lookupTable, numLookupEntries, isIdentity, (PixelAlpha*) nullptr); break; default: EdgeTableFillers::renderGradient (iter, destData, gradient, trans, lookupTable, numLookupEntries, isIdentity, (PixelAlpha*) nullptr); break;
} }
} }


+ 2
- 0
modules/juce_graphics/native/juce_mac_Fonts.mm View File

@@ -189,6 +189,7 @@ namespace CoreTextTypeLayout
{ {
case AttributedString::none: return kCTLineBreakByClipping; case AttributedString::none: return kCTLineBreakByClipping;
case AttributedString::byChar: return kCTLineBreakByCharWrapping; case AttributedString::byChar: return kCTLineBreakByCharWrapping;
case AttributedString::byWord:
default: return kCTLineBreakByWordWrapping; default: return kCTLineBreakByWordWrapping;
} }
} }
@@ -199,6 +200,7 @@ namespace CoreTextTypeLayout
{ {
case AttributedString::rightToLeft: return kCTWritingDirectionRightToLeft; case AttributedString::rightToLeft: return kCTWritingDirectionRightToLeft;
case AttributedString::leftToRight: return kCTWritingDirectionLeftToRight; case AttributedString::leftToRight: return kCTWritingDirectionLeftToRight;
case AttributedString::natural:
default: return kCTWritingDirectionNatural; default: return kCTWritingDirectionNatural;
} }
} }


+ 0
- 2
modules/juce_gui_basics/filebrowser/juce_FileTreeComponent.cpp View File

@@ -27,8 +27,6 @@
namespace juce namespace juce
{ {
Image juce_createIconForFile (const File&);
//============================================================================== //==============================================================================
class FileListTreeItem : public TreeViewItem, class FileListTreeItem : public TreeViewItem,
private TimeSliceClient, private TimeSliceClient,


+ 1
- 0
modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp View File

@@ -2143,6 +2143,7 @@ void LookAndFeel_V2::createTabButtonShape (TabBarButton& button, Path& p, bool /
p.lineTo (-overhang, -overhang); p.lineTo (-overhang, -overhang);
break; break;
case TabbedButtonBar::TabsAtTop:
default: default:
p.startNewSubPath (0.0f, h); p.startNewSubPath (0.0f, h);
p.lineTo (indent, 0.0f); p.lineTo (indent, 0.0f);


+ 1
- 0
modules/juce_gui_basics/native/juce_linux_X11_Windowing.cpp View File

@@ -4093,6 +4093,7 @@ void* MouseCursor::createStandardMouseCursor (MouseCursor::StandardCursorType ty
return CustomMouseCursorInfo (ImageFileFormat::loadFrom (copyCursorData, copyCursorSize), { 1, 3 }).create(); return CustomMouseCursorInfo (ImageFileFormat::loadFrom (copyCursorData, copyCursorSize), { 1, 3 }).create();
} }
case NumStandardCursorTypes:
default: default:
jassertfalse; jassertfalse;
return None; return None;


+ 1
- 0
modules/juce_gui_basics/native/juce_mac_MouseCursor.mm View File

@@ -144,6 +144,7 @@ void* MouseCursor::createStandardMouseCursor (MouseCursor::StandardCursorType ty
case UpDownLeftRightResizeCursor: case UpDownLeftRightResizeCursor:
return MouseCursorHelpers::fromHIServices ("move"); return MouseCursorHelpers::fromHIServices ("move");
case NumStandardCursorTypes:
default: default:
jassertfalse; jassertfalse;
break; break;


+ 20
- 0
modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm View File

@@ -1524,6 +1524,26 @@ private:
case NSEventTypeTabletProximity: case NSEventTypeTabletProximity:
break; break;
case NSEventTypeFlagsChanged:
case NSEventTypeAppKitDefined:
case NSEventTypeSystemDefined:
case NSEventTypeApplicationDefined:
case NSEventTypePeriodic:
case NSEventTypeGesture:
case NSEventTypeMagnify:
case NSEventTypeSwipe:
case NSEventTypeRotate:
case NSEventTypeBeginGesture:
case NSEventTypeEndGesture:
case NSEventTypeSmartMagnify:
case NSEventTypeQuickLook:
case NSEventTypePressure:
#if defined (MAC_OS_X_VERSION_10_12) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_12
case NSEventTypeDirectTouch:
#if defined (MAC_OS_X_VERSION_10_15) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_15
case NSEventTypeChangeMode:
#endif
#endif
default: default:
return false; return false;
} }


+ 1
- 0
modules/juce_gui_basics/native/juce_win32_Windowing.cpp View File

@@ -3731,6 +3731,7 @@ private:
case WM_DISPLAYCHANGE: case WM_DISPLAYCHANGE:
InvalidateRect (h, 0, 0); InvalidateRect (h, 0, 0);
// intentional fall-through... // intentional fall-through...
JUCE_FALLTHROUGH
case WM_SETTINGCHANGE: // note the fall-through in the previous case! case WM_SETTINGCHANGE: // note the fall-through in the previous case!
doSettingChange(); doSettingChange();
break; break;


+ 8
- 6
modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.cpp View File

@@ -33,12 +33,10 @@ struct MarkerListScope : public Expression::Scope
Expression getSymbolValue (const String& symbol) const override Expression getSymbolValue (const String& symbol) const override
{ {
switch (RelativeCoordinate::StandardStrings::getTypeOf (symbol))
{
case RelativeCoordinate::StandardStrings::width: return Expression ((double) component.getWidth());
case RelativeCoordinate::StandardStrings::height: return Expression ((double) component.getHeight());
default: break;
}
auto type = RelativeCoordinate::StandardStrings::getTypeOf (symbol);
if (type == RelativeCoordinate::StandardStrings::width) return Expression ((double) component.getWidth());
if (type == RelativeCoordinate::StandardStrings::height) return Expression ((double) component.getHeight());
MarkerList* list; MarkerList* list;
@@ -116,6 +114,8 @@ Expression RelativeCoordinatePositionerBase::ComponentScope::getSymbolValue (con
case RelativeCoordinate::StandardStrings::height: return Expression ((double) component.getHeight()); case RelativeCoordinate::StandardStrings::height: return Expression ((double) component.getHeight());
case RelativeCoordinate::StandardStrings::right: return Expression ((double) component.getRight()); case RelativeCoordinate::StandardStrings::right: return Expression ((double) component.getRight());
case RelativeCoordinate::StandardStrings::bottom: return Expression ((double) component.getBottom()); case RelativeCoordinate::StandardStrings::bottom: return Expression ((double) component.getBottom());
case RelativeCoordinate::StandardStrings::parent:
case RelativeCoordinate::StandardStrings::unknown:
default: break; default: break;
} }
@@ -180,6 +180,8 @@ public:
positioner.registerComponentListener (component); positioner.registerComponentListener (component);
break; break;
case RelativeCoordinate::StandardStrings::parent:
case RelativeCoordinate::StandardStrings::unknown:
default: default:
if (auto* parent = component.getParentComponent()) if (auto* parent = component.getParentComponent())
{ {


+ 9
- 0
modules/juce_gui_basics/positioning/juce_RelativeRectangle.cpp View File

@@ -52,6 +52,11 @@ namespace RelativeRectangleHelpers
case RelativeCoordinate::StandardStrings::right: case RelativeCoordinate::StandardStrings::right:
case RelativeCoordinate::StandardStrings::top: case RelativeCoordinate::StandardStrings::top:
case RelativeCoordinate::StandardStrings::bottom: return false; case RelativeCoordinate::StandardStrings::bottom: return false;
case RelativeCoordinate::StandardStrings::width:
case RelativeCoordinate::StandardStrings::height:
case RelativeCoordinate::StandardStrings::parent:
case RelativeCoordinate::StandardStrings::unknown:
default: break; default: break;
} }
@@ -127,6 +132,10 @@ public:
case RelativeCoordinate::StandardStrings::top: return rect.top.getExpression(); case RelativeCoordinate::StandardStrings::top: return rect.top.getExpression();
case RelativeCoordinate::StandardStrings::right: return rect.right.getExpression(); case RelativeCoordinate::StandardStrings::right: return rect.right.getExpression();
case RelativeCoordinate::StandardStrings::bottom: return rect.bottom.getExpression(); case RelativeCoordinate::StandardStrings::bottom: return rect.bottom.getExpression();
case RelativeCoordinate::StandardStrings::width:
case RelativeCoordinate::StandardStrings::height:
case RelativeCoordinate::StandardStrings::parent:
case RelativeCoordinate::StandardStrings::unknown:
default: break; default: break;
} }


+ 5
- 3
modules/juce_gui_basics/widgets/juce_Toolbar.cpp View File

@@ -728,9 +728,10 @@ private:
int selectedStyle = 0; int selectedStyle = 0;
switch (bar.getStyle()) switch (bar.getStyle())
{ {
case Toolbar::iconsOnly: selectedStyle = 1; break;
case Toolbar::iconsWithText: selectedStyle = 2; break;
case Toolbar::textOnly: selectedStyle = 3; break;
case Toolbar::iconsOnly: selectedStyle = 1; break;
case Toolbar::iconsWithText: selectedStyle = 2; break;
case Toolbar::textOnly: selectedStyle = 3; break;
default: break;
} }
styleBox.setSelectedId (selectedStyle); styleBox.setSelectedId (selectedStyle);
@@ -757,6 +758,7 @@ private:
case 1: toolbar.setStyle (Toolbar::iconsOnly); break; case 1: toolbar.setStyle (Toolbar::iconsOnly); break;
case 2: toolbar.setStyle (Toolbar::iconsWithText); break; case 2: toolbar.setStyle (Toolbar::iconsWithText); break;
case 3: toolbar.setStyle (Toolbar::textOnly); break; case 3: toolbar.setStyle (Toolbar::textOnly); break;
default: break;
} }
palette.resized(); // to make it update the styles palette.resized(); // to make it update the styles


+ 1
- 1
modules/juce_gui_extra/code_editor/juce_CPlusPlusCodeTokeniserFunctions.h View File

@@ -616,8 +616,8 @@ struct CppTokeniserFunctions
charsOnLine += 2; charsOnLine += 2;
break; break;
} }
// deliberate fall-through... // deliberate fall-through...
JUCE_FALLTHROUGH
default: default:
if (c >= 32 && c < 127 && ! (lastWasHexEscapeCode // (have to avoid following a hex escape sequence with a valid hex digit) if (c >= 32 && c < 127 && ! (lastWasHexEscapeCode // (have to avoid following a hex escape sequence with a valid hex digit)


+ 9
- 0
modules/juce_gui_extra/native/juce_linux_XEmbedComponent.cpp View File

@@ -480,6 +480,9 @@ private:
if (wantsFocus) if (wantsFocus)
owner.moveKeyboardFocusToSibling (false); owner.moveKeyboardFocusToSibling (false);
break; break;
default:
break;
} }
} }
@@ -500,6 +503,9 @@ private:
MessageManager::callAsync ([this] {componentMovedOrResized (owner, true, true);}); MessageManager::callAsync ([this] {componentMovedOrResized (owner, true, true);});
return true; return true;
default:
break;
} }
} }
else if (e.xany.window == host && host != 0) else if (e.xany.window == host && host != 0)
@@ -536,6 +542,9 @@ private:
return true; return true;
} }
break; break;
default:
break;
} }
} }


+ 1
- 0
modules/juce_opengl/opengl/juce_OpenGLTexture.cpp View File

@@ -137,6 +137,7 @@ void OpenGLTexture::loadImage (const Image& image)
case Image::ARGB: Flipper<PixelARGB> ::flip (dataCopy, srcData.data, srcData.lineStride, imageW, imageH); break; case Image::ARGB: Flipper<PixelARGB> ::flip (dataCopy, srcData.data, srcData.lineStride, imageW, imageH); break;
case Image::RGB: Flipper<PixelRGB> ::flip (dataCopy, srcData.data, srcData.lineStride, imageW, imageH); break; case Image::RGB: Flipper<PixelRGB> ::flip (dataCopy, srcData.data, srcData.lineStride, imageW, imageH); break;
case Image::SingleChannel: Flipper<PixelAlpha>::flip (dataCopy, srcData.data, srcData.lineStride, imageW, imageH); break; case Image::SingleChannel: Flipper<PixelAlpha>::flip (dataCopy, srcData.data, srcData.lineStride, imageW, imageH); break;
case Image::UnknownFormat:
default: break; default: break;
} }


+ 1
- 0
modules/juce_osc/osc/juce_OSCAddress.cpp View File

@@ -175,6 +175,7 @@ namespace
break; break;
} }
// else = special case: fall through to default and treat '!' as a non-special character. // else = special case: fall through to default and treat '!' as a non-special character.
JUCE_FALLTHROUGH
default: default:
set.add (c); set.add (c);


+ 1
- 0
modules/juce_video/native/juce_android_CameraDevice.h View File

@@ -1325,6 +1325,7 @@ private:
return (cameraSensorOrientation + 180) % 360; return (cameraSensorOrientation + 180) % 360;
} }
break; break;
case Desktop::allOrientations:
default: default:
return 0; return 0;
} }


+ 4
- 1
modules/juce_video/native/juce_mac_Video.h View File

@@ -394,8 +394,11 @@ private:
notifyOwnerPreparationFinished (url, Result::fail (errorMessage), nullptr); notifyOwnerPreparationFinished (url, Result::fail (errorMessage), nullptr);
return; return;
} }
case AVKeyValueStatusUnknown:
case AVKeyValueStatusLoading:
default: default:
{}
break;
} }
} }


Loading…
Cancel
Save