1.0.16
Add authbind dependency. Fix crash when number of input channels < number of output channels. Add onboarding dialog for initial configuration.
This commit is contained in:
+12
-9
@@ -37,6 +37,7 @@
|
||||
|
||||
#include "Lv2Log.hpp"
|
||||
#include <limits>
|
||||
#include "ss.hpp"
|
||||
|
||||
#undef ALSADRIVER_CONFIG_DBG
|
||||
|
||||
@@ -184,7 +185,7 @@ namespace pipedal
|
||||
private:
|
||||
void OnShutdown()
|
||||
{
|
||||
Lv2Log::info("Jack Audio Server has shut down.");
|
||||
Lv2Log::info("ALSA Audio Server has shut down.");
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1091,9 +1092,10 @@ namespace pipedal
|
||||
int sourceIndex = IndexFromPortName(x);
|
||||
if (sourceIndex >= captureBuffers.size())
|
||||
{
|
||||
throw PiPedalArgumentException("Invalid input port.");
|
||||
Lv2Log::error(SS("Invalid audio input port: " << x));
|
||||
} else {
|
||||
this->activeCaptureBuffers[ix++] = this->captureBuffers[sourceIndex];
|
||||
}
|
||||
this->activeCaptureBuffers[ix++] = this->captureBuffers[sourceIndex];
|
||||
}
|
||||
|
||||
this->activePlaybackBuffers.resize(channelSelection.GetOutputAudioPorts().size());
|
||||
@@ -1104,9 +1106,10 @@ namespace pipedal
|
||||
int sourceIndex = IndexFromPortName(x);
|
||||
if (sourceIndex >= playbackBuffers.size())
|
||||
{
|
||||
throw PiPedalArgumentException("Invalid output port.");
|
||||
Lv2Log::error(SS("Invalid audio output port: " << x));
|
||||
} else {
|
||||
this->activePlaybackBuffers[ix++] = this->playbackBuffers[sourceIndex];
|
||||
}
|
||||
this->activePlaybackBuffers[ix++] = this->playbackBuffers[sourceIndex];
|
||||
}
|
||||
|
||||
audioThread = new std::jthread([this]()
|
||||
@@ -1598,15 +1601,15 @@ namespace pipedal
|
||||
}
|
||||
|
||||
inputAudioPorts.clear();
|
||||
for (unsigned int i = 0; i < playbackChannels; ++i)
|
||||
for (unsigned int i = 0; i < captureChannels; ++i)
|
||||
{
|
||||
inputAudioPorts.push_back(SS("system::playback_" << i));
|
||||
inputAudioPorts.push_back(SS("system::capture_" << i));
|
||||
}
|
||||
|
||||
outputAudioPorts.clear();
|
||||
for (unsigned int i = 0; i < captureChannels; ++i)
|
||||
for (unsigned int i = 0; i < playbackChannels; ++i)
|
||||
{
|
||||
outputAudioPorts.push_back(SS("system::capture_" << i));
|
||||
outputAudioPorts.push_back(SS("system::playback_" << i));
|
||||
}
|
||||
|
||||
result = true;
|
||||
|
||||
+4
-4
@@ -122,10 +122,10 @@ void EnableService()
|
||||
void DisableService()
|
||||
{
|
||||
#if INSTALL_JACK_SERVICE || UNINSTALL_JACK_SERVICE
|
||||
if (sysExec(SYSTEMCTL_BIN " disable " JACK_SERVICE ".service") != EXIT_SUCCESS)
|
||||
if (silentSysExec(SYSTEMCTL_BIN " disable " JACK_SERVICE ".service") != EXIT_SUCCESS)
|
||||
{
|
||||
#if INSTALL_JACK_SERVICE
|
||||
cout << "Error: Failed to disable the " JACK_SERVICE " service.";
|
||||
// cout << "Error: Failed to disable the " JACK_SERVICE " service.";
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
@@ -165,10 +165,10 @@ void StopService(bool excludeShutdownService = false)
|
||||
#endif
|
||||
}
|
||||
#if INSTALL_JACK_SERVICE || UNINSTALL_JACK_SERVICE
|
||||
if (sysExec(SYSTEMCTL_BIN " stop " JACK_SERVICE ".service") != EXIT_SUCCESS)
|
||||
if (silentSysExec(SYSTEMCTL_BIN " stop " JACK_SERVICE ".service") != EXIT_SUCCESS)
|
||||
{
|
||||
#if INSTALL_JACK_SERVICE
|
||||
cout << PiPedalException("Failed to stop the " JACK_SERVICE " service.");
|
||||
// cout << PiPedalException("Failed to stop the " JACK_SERVICE " service.");
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
+11
-7
@@ -227,14 +227,18 @@ void PiPedalModel::Load()
|
||||
try
|
||||
{
|
||||
jackHost->Open(this->jackServerSettings, selection);
|
||||
|
||||
std::shared_ptr<Lv2PedalBoard> lv2PedalBoard{this->lv2Host.CreateLv2PedalBoard(this->pedalBoard)};
|
||||
this->lv2PedalBoard = lv2PedalBoard;
|
||||
jackHost->SetPedalBoard(lv2PedalBoard);
|
||||
}
|
||||
catch (PiPedalException &e)
|
||||
try {
|
||||
std::shared_ptr<Lv2PedalBoard> lv2PedalBoard{this->lv2Host.CreateLv2PedalBoard(this->pedalBoard)};
|
||||
this->lv2PedalBoard = lv2PedalBoard;
|
||||
jackHost->SetPedalBoard(lv2PedalBoard);
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
Lv2Log::error("Failed to load initial plugin. (%s)", e.what());
|
||||
}
|
||||
} catch (std::exception &e)
|
||||
{
|
||||
Lv2Log::error("Failed to load initial plugin. (%s)", e.what());
|
||||
Lv2Log::error("Failed to start audio device. %s", e.what());
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user