Browse Source

VS2013: Fixed a VS2013 compiler error in the AudioPluginHost

tags/2021-05-28
hogliux 7 years ago
parent
commit
f574b9d962
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      extras/AudioPluginHost/Source/UI/MainHostWindow.cpp

+ 5
- 2
extras/AudioPluginHost/Source/UI/MainHostWindow.cpp View File

@@ -81,8 +81,9 @@ MainHostWindow::MainHostWindow()
formatManager.addDefaultFormats(); formatManager.addDefaultFormats();
formatManager.addFormat (new InternalPluginFormat()); formatManager.addFormat (new InternalPluginFormat());
auto safeThis = SafePointer<MainHostWindow> (this);
RuntimePermissions::request (RuntimePermissions::recordAudio, RuntimePermissions::request (RuntimePermissions::recordAudio,
[safeThis = SafePointer<MainHostWindow> (this)] (bool granted) mutable
[safeThis] (bool granted) mutable
{ {
std::unique_ptr<XmlElement> savedAudioState (getAppProperties().getUserSettings() std::unique_ptr<XmlElement> savedAudioState (getAppProperties().getUserSettings()
->getXmlValue ("audioDeviceState")); ->getXmlValue ("audioDeviceState"));
@@ -573,9 +574,11 @@ void MainHostWindow::showAudioSettings()
o.resizable = false; o.resizable = false;
auto* w = o.create(); auto* w = o.create();
auto safeThis = SafePointer<MainHostWindow> (this);
w->enterModalState (true, w->enterModalState (true,
ModalCallbackFunction::create ModalCallbackFunction::create
([safeThis = SafePointer<MainHostWindow> (this)] (int)
([safeThis] (int)
{ {
std::unique_ptr<XmlElement> audioState (safeThis->deviceManager.createStateXml()); std::unique_ptr<XmlElement> audioState (safeThis->deviceManager.createStateXml());


Loading…
Cancel
Save