Move all liblo stuff to the same file, add crude auto-deploy mode
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
31c108c9ae
commit
e29243af60
7 changed files with 347 additions and 175 deletions
|
@ -37,17 +37,12 @@
|
|||
#include <string.hpp>
|
||||
#include <system.hpp>
|
||||
#include <app/Scene.hpp>
|
||||
#include <engine/Engine.hpp>
|
||||
#include <window/Window.hpp>
|
||||
|
||||
#ifdef NDEBUG
|
||||
# undef DEBUG
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBLO
|
||||
# include <lo/lo.h>
|
||||
#endif
|
||||
|
||||
// for finding home dir
|
||||
#ifndef ARCH_WIN
|
||||
# include <pwd.h>
|
||||
|
@ -215,27 +210,6 @@ void saveAsDialog()
|
|||
#endif
|
||||
}
|
||||
|
||||
void deployToMOD()
|
||||
{
|
||||
#ifdef HAVE_LIBLO
|
||||
const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, REMOTE_HOST_PORT);
|
||||
DISTRHO_SAFE_ASSERT_RETURN(addr != nullptr,);
|
||||
|
||||
APP->engine->prepareSave();
|
||||
APP->patch->saveAutosave();
|
||||
APP->patch->cleanAutosave();
|
||||
std::vector<uint8_t> data(rack::system::archiveDirectory(APP->patch->autosavePath, 1));
|
||||
|
||||
if (const lo_blob blob = lo_blob_new(data.size(), data.data()))
|
||||
{
|
||||
lo_send(addr, "/load", "b", blob);
|
||||
lo_blob_free(blob);
|
||||
}
|
||||
|
||||
lo_address_free(addr);
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void async_dialog_filebrowser(const bool saving,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue