| @@ -81,19 +81,19 @@ public: | |||
| auto leftSlice = bounds.removeFromLeft (150); | |||
| auto centreSlice = bounds; | |||
| //====================================================================== | |||
| //============================================================================== | |||
| rightSlice.removeFromRight (20); | |||
| auto iconSlice = rightSlice.removeFromRight (100); | |||
| huckleberryLogoBounds = iconSlice.removeFromBottom (100).toFloat(); | |||
| //====================================================================== | |||
| //============================================================================== | |||
| juceLogoBounds = leftSlice.removeFromTop (150).toFloat(); | |||
| juceLogoBounds.setWidth (juceLogoBounds.getWidth() + 100); | |||
| juceLogoBounds.setHeight (juceLogoBounds.getHeight() + 100); | |||
| copyrightLabel.setBounds (leftSlice.removeFromBottom (20)); | |||
| //====================================================================== | |||
| //============================================================================== | |||
| auto titleHeight = 40; | |||
| centreSlice.removeFromTop ((centreSlice.getHeight() / 2) - (titleHeight / 2)); | |||
| @@ -510,7 +510,7 @@ void ProjucerApplication::createColourSchemeItems (PopupMenu& menu) | |||
| menu.addSubMenu ("Colour Scheme", colourSchemeMenu); | |||
| //========================================================================== | |||
| //============================================================================== | |||
| PopupMenu editorColourSchemeMenu; | |||
| auto& appearanceSettings = getAppSettings().appearance; | |||
| @@ -625,7 +625,7 @@ void ProjucerApplication::createExamplesPopupMenu (PopupMenu& menu) noexcept | |||
| } | |||
| } | |||
| //========================================================================== | |||
| //============================================================================== | |||
| static File getJUCEExamplesDirectoryPathFromGlobal() | |||
| { | |||
| auto globalPath = File::createFileWithoutCheckingPath (getAppSettings().getStoredPath (Ids::jucePath, TargetOS::getThisOS()).get().toString() | |||
| @@ -722,7 +722,7 @@ void ProjucerApplication::findAndLaunchExample (int selectedIndex) | |||
| Analytics::getInstance()->logEvent ("Example Opened", data, ProjucerAnalyticsEvent::exampleEvent); | |||
| } | |||
| //========================================================================== | |||
| //============================================================================== | |||
| static String getPlatformSpecificFileExtension() | |||
| { | |||
| #if JUCE_MAC | |||
| @@ -940,7 +940,7 @@ void ProjucerApplication::launchDemoRunner() | |||
| } | |||
| } | |||
| //========================================================================== | |||
| //============================================================================== | |||
| void ProjucerApplication::handleMainMenuCommand (int menuItemID) | |||
| { | |||
| if (menuItemID >= recentProjectsBaseID && menuItemID < (recentProjectsBaseID + 100)) | |||
| @@ -368,7 +368,7 @@ private: | |||
| Project& project; | |||
| ValueTree exportersTree; | |||
| //========================================================================== | |||
| //============================================================================== | |||
| void valueTreeChildAdded (ValueTree& parentTree, ValueTree&) override { refreshIfNeeded (parentTree); } | |||
| void valueTreeChildRemoved (ValueTree& parentTree, ValueTree&, int) override { refreshIfNeeded (parentTree); } | |||
| void valueTreeChildOrderChanged (ValueTree& parentTree, int, int) override { refreshIfNeeded (parentTree); } | |||
| @@ -172,7 +172,7 @@ private: | |||
| Rectangle<int> textBounds; | |||
| //========================================================================== | |||
| //============================================================================== | |||
| String getErrorMessage() | |||
| { | |||
| showDownloadButton = false; | |||
| @@ -27,7 +27,7 @@ | |||
| #pragma once | |||
| //========================================================================== | |||
| //============================================================================== | |||
| struct ProjectSettingsComponent : public Component, | |||
| private ChangeListener | |||
| { | |||
| @@ -35,7 +35,7 @@ | |||
| #include "../../LiveBuildEngine/jucer_DiagnosticMessage.h" | |||
| #include "../../LiveBuildEngine/jucer_CompileEngineClient.h" | |||
| //====================================================================== | |||
| //============================================================================== | |||
| HeaderComponent::HeaderComponent() | |||
| { | |||
| addAndMakeVisible (configLabel); | |||
| @@ -66,13 +66,13 @@ HeaderComponent::~HeaderComponent() | |||
| } | |||
| } | |||
| //====================================================================== | |||
| //============================================================================== | |||
| void HeaderComponent::resized() | |||
| { | |||
| auto bounds = getLocalBounds(); | |||
| configLabel.setFont ({ bounds.getHeight() / 3.0f }); | |||
| //====================================================================== | |||
| //============================================================================== | |||
| { | |||
| auto headerBounds = bounds.removeFromLeft (tabsWidth); | |||
| @@ -87,7 +87,7 @@ void HeaderComponent::resized() | |||
| projectNameLabel.setBounds (headerBounds); | |||
| } | |||
| //====================================================================== | |||
| //============================================================================== | |||
| auto exporterWidth = jmin (400, bounds.getWidth() / 2); | |||
| Rectangle<int> exporterBounds (0, 0, exporterWidth, bounds.getHeight()); | |||
| @@ -114,7 +114,7 @@ void HeaderComponent::paint (Graphics& g) | |||
| runAppButton->getWidth(), runAppButton->getHeight()); | |||
| } | |||
| //====================================================================== | |||
| //============================================================================== | |||
| void HeaderComponent::setCurrentProject (Project* p) noexcept | |||
| { | |||
| project = p; | |||
| @@ -148,7 +148,7 @@ void HeaderComponent::setCurrentProject (Project* p) noexcept | |||
| } | |||
| } | |||
| //====================================================================== | |||
| //============================================================================== | |||
| void HeaderComponent::updateExporters() noexcept | |||
| { | |||
| auto selectedName = getSelectedExporterName(); | |||
| @@ -203,7 +203,7 @@ bool HeaderComponent::canCurrentExporterLaunchProject() const noexcept | |||
| return false; | |||
| } | |||
| //====================================================================== | |||
| //============================================================================== | |||
| int HeaderComponent::getUserButtonWidth() const noexcept | |||
| { | |||
| return userSettingsButton->getWidth(); | |||
| @@ -215,7 +215,7 @@ void HeaderComponent::sidebarTabsWidthChanged (int newWidth) noexcept | |||
| resized(); | |||
| } | |||
| //====================================================================== | |||
| //============================================================================== | |||
| void HeaderComponent::showUserSettings() noexcept | |||
| { | |||
| #if JUCER_ENABLE_GPL_MODE | |||
| @@ -233,7 +233,7 @@ void HeaderComponent::showUserSettings() noexcept | |||
| userSettingsWindow = &CallOutBox::launchAsynchronously (content, userSettingsButton->getScreenBounds(), nullptr); | |||
| } | |||
| //========================================================================== | |||
| //============================================================================== | |||
| void HeaderComponent::lookAndFeelChanged() | |||
| { | |||
| if (userSettingsWindow != nullptr) | |||
| @@ -261,7 +261,7 @@ void HeaderComponent::timerCallback() | |||
| repaint(); | |||
| } | |||
| //====================================================================== | |||
| //============================================================================== | |||
| static void sendProjectButtonAnalyticsEvent (StringRef label) | |||
| { | |||
| StringPairArray data; | |||
| @@ -351,7 +351,7 @@ void HeaderComponent::updateUserAvatar() noexcept | |||
| } | |||
| } | |||
| //====================================================================== | |||
| //============================================================================== | |||
| void HeaderComponent::buildPing() | |||
| { | |||
| if (! isTimerRunning()) | |||
| @@ -43,33 +43,33 @@ public: | |||
| HeaderComponent(); | |||
| ~HeaderComponent() override; | |||
| //========================================================================== | |||
| //============================================================================== | |||
| void resized() override; | |||
| void paint (Graphics&) override; | |||
| //========================================================================== | |||
| //============================================================================== | |||
| void setCurrentProject (Project*) noexcept; | |||
| //========================================================================== | |||
| //============================================================================== | |||
| void updateExporters() noexcept; | |||
| String getSelectedExporterName() const noexcept; | |||
| bool canCurrentExporterLaunchProject() const noexcept; | |||
| //========================================================================== | |||
| //============================================================================== | |||
| int getUserButtonWidth() const noexcept; | |||
| void sidebarTabsWidthChanged (int newWidth) noexcept; | |||
| //========================================================================== | |||
| //============================================================================== | |||
| void showUserSettings() noexcept; | |||
| private: | |||
| //========================================================================== | |||
| //============================================================================== | |||
| void lookAndFeelChanged() override; | |||
| void changeListenerCallback (ChangeBroadcaster* source) override; | |||
| void valueChanged (Value&) override; | |||
| void timerCallback() override; | |||
| //========================================================================== | |||
| //============================================================================== | |||
| void valueTreeChildAdded (ValueTree& parentTree, ValueTree&) override { updateIfNeeded (parentTree); } | |||
| void valueTreeChildRemoved (ValueTree& parentTree, ValueTree&, int) override { updateIfNeeded (parentTree); } | |||
| void valueTreeChildOrderChanged (ValueTree& parentTree, int, int) override { updateIfNeeded (parentTree); } | |||
| @@ -80,19 +80,19 @@ private: | |||
| updateExporters(); | |||
| } | |||
| //========================================================================== | |||
| //============================================================================== | |||
| void initialiseButtons() noexcept; | |||
| void updateName() noexcept; | |||
| void updateExporterButton() noexcept; | |||
| void updateUserAvatar() noexcept; | |||
| //========================================================================== | |||
| //============================================================================== | |||
| void buildPing(); | |||
| void buildFinished (bool); | |||
| void setRunAppButtonState (bool); | |||
| //========================================================================== | |||
| //============================================================================== | |||
| int tabsWidth = 200; | |||
| bool isBuilding = false; | |||
| @@ -122,24 +122,24 @@ public: | |||
| bounds.removeFromLeft (5); | |||
| g.setColour (rowIsSelected ? findColour (defaultHighlightedTextColourId) : findColour (widgetTextColourId)); | |||
| //====================================================================== | |||
| //============================================================================== | |||
| auto moduleID = project.getEnabledModules().getModuleID (rowNumber); | |||
| g.drawFittedText (moduleID, bounds.removeFromLeft (roundToInt (listHeader->getProportionAtIndex (0) * width)), Justification::centredLeft, 1); | |||
| //====================================================================== | |||
| //============================================================================== | |||
| auto version = project.getEnabledModules().getModuleInfo (moduleID).getVersion(); | |||
| if (version.isEmpty()) | |||
| version = "?"; | |||
| g.drawFittedText (version, bounds.removeFromLeft (roundToInt (listHeader->getProportionAtIndex (1) * width)), Justification::centredLeft, 1); | |||
| //====================================================================== | |||
| //============================================================================== | |||
| auto copyLocally = project.getEnabledModules().shouldCopyModuleFilesLocally (moduleID).getValue() ? "Yes" : "No"; | |||
| g.drawFittedText (copyLocally, bounds.removeFromLeft (roundToInt (listHeader->getProportionAtIndex (2) * width)), Justification::centredLeft, 1); | |||
| //====================================================================== | |||
| //============================================================================== | |||
| String pathText; | |||
| if (project.getEnabledModules().shouldUseGlobalPath (moduleID)) | |||
| @@ -255,7 +255,7 @@ void ProjectContentComponent::rebuildProjectTabs() | |||
| addAndMakeVisible (sidebarTabs); | |||
| createProjectTabs(); | |||
| //====================================================================== | |||
| //============================================================================== | |||
| auto& settings = project->getStoredProperties(); | |||
| auto lastTreeWidth = settings.getValue ("projectPanelWidth").getIntValue(); | |||
| @@ -271,7 +271,7 @@ void ProjectContentComponent::rebuildProjectTabs() | |||
| projectTab->setPanelHeightProportion (i, settings.getValue ("projectTabPanelHeight" + String (i), "1") | |||
| .getFloatValue()); | |||
| //====================================================================== | |||
| //============================================================================== | |||
| resizerBar.reset (new ResizableEdgeComponent (&sidebarTabs, &sidebarSizeConstrainer, | |||
| ResizableEdgeComponent::rightEdge)); | |||
| addAndMakeVisible (resizerBar.get()); | |||
| @@ -627,7 +627,7 @@ protected: | |||
| optimisationLevelValue.setDefault (isDebug() ? gccO0 : gccO3); | |||
| } | |||
| //========================================================================== | |||
| //============================================================================== | |||
| void createConfigProperties (PropertyListBuilder& props) override | |||
| { | |||
| addXcodePluginInstallPathProperties (props); | |||
| @@ -684,7 +684,7 @@ protected: | |||
| return "${CURRENT_ARCH}"; | |||
| } | |||
| //========================================================================== | |||
| //============================================================================== | |||
| String getOSXArchitectureString() const { return osxArchitecture.get(); } | |||
| String getPListPreprocessorDefinitionsString() const { return plistPreprocessorDefinitions.get(); } | |||
| @@ -711,7 +711,7 @@ protected: | |||
| String getUnityPluginBinaryLocationString() const { return unityPluginBinaryLocation.get(); } | |||
| private: | |||
| //========================================================================== | |||
| //============================================================================== | |||
| bool iOS; | |||
| ValueWithDefault osxSDKVersion, osxDeploymentTarget, iosDeploymentTarget, osxArchitecture, | |||
| @@ -720,7 +720,7 @@ protected: | |||
| vstBinaryLocation, vst3BinaryLocation, auBinaryLocation, rtasBinaryLocation, | |||
| aaxBinaryLocation, unityPluginBinaryLocation; | |||
| //========================================================================== | |||
| //============================================================================== | |||
| void addXcodePluginInstallPathProperties (PropertyListBuilder& props) | |||
| { | |||
| auto isBuildingAnyPlugins = (project.shouldBuildVST() || project.shouldBuildVST3() || project.shouldBuildAU() | |||
| @@ -1434,7 +1434,7 @@ public: | |||
| } | |||
| private: | |||
| //============================================================================= | |||
| //============================================================================== | |||
| void* (*threadEntryProc) (void*) = nullptr; | |||
| void* threadUserPtr = nullptr; | |||
| @@ -1351,13 +1351,13 @@ public: | |||
| } | |||
| private: | |||
| //============================================================================= | |||
| //============================================================================== | |||
| static void staticFinished (SLAndroidSimpleBufferQueueItf, void* context) | |||
| { | |||
| static_cast<SLRealtimeThread*> (context)->finished(); | |||
| } | |||
| //============================================================================= | |||
| //============================================================================== | |||
| DynamicLibrary slLibrary { "libOpenSLES.so" }; | |||
| SlRef<SLEngineItf_> engine; | |||
| @@ -125,7 +125,7 @@ public: | |||
| AudioDeviceManager& deviceManager; | |||
| private: | |||
| //============================================================================= | |||
| //============================================================================== | |||
| AudioDeviceManager defaultDeviceManager; | |||
| AudioSourcePlayer audioSourcePlayer; | |||
| bool usingCustomDeviceManager; | |||
| @@ -137,7 +137,7 @@ public: | |||
| void clear() noexcept { touches.clear(); } | |||
| private: | |||
| //========================================================================== | |||
| //============================================================================== | |||
| static bool matches (const TouchSurface::Touch& t1, | |||
| const TouchSurface::Touch& t2) noexcept | |||
| { | |||
| @@ -54,7 +54,7 @@ public: | |||
| /** This method will tell, if an other PhysicalTopologySource has locked the Midi connection */ | |||
| bool isLockedFromOutside() const; | |||
| //========================================================================== | |||
| //============================================================================== | |||
| /** For custom transport systems, this represents a connected device */ | |||
| struct DeviceConnection | |||
| { | |||
| @@ -86,7 +86,7 @@ protected: | |||
| virtual void handleTimerTick(); | |||
| private: | |||
| //========================================================================== | |||
| //============================================================================== | |||
| DeviceDetector* customDetector = nullptr; | |||
| friend struct Detector; | |||
| struct DetectorHolder; | |||
| @@ -43,7 +43,7 @@ public: | |||
| /** Destructor. */ | |||
| ~RuleBasedTopologySource() override; | |||
| //========================================================================== | |||
| //============================================================================== | |||
| /** Returns the currently active topology. */ | |||
| BlockTopology getCurrentTopology() const override; | |||
| @@ -80,7 +80,7 @@ public: | |||
| bool isActive() const override; | |||
| private: | |||
| //========================================================================== | |||
| //============================================================================== | |||
| struct Internal; | |||
| std::unique_ptr<Internal> internal; | |||
| }; | |||
| @@ -30,7 +30,7 @@ namespace juce | |||
| class TopologySource | |||
| { | |||
| public: | |||
| //========================================================================== | |||
| //============================================================================== | |||
| /** Destructor. */ | |||
| virtual ~TopologySource() = default; | |||
| @@ -43,7 +43,7 @@ public: | |||
| /** Returns true, if the TopologySource is currently trying to connect the block devices */ | |||
| virtual bool isActive() const = 0; | |||
| //========================================================================== | |||
| //============================================================================== | |||
| /** Used to receive callbacks for topology changes */ | |||
| struct Listener | |||
| { | |||
| @@ -71,7 +71,7 @@ public: | |||
| virtual void cancelAllActiveTouches() noexcept {} | |||
| protected: | |||
| //========================================================================== | |||
| //============================================================================== | |||
| ListenerList<Listener> listeners; | |||
| }; | |||
| @@ -38,7 +38,7 @@ struct Oversampling<SampleType>::OversamplingStage | |||
| OversamplingStage (size_t numChans, size_t newFactor) : numChannels (numChans), factor (newFactor) {} | |||
| virtual ~OversamplingStage() {} | |||
| //=============================================================================== | |||
| //============================================================================== | |||
| virtual SampleType getLatencyInSamples() = 0; | |||
| virtual void initProcessing (size_t maximumNumberOfSamplesBeforeOversampling) | |||
| @@ -66,7 +66,7 @@ struct Oversampling<SampleType>::OversamplingStage | |||
| }; | |||
| //=============================================================================== | |||
| //============================================================================== | |||
| /** Dummy oversampling stage class which simply copies and pastes the input | |||
| signal, which could be equivalent to a "one time" oversampling processing. | |||
| */ | |||
| @@ -77,7 +77,7 @@ struct OversamplingDummy : public Oversampling<SampleType>::OversamplingStage | |||
| OversamplingDummy (size_t numChans) : ParentType (numChans, 1) {} | |||
| //=============================================================================== | |||
| //============================================================================== | |||
| SampleType getLatencyInSamples() override | |||
| { | |||
| return 0; | |||
| @@ -104,7 +104,7 @@ struct OversamplingDummy : public Oversampling<SampleType>::OversamplingStage | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OversamplingDummy) | |||
| }; | |||
| //=============================================================================== | |||
| //============================================================================== | |||
| /** Oversampling stage class performing 2 times oversampling using the Filter | |||
| Design FIR Equiripple method. The resulting filter is linear phase, | |||
| symmetric, and has every two samples but the middle one equal to zero, | |||
| @@ -138,7 +138,7 @@ struct Oversampling2TimesEquirippleFIR : public Oversampling<SampleType>::Overs | |||
| position.resize (static_cast<int> (this->numChannels)); | |||
| } | |||
| //=============================================================================== | |||
| //============================================================================== | |||
| SampleType getLatencyInSamples() override | |||
| { | |||
| return static_cast<SampleType> (coefficientsUp.getFilterOrder() + coefficientsDown.getFilterOrder()) * 0.5f; | |||
| @@ -247,17 +247,17 @@ struct Oversampling2TimesEquirippleFIR : public Oversampling<SampleType>::Overs | |||
| } | |||
| private: | |||
| //=============================================================================== | |||
| //============================================================================== | |||
| dsp::FIR::Coefficients<SampleType> coefficientsUp, coefficientsDown; | |||
| AudioBuffer<SampleType> stateUp, stateDown, stateDown2; | |||
| Array<size_t> position; | |||
| //=============================================================================== | |||
| //============================================================================== | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Oversampling2TimesEquirippleFIR) | |||
| }; | |||
| //=============================================================================== | |||
| //============================================================================== | |||
| /** Oversampling stage class performing 2 times oversampling using the Filter | |||
| Design IIR Polyphase Allpass Cascaded method. The resulting filter is minimum | |||
| phase, and provided with a method to get the exact resulting latency. | |||
| @@ -299,7 +299,7 @@ struct Oversampling2TimesPolyphaseIIR : public Oversampling<SampleType>::Oversa | |||
| delayDown.resize (static_cast<int> (this->numChannels)); | |||
| } | |||
| //=============================================================================== | |||
| //============================================================================== | |||
| SampleType getLatencyInSamples() override | |||
| { | |||
| return latency; | |||
| @@ -453,7 +453,7 @@ struct Oversampling2TimesPolyphaseIIR : public Oversampling<SampleType>::Oversa | |||
| } | |||
| private: | |||
| //=============================================================================== | |||
| //============================================================================== | |||
| /** This function calculates the equivalent high order IIR filter of a given | |||
| polyphase cascaded allpass filters structure. | |||
| */ | |||
| @@ -515,19 +515,19 @@ private: | |||
| return coeffs; | |||
| } | |||
| //=============================================================================== | |||
| //============================================================================== | |||
| Array<SampleType> coefficientsUp, coefficientsDown; | |||
| SampleType latency; | |||
| AudioBuffer<SampleType> v1Up, v1Down; | |||
| Array<SampleType> delayDown; | |||
| //=============================================================================== | |||
| //============================================================================== | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Oversampling2TimesPolyphaseIIR) | |||
| }; | |||
| //=============================================================================== | |||
| //============================================================================== | |||
| template <typename SampleType> | |||
| Oversampling<SampleType>::Oversampling (size_t newNumChannels) | |||
| : numChannels (newNumChannels) | |||
| @@ -590,7 +590,7 @@ Oversampling<SampleType>::~Oversampling() | |||
| stages.clear(); | |||
| } | |||
| //=============================================================================== | |||
| //============================================================================== | |||
| template <typename SampleType> | |||
| void Oversampling<SampleType>::addDummyOversamplingStage() | |||
| { | |||
| @@ -627,7 +627,7 @@ void Oversampling<SampleType>::clearOversamplingStages() | |||
| factorOversampling = 1u; | |||
| } | |||
| //=============================================================================== | |||
| //============================================================================== | |||
| template <typename SampleType> | |||
| SampleType Oversampling<SampleType>::getLatencyInSamples() noexcept | |||
| { | |||
| @@ -649,7 +649,7 @@ size_t Oversampling<SampleType>::getOversamplingFactor() noexcept | |||
| return factorOversampling; | |||
| } | |||
| //=============================================================================== | |||
| //============================================================================== | |||
| template <typename SampleType> | |||
| void Oversampling<SampleType>::initProcessing (size_t maximumNumberOfSamplesBeforeOversampling) | |||
| { | |||
| @@ -29,7 +29,7 @@ namespace juce | |||
| namespace dsp | |||
| { | |||
| //=============================================================================== | |||
| //============================================================================== | |||
| /** | |||
| A processing class performing multi-channel oversampling. | |||
| @@ -65,7 +65,7 @@ public: | |||
| numFilterTypes | |||
| }; | |||
| //=============================================================================== | |||
| //============================================================================== | |||
| /** | |||
| Constructor of the oversampling class. All the processing parameters must be | |||
| provided at the creation of the oversampling object. | |||
| @@ -96,7 +96,7 @@ public: | |||
| /** Destructor. */ | |||
| ~Oversampling(); | |||
| //=============================================================================== | |||
| //============================================================================== | |||
| /** Returns the latency in samples of the whole processing. Use this information | |||
| in your main processor to compensate the additional latency involved with | |||
| the oversampling, for example with a dry / wet functionality, and to report | |||
| @@ -110,7 +110,7 @@ public: | |||
| /** Returns the current oversampling factor. */ | |||
| size_t getOversamplingFactor() noexcept; | |||
| //=============================================================================== | |||
| //============================================================================== | |||
| /** Must be called before any processing, to set the buffer sizes of the internal | |||
| buffers of the oversampling processing. | |||
| */ | |||
| @@ -135,7 +135,7 @@ public: | |||
| */ | |||
| void processSamplesDown (dsp::AudioBlock<SampleType>& outputBlock) noexcept; | |||
| //=============================================================================== | |||
| //============================================================================== | |||
| /** Adds a new oversampling stage to the Oversampling class, multiplying the | |||
| current oversampling factor by two. This is used with the default constructor | |||
| to create custom oversampling chains, requiring a call to the | |||
| @@ -179,7 +179,7 @@ public: | |||
| */ | |||
| void clearOversamplingStages(); | |||
| //=============================================================================== | |||
| //============================================================================== | |||
| size_t factorOversampling = 1; | |||
| size_t numChannels = 1; | |||
| @@ -188,11 +188,11 @@ public: | |||
| #endif | |||
| private: | |||
| //=============================================================================== | |||
| //============================================================================== | |||
| OwnedArray<OversamplingStage> stages; | |||
| bool isReady = false; | |||
| //=============================================================================== | |||
| //============================================================================== | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Oversampling) | |||
| }; | |||
| @@ -219,7 +219,7 @@ void SidePanel::mouseUp (const MouseEvent&) | |||
| } | |||
| } | |||
| //========================================================================== | |||
| //============================================================================== | |||
| void SidePanel::lookAndFeelChanged() | |||
| { | |||
| auto& lf = getLookAndFeel(); | |||
| @@ -193,7 +193,7 @@ public: | |||
| std::function<void(bool)> onPanelShowHide; | |||
| private: | |||
| //========================================================================== | |||
| //============================================================================== | |||
| Component* parent = nullptr; | |||
| OptionalScopedPointer<Component> contentComponent; | |||
| OptionalScopedPointer<Component> titleBarComponent; | |||
| @@ -216,7 +216,7 @@ private: | |||
| bool shouldShowDismissButton = true; | |||
| //========================================================================== | |||
| //============================================================================== | |||
| void lookAndFeelChanged() override; | |||
| void componentMovedOrResized (Component&, bool wasMoved, bool wasResized) override; | |||
| @@ -50,7 +50,7 @@ public: | |||
| JUCE_DECLARE_SINGLETON (PushNotifications, false) | |||
| #endif | |||
| //========================================================================== | |||
| //============================================================================== | |||
| /** Represents a notification that can be sent or received. */ | |||
| struct Notification | |||
| { | |||
| @@ -107,7 +107,7 @@ public: | |||
| /**@}*/ | |||
| }; | |||
| //========================================================================== | |||
| //============================================================================== | |||
| /** @name Common fields */ | |||
| /**@{*/ | |||
| @@ -149,7 +149,7 @@ public: | |||
| /**@}*/ | |||
| //========================================================================== | |||
| //============================================================================== | |||
| /** @name iOS only fields */ | |||
| /**@{*/ | |||
| @@ -161,7 +161,7 @@ public: | |||
| /**@}*/ | |||
| //========================================================================== | |||
| //============================================================================== | |||
| /** @name Android only fields */ | |||
| /**@{*/ | |||
| @@ -323,7 +323,7 @@ public: | |||
| }; | |||
| //========================================================================== | |||
| //============================================================================== | |||
| /** Describes settings we want to use for current device. Note that at the | |||
| moment this is only used on iOS and partially on OSX. | |||
| @@ -438,7 +438,7 @@ public: | |||
| */ | |||
| void requestSettingsUsed(); | |||
| //========================================================================== | |||
| //============================================================================== | |||
| /** Android API level 26 or higher only: Represents notification channel through which | |||
| notifications will be sent. Starting from Android API level 26, you should call setupChannels() | |||
| at the start of your application, before posting any notifications. Then, when sending notifications, | |||
| @@ -491,7 +491,7 @@ public: | |||
| */ | |||
| void setupChannels (const Array<ChannelGroup>& groups, const Array<Channel>& channels); | |||
| //========================================================================== | |||
| //============================================================================== | |||
| /** iOS only: sends an asynchronous request to retrieve a list of notifications that were | |||
| scheduled and not yet delivered. | |||
| @@ -505,7 +505,7 @@ public: | |||
| /** Unschedules all pending local notifications. iOS only. */ | |||
| void removeAllPendingLocalNotifications(); | |||
| //========================================================================== | |||
| //============================================================================== | |||
| /** Checks whether notifications are enabled for given application. | |||
| On iOS and OSX this will always return true, use requestSettingsUsed() instead. | |||
| */ | |||
| @@ -535,7 +535,7 @@ public: | |||
| /** Removes all notifications that were delivered. */ | |||
| void removeAllDeliveredNotifications(); | |||
| //========================================================================== | |||
| //============================================================================== | |||
| /** Retrieves current device token. Note, it is not a good idea to cache this token | |||
| because it may change in the meantime. Always call this method to get the current | |||
| token value. | |||
| @@ -587,7 +587,7 @@ public: | |||
| int timeToLive, | |||
| const StringPairArray& additionalData); | |||
| //========================================================================== | |||
| //============================================================================== | |||
| /** Register a listener (ideally on application startup) to receive information about | |||
| notifications received and any callbacks to async functions called. | |||
| */ | |||
| @@ -189,7 +189,7 @@ DECLARE_JNI_CLASS_WITH_MIN_SDK (RemoteInputBuilder, "android/app/RemoteInput$Bui | |||
| DECLARE_JNI_CLASS_WITH_MIN_SDK (StatusBarNotification, "android/service/notification/StatusBarNotification", 23) | |||
| #undef JNI_CLASS_MEMBERS | |||
| //========================================================================== | |||
| //============================================================================== | |||
| #if defined(JUCE_FIREBASE_INSTANCE_ID_SERVICE_CLASSNAME) | |||
| #define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD, CALLBACK) \ | |||
| STATICMETHOD (getInstance, "getInstance", "()Lcom/google/firebase/iid/FirebaseInstanceId;") \ | |||
| @@ -265,7 +265,7 @@ bool PushNotifications::Notification::isValid() const noexcept | |||
| return isValidForPreApi26; | |||
| } | |||
| //========================================================================== | |||
| //============================================================================== | |||
| struct PushNotifications::Pimpl | |||
| { | |||
| Pimpl (PushNotifications& p) | |||
| @@ -287,7 +287,7 @@ struct PushNotifications::Pimpl | |||
| return true; | |||
| } | |||
| //========================================================================== | |||
| //============================================================================== | |||
| void sendLocalNotification (const PushNotifications::Notification& n) | |||
| { | |||
| // All required fields have to be setup! | |||
| @@ -434,7 +434,7 @@ struct PushNotifications::Pimpl | |||
| } | |||
| } | |||
| //========================================================================== | |||
| //============================================================================== | |||
| String getDeviceToken() const | |||
| { | |||
| #if defined(JUCE_FIREBASE_INSTANCE_ID_SERVICE_CLASSNAME) | |||
| @@ -460,7 +460,7 @@ struct PushNotifications::Pimpl | |||
| #endif | |||
| } | |||
| //========================================================================== | |||
| //============================================================================== | |||
| void subscribeToTopic (const String& topic) | |||
| { | |||
| #if defined(JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) | |||
| @@ -57,7 +57,7 @@ | |||
| //============================================================================== | |||
| #include <juce_gui_extra/juce_gui_extra.h> | |||
| //============================================================================= | |||
| //============================================================================== | |||
| /** Config: JUCE_USE_CAMERA | |||
| Enables camera support using the CameraDevice class (Mac, Windows, iOS, Android). | |||
| */ | |||
| @@ -79,7 +79,7 @@ | |||
| #undef JUCE_USE_CAMERA | |||
| #endif | |||
| //============================================================================= | |||
| //============================================================================== | |||
| /** Config: JUCE_SYNC_VIDEO_VOLUME_WITH_OS_MEDIA_VOLUME | |||
| Enables synchronisation between video playback volume and OS media volume. | |||
| Currently supported on Android only. | |||
| @@ -98,6 +98,6 @@ | |||
| #define JUCE_VIDEO_LOG(x) {} | |||
| #endif | |||
| //============================================================================= | |||
| //============================================================================== | |||
| #include "playback/juce_VideoComponent.h" | |||
| #include "capture/juce_CameraDevice.h" | |||
| @@ -1032,7 +1032,7 @@ private: | |||
| } | |||
| private: | |||
| //============================================================================= | |||
| //============================================================================== | |||
| struct StateInfo | |||
| { | |||
| int playbackStateFlag = 0, allowedActions = 0; | |||
| @@ -26,7 +26,7 @@ | |||
| namespace VideoRenderers | |||
| { | |||
| //====================================================================== | |||
| //============================================================================== | |||
| struct Base | |||
| { | |||
| virtual ~Base() {} | |||
| @@ -39,7 +39,7 @@ namespace VideoRenderers | |||
| virtual HRESULT getVideoSize (long& videoWidth, long& videoHeight) = 0; | |||
| }; | |||
| //====================================================================== | |||
| //============================================================================== | |||
| struct VMR7 : public Base | |||
| { | |||
| VMR7() {} | |||
| @@ -99,7 +99,7 @@ namespace VideoRenderers | |||
| }; | |||
| //====================================================================== | |||
| //============================================================================== | |||
| struct EVR : public Base | |||
| { | |||
| EVR() {} | |||
| @@ -390,7 +390,7 @@ private: | |||
| std::unique_ptr<ComponentWatcher> componentWatcher; | |||
| //====================================================================== | |||
| //============================================================================== | |||
| struct DirectShowContext : public AsyncUpdater | |||
| { | |||
| DirectShowContext (Pimpl& c) : component (c) | |||
| @@ -404,7 +404,7 @@ private: | |||
| CoUninitialize(); | |||
| } | |||
| //====================================================================== | |||
| //============================================================================== | |||
| void updateWindowPosition (const Rectangle<int>& newBounds) | |||
| { | |||
| nativeWindow->setWindowPosition (newBounds); | |||
| @@ -415,7 +415,7 @@ private: | |||
| nativeWindow->showWindow (shouldBeVisible); | |||
| } | |||
| //====================================================================== | |||
| //============================================================================== | |||
| void repaint() | |||
| { | |||
| if (hasVideo) | |||
| @@ -434,7 +434,7 @@ private: | |||
| videoRenderer->displayModeChanged(); | |||
| } | |||
| //====================================================================== | |||
| //============================================================================== | |||
| void peerChanged() | |||
| { | |||
| deleteNativeWindow(); | |||
| @@ -489,7 +489,7 @@ private: | |||
| triggerAsyncUpdate(); | |||
| } | |||
| //====================================================================== | |||
| //============================================================================== | |||
| Result loadFile (const String& fileOrURLPath) | |||
| { | |||
| jassert (state == uninitializedState); | |||
| @@ -668,7 +668,7 @@ private: | |||
| } | |||
| } | |||
| //====================================================================== | |||
| //============================================================================== | |||
| void play() | |||
| { | |||
| mediaControl->Run(); | |||
| @@ -687,7 +687,7 @@ private: | |||
| state = pausedState; | |||
| } | |||
| //====================================================================== | |||
| //============================================================================== | |||
| Rectangle<int> getVideoSize() const noexcept | |||
| { | |||
| long width = 0, height = 0; | |||
| @@ -698,7 +698,7 @@ private: | |||
| return { (int) width, (int) height }; | |||
| } | |||
| //====================================================================== | |||
| //============================================================================== | |||
| double getDuration() const | |||
| { | |||
| REFTIME duration; | |||
| @@ -744,7 +744,7 @@ private: | |||
| State state = uninitializedState; | |||
| private: | |||
| //====================================================================== | |||
| //============================================================================== | |||
| enum { graphEventID = WM_APP + 0x43f0 }; | |||
| Pimpl& component; | |||
| @@ -762,7 +762,7 @@ private: | |||
| bool hasVideo = false, needToUpdateViewport = true, needToRecreateNativeWindow = false; | |||
| //====================================================================== | |||
| //============================================================================== | |||
| bool createNativeWindow() | |||
| { | |||
| jassert (nativeWindow == nullptr); | |||
| @@ -839,7 +839,7 @@ private: | |||
| return false; | |||
| } | |||
| //====================================================================== | |||
| //============================================================================== | |||
| struct NativeWindowClass : private DeletedAtShutdown | |||
| { | |||
| bool isRegistered() const noexcept { return atom != 0; } | |||
| @@ -899,7 +899,7 @@ private: | |||
| JUCE_DECLARE_NON_COPYABLE (NativeWindowClass) | |||
| }; | |||
| //====================================================================== | |||
| //============================================================================== | |||
| struct NativeWindow | |||
| { | |||
| NativeWindow (HWND parentToAddTo, void* userData) | |||