mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-08 04:20:13 +02:00
c1e7f53cd0
To account for the differences in VST2 plugins and VST3 modules we had to wrap most of our old functions from `src/plugin/utils.h` in a new `PluginInfo` struct that gathers all of this information while taking into account the differences between VST2 and VST3 plugins. With this change things are also a lot more organized. We can just query the plugin information we need rather than having to store things separately or having to recalculate things. This also moved the responsibility of all the weird `WINEPREFIX` behaviour to a single place instead of having it spread around `utils.pp`, the initialisation message, and `host-procoess.cpp`.
48 lines
1.6 KiB
C++
48 lines
1.6 KiB
C++
// yabridge: a Wine VST bridge
|
|
// Copyright (C) 2020 Robbert van der Helm
|
|
//
|
|
// This program is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
//
|
|
// This program is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
#pragma once
|
|
|
|
#ifdef __WINE__
|
|
#include "../wine-host/boost-fix.h"
|
|
#endif
|
|
#include <boost/filesystem.hpp>
|
|
|
|
// The cannonical overloading template for `std::visitor`, not sure why this
|
|
// isn't part of the standard library
|
|
template <class... Ts>
|
|
struct overload : Ts... {
|
|
using Ts::operator()...;
|
|
};
|
|
template <class... Ts>
|
|
overload(Ts...) -> overload<Ts...>;
|
|
|
|
/**
|
|
* Return the path to the directory for story temporary files. This will be
|
|
* `$XDG_RUNTIME_DIR` if set, and `/tmp` otherwise.
|
|
*/
|
|
boost::filesystem::path get_temporary_directory();
|
|
|
|
/**
|
|
* Set the scheduling policy to `SCHED_FIFO` with priority 10 for this process.
|
|
* We explicitly don't do this for wineserver itself since from my testing that
|
|
* can actually increase latencies.
|
|
*
|
|
* @return Whether the operation was successful or not. This will fail if the
|
|
* user does not have the privileges to set realtime priorities.
|
|
*/
|
|
bool set_realtime_priority();
|