pulseeffects-legacy: update to 4.8.7+4c51781.

This commit is contained in:
Đoàn Trần Công Danh 2025-08-08 22:01:17 +07:00
parent 222d1c78ae
commit a659bd4d0b
3 changed files with 474 additions and 24 deletions

View file

@ -1,19 +0,0 @@
--- a/src/general_settings_ui.cpp
+++ b/src/general_settings_ui.cpp
@@ -20,6 +20,7 @@
#include "general_settings_ui.hpp"
#include <giomm/file.h>
#include <glibmm.h>
+#include <fstream>
#include <boost/filesystem.hpp>
#include "util.hpp"
@@ -176,7 +177,7 @@ auto GeneralSettingsUi::on_enable_autost
if (state) {
if (!boost::filesystem::exists(autostart_file)) {
- boost::filesystem::ofstream ofs{autostart_file};
+ std::ofstream ofs{autostart_file.native()};
ofs << "[Desktop Entry]\n";
ofs << "Name=PulseEffects\n";

View file

@ -0,0 +1,468 @@
--- a/include/convolver_ui.hpp
+++ b/include/convolver_ui.hpp
@@ -22,7 +22,7 @@
#include <glibmm/i18n.h>
#include <gst/fft/gstfftf32.h>
-#include <boost/filesystem.hpp>
+#include <filesystem>
#include <boost/math/interpolators/cardinal_cubic_b_spline.hpp>
#include <future>
#include <mutex>
@@ -68,7 +68,7 @@ class ConvolverUi : public Gtk::Grid, pu
Pango::FontDescription font;
- boost::filesystem::path irs_dir;
+ std::filesystem::path irs_dir;
bool mouse_inside = false, show_fft_spectrum = false;
unsigned int max_plot_points = 1000U;
--- a/include/presets_manager.hpp
+++ b/include/presets_manager.hpp
@@ -21,7 +21,7 @@
#define PRESETS_MANAGER_HPP
#include <giomm/settings.h>
-#include <boost/filesystem.hpp>
+#include <filesystem>
#include <memory>
#include <vector>
#include "autogain_preset.hpp"
@@ -59,7 +59,7 @@ class PresetsManager {
~PresetsManager();
auto get_names(PresetType preset_type) -> std::vector<std::string>;
- static auto search_names(boost::filesystem::directory_iterator& it) -> std::vector<std::string>;
+ static auto search_names(std::filesystem::directory_iterator& it) -> std::vector<std::string>;
void add(PresetType preset_type, const std::string& name);
void save(PresetType preset_type, const std::string& name);
void remove(PresetType preset_type, const std::string& name);
@@ -74,9 +74,9 @@ class PresetsManager {
private:
std::string log_tag = "presets_manager: ";
- boost::filesystem::path user_presets_dir, user_input_dir, user_output_dir, autoload_dir;
+ std::filesystem::path user_presets_dir, user_input_dir, user_output_dir, autoload_dir;
- std::vector<boost::filesystem::path> system_input_dir, system_output_dir;
+ std::vector<std::filesystem::path> system_input_dir, system_output_dir;
Glib::RefPtr<Gio::Settings> settings, sie_settings, soe_settings;
@@ -151,7 +151,7 @@ class PresetsManager {
return a != b;
}
- void create_user_directory(const boost::filesystem::path& path);
+ void create_user_directory(const std::filesystem::path& path);
void save_blocklist(PresetType preset_type, boost::property_tree::ptree& root);
--- a/src/convolver_ui.cpp
+++ b/src/convolver_ui.cpp
@@ -95,10 +95,10 @@ ConvolverUi::ConvolverUi(BaseObjectType*
// irs dir
- auto dir_exists = boost::filesystem::is_directory(irs_dir);
+ auto dir_exists = std::filesystem::is_directory(irs_dir);
if (!dir_exists) {
- if (boost::filesystem::create_directories(irs_dir)) {
+ if (std::filesystem::create_directories(irs_dir)) {
util::debug(log_tag + "irs directory created: " + irs_dir.string());
} else {
util::warning(log_tag + "failed to create irs directory: " + irs_dir.string());
@@ -153,11 +153,11 @@ void ConvolverUi::reset() {
}
auto ConvolverUi::get_irs_names() -> std::vector<std::string> {
- boost::filesystem::directory_iterator it{irs_dir};
+ std::filesystem::directory_iterator it{irs_dir};
std::vector<std::string> names;
- while (it != boost::filesystem::directory_iterator{}) {
- if (boost::filesystem::is_regular_file(it->status())) {
+ while (it != std::filesystem::directory_iterator{}) {
+ if (std::filesystem::is_regular_file(it->status())) {
if (it->path().extension().string() == ".irs") {
names.emplace_back(it->path().stem().string());
}
@@ -170,9 +170,9 @@ auto ConvolverUi::get_irs_names() -> std
}
void ConvolverUi::import_irs_file(const std::string& file_path) {
- boost::filesystem::path p{file_path};
+ std::filesystem::path p{file_path};
- if (boost::filesystem::is_regular_file(p)) {
+ if (std::filesystem::is_regular_file(p)) {
SndfileHandle file = SndfileHandle(file_path);
if (file.channels() != 2 || file.frames() == 0) {
@@ -186,7 +186,7 @@ void ConvolverUi::import_irs_file(const
out_path.replace_extension(".irs");
- boost::filesystem::copy_file(p, out_path, boost::filesystem::copy_options::overwrite_existing);
+ std::filesystem::copy_file(p, out_path, std::filesystem::copy_options::overwrite_existing);
util::debug(log_tag + "imported irs file to: " + out_path.string());
} else {
@@ -195,10 +195,10 @@ void ConvolverUi::import_irs_file(const
}
void ConvolverUi::remove_irs_file(const std::string& name) {
- auto irs_file = irs_dir / boost::filesystem::path{name + ".irs"};
+ auto irs_file = irs_dir / std::filesystem::path{name + ".irs"};
- if (boost::filesystem::exists(irs_file)) {
- boost::filesystem::remove(irs_file);
+ if (std::filesystem::exists(irs_file)) {
+ std::filesystem::remove(irs_file);
util::debug(log_tag + "removed irs file: " + irs_file.string());
}
@@ -254,7 +254,7 @@ void ConvolverUi::populate_irs_listbox()
}));
connections.emplace_back(apply_btn->signal_clicked().connect([=]() {
- auto irs_file = irs_dir / boost::filesystem::path{row->get_name() + ".irs"};
+ auto irs_file = irs_dir / std::filesystem::path{row->get_name() + ".irs"};
settings->set_string("kernel-path", irs_file.string());
}));
@@ -420,7 +420,7 @@ void ConvolverUi::get_irs_info() {
label_duration->set_text(level_to_localized_string(duration, 3) + " s");
- auto fpath = boost::filesystem::path{path};
+ auto fpath = std::filesystem::path{path};
label_file_name->set_text(fpath.stem().string());
--- a/src/equalizer_ui.cpp
+++ b/src/equalizer_ui.cpp
@@ -19,7 +19,7 @@
#include "equalizer_ui.hpp"
#include <glibmm/i18n.h>
-#include <boost/filesystem.hpp>
+#include <filesystem>
#include <boost/property_tree/json_parser.hpp>
#include <boost/property_tree/ptree.hpp>
#include <regex>
@@ -845,9 +845,9 @@ auto EqualizerUi::parse_apo_filter(const
}
void EqualizerUi::import_apo_preset(const std::string& file_path) {
- boost::filesystem::path p{file_path};
+ std::filesystem::path p{file_path};
- if (boost::filesystem::is_regular_file(p)) {
+ if (std::filesystem::is_regular_file(p)) {
std::ifstream eq_file;
std::vector<struct ImportedBand> bands;
--- a/src/general_settings_ui.cpp
+++ b/src/general_settings_ui.cpp
@@ -20,8 +20,8 @@
#include "general_settings_ui.hpp"
#include <giomm/file.h>
#include <glibmm.h>
-#include <boost/filesystem.hpp>
-#include <boost/filesystem/fstream.hpp>
+#include <filesystem>
+#include <fstream>
#include "util.hpp"
namespace {
@@ -167,17 +167,17 @@ void GeneralSettingsUi::init_autostart_s
}
auto GeneralSettingsUi::on_enable_autostart(bool state) -> bool {
- boost::filesystem::path autostart_dir{Glib::get_user_config_dir() + "/autostart"};
+ std::filesystem::path autostart_dir{Glib::get_user_config_dir() + "/autostart"};
- if (!boost::filesystem::is_directory(autostart_dir)) {
- boost::filesystem::create_directories(autostart_dir);
+ if (!std::filesystem::is_directory(autostart_dir)) {
+ std::filesystem::create_directories(autostart_dir);
}
- boost::filesystem::path autostart_file{Glib::get_user_config_dir() + "/autostart/pulseeffects-service.desktop"};
+ std::filesystem::path autostart_file{Glib::get_user_config_dir() + "/autostart/pulseeffects-service.desktop"};
if (state) {
- if (!boost::filesystem::exists(autostart_file)) {
- boost::filesystem::ofstream ofs{autostart_file};
+ if (!std::filesystem::exists(autostart_file)) {
+ std::ofstream ofs{autostart_file};
ofs << "[Desktop Entry]\n";
ofs << "Name=PulseEffects\n";
@@ -193,8 +193,8 @@ auto GeneralSettingsUi::on_enable_autost
util::debug(log_tag + "autostart file created");
}
} else {
- if (boost::filesystem::exists(autostart_file)) {
- boost::filesystem::remove(autostart_file);
+ if (std::filesystem::exists(autostart_file)) {
+ std::filesystem::remove(autostart_file);
util::debug(log_tag + "autostart file removed");
}
--- a/src/presets_manager.cpp
+++ b/src/presets_manager.cpp
@@ -89,11 +89,11 @@ PresetsManager::~PresetsManager() {
util::debug(log_tag + "destroyed");
}
-void PresetsManager::create_user_directory(const boost::filesystem::path& path) {
- auto dir_exists = boost::filesystem::is_directory(path);
+void PresetsManager::create_user_directory(const std::filesystem::path& path) {
+ auto dir_exists = std::filesystem::is_directory(path);
if (!dir_exists) {
- if (boost::filesystem::create_directories(path)) {
+ if (std::filesystem::create_directories(path)) {
util::debug(log_tag + "user presets directory created: " + path.string());
} else {
util::warning(log_tag + "failed to create user presets directory: " + path.string());
@@ -105,9 +105,9 @@ void PresetsManager::create_user_directo
}
auto PresetsManager::get_names(PresetType preset_type) -> std::vector<std::string> {
- boost::filesystem::directory_iterator it;
+ std::filesystem::directory_iterator it;
std::vector<std::string> names;
- std::vector<boost::filesystem::path> sys_dirs;
+ std::vector<std::filesystem::path> sys_dirs;
// system directories search
switch (preset_type) {
@@ -120,8 +120,8 @@ auto PresetsManager::get_names(PresetTyp
}
for (const auto& dir : sys_dirs) {
- if (boost::filesystem::exists(dir)) {
- it = boost::filesystem::directory_iterator{dir};
+ if (std::filesystem::exists(dir)) {
+ it = std::filesystem::directory_iterator{dir};
auto vn = search_names(it);
names.insert(names.end(), vn.begin(), vn.end());
}
@@ -129,7 +129,7 @@ auto PresetsManager::get_names(PresetTyp
// user directory search
auto& user_dir = (preset_type == PresetType::output) ? user_output_dir : user_input_dir;
- it = boost::filesystem::directory_iterator{user_dir};
+ it = std::filesystem::directory_iterator{user_dir};
auto vn = search_names(it);
names.insert(names.end(), vn.begin(), vn.end());
@@ -141,12 +141,12 @@ auto PresetsManager::get_names(PresetTyp
return names;
}
-auto PresetsManager::search_names(boost::filesystem::directory_iterator& it) -> std::vector<std::string> {
+auto PresetsManager::search_names(std::filesystem::directory_iterator& it) -> std::vector<std::string> {
std::vector<std::string> names;
try {
- while (it != boost::filesystem::directory_iterator{}) {
- if (boost::filesystem::is_regular_file(it->status())) {
+ while (it != std::filesystem::directory_iterator{}) {
+ if (std::filesystem::is_regular_file(it->status())) {
if (it->path().extension().string() == ".json") {
names.emplace_back(it->path().stem().string());
}
@@ -245,7 +245,7 @@ void PresetsManager::save(PresetType pre
boost::property_tree::ptree root;
boost::property_tree::ptree node_in;
boost::property_tree::ptree node_out;
- boost::filesystem::path output_file;
+ std::filesystem::path output_file;
spectrum->write(preset_type, root);
save_blocklist(preset_type, root);
@@ -262,7 +262,7 @@ void PresetsManager::save(PresetType pre
root.add_child("output.plugins_order", node_out);
- output_file = user_output_dir / boost::filesystem::path{name + ".json"};
+ output_file = user_output_dir / std::filesystem::path{name + ".json"};
break;
}
@@ -277,7 +277,7 @@ void PresetsManager::save(PresetType pre
root.add_child("input.plugins_order", node_in);
- output_file = user_input_dir / boost::filesystem::path{name + ".json"};
+ output_file = user_input_dir / std::filesystem::path{name + ".json"};
break;
}
@@ -312,13 +312,13 @@ void PresetsManager::save(PresetType pre
}
void PresetsManager::remove(PresetType preset_type, const std::string& name) {
- boost::filesystem::path preset_file;
+ std::filesystem::path preset_file;
auto& user_dir = (preset_type == PresetType::output) ? user_output_dir : user_input_dir;
- preset_file = user_dir / boost::filesystem::path{name + ".json"};
+ preset_file = user_dir / std::filesystem::path{name + ".json"};
- if (boost::filesystem::exists(preset_file)) {
- boost::filesystem::remove(preset_file);
+ if (std::filesystem::exists(preset_file)) {
+ std::filesystem::remove(preset_file);
util::debug(log_tag + "removed preset: " + preset_file.string());
}
@@ -328,8 +328,8 @@ void PresetsManager::load(PresetType pre
boost::property_tree::ptree root;
std::vector<std::string> input_plugins;
std::vector<std::string> output_plugins;
- std::vector<boost::filesystem::path> conf_dirs;
- boost::filesystem::path input_file;
+ std::vector<std::filesystem::path> conf_dirs;
+ std::filesystem::path input_file;
bool preset_found = false;
switch (preset_type) {
@@ -338,8 +338,8 @@ void PresetsManager::load(PresetType pre
conf_dirs.insert(conf_dirs.end(), system_output_dir.begin(), system_output_dir.end());
for (const auto& dir : conf_dirs) {
- input_file = dir / boost::filesystem::path{name + ".json"};
- if (boost::filesystem::exists(input_file)) {
+ input_file = dir / std::filesystem::path{name + ".json"};
+ if (std::filesystem::exists(input_file)) {
preset_found = true;
break;
}
@@ -387,8 +387,8 @@ void PresetsManager::load(PresetType pre
conf_dirs.insert(conf_dirs.end(), system_input_dir.begin(), system_input_dir.end());
for (const auto& dir : conf_dirs) {
- input_file = dir / boost::filesystem::path{name + ".json"};
- if (boost::filesystem::exists(input_file)) {
+ input_file = dir / std::filesystem::path{name + ".json"};
+ if (std::filesystem::exists(input_file)) {
preset_found = true;
break;
}
@@ -463,16 +463,16 @@ void PresetsManager::load(PresetType pre
}
void PresetsManager::import(PresetType preset_type, const std::string& file_path) {
- boost::filesystem::path p{file_path};
+ std::filesystem::path p{file_path};
- if (boost::filesystem::is_regular_file(p)) {
+ if (std::filesystem::is_regular_file(p)) {
if (p.extension().string() == ".json") {
- boost::filesystem::path out_path;
+ std::filesystem::path out_path;
auto& user_dir = (preset_type == PresetType::output) ? user_output_dir : user_input_dir;
out_path = user_dir / p.filename();
- boost::filesystem::copy_file(p, out_path, boost::filesystem::copy_options::overwrite_existing);
+ std::filesystem::copy_file(p, out_path, std::filesystem::copy_options::overwrite_existing);
util::debug(log_tag + "imported preset to: " + out_path.string());
}
@@ -483,9 +483,9 @@ void PresetsManager::import(PresetType p
void PresetsManager::add_autoload(const std::string& device, const std::string& name) {
boost::property_tree::ptree root;
- boost::filesystem::path output_file;
+ std::filesystem::path output_file;
- output_file = autoload_dir / boost::filesystem::path{device + ".json"};
+ output_file = autoload_dir / std::filesystem::path{device + ".json"};
root.put("name", name);
@@ -495,9 +495,9 @@ void PresetsManager::add_autoload(const
}
void PresetsManager::remove_autoload(const std::string& device, const std::string& name) {
- auto input_file = autoload_dir / boost::filesystem::path{device + ".json"};
+ auto input_file = autoload_dir / std::filesystem::path{device + ".json"};
- if (boost::filesystem::is_regular_file(input_file)) {
+ if (std::filesystem::is_regular_file(input_file)) {
boost::property_tree::ptree root;
boost::property_tree::read_json(input_file.string(), root);
@@ -505,7 +505,7 @@ void PresetsManager::remove_autoload(con
auto current_autoload = root.get<std::string>("name", "");
if (current_autoload == name) {
- boost::filesystem::remove(input_file);
+ std::filesystem::remove(input_file);
util::debug(log_tag + "removed autoload: " + input_file.string());
}
@@ -513,9 +513,9 @@ void PresetsManager::remove_autoload(con
}
auto PresetsManager::find_autoload(const std::string& device) -> std::string {
- auto input_file = autoload_dir / boost::filesystem::path{device + ".json"};
+ auto input_file = autoload_dir / std::filesystem::path{device + ".json"};
- if (boost::filesystem::is_regular_file(input_file)) {
+ if (std::filesystem::is_regular_file(input_file)) {
boost::property_tree::ptree root;
boost::property_tree::read_json(input_file.string(), root);
@@ -546,8 +546,8 @@ void PresetsManager::autoload(PresetType
}
auto PresetsManager::preset_file_exists(PresetType preset_type, const std::string& name) -> bool {
- boost::filesystem::path input_file;
- std::vector<boost::filesystem::path> conf_dirs;
+ std::filesystem::path input_file;
+ std::vector<std::filesystem::path> conf_dirs;
switch (preset_type) {
case PresetType::output: {
@@ -555,8 +555,8 @@ auto PresetsManager::preset_file_exists(
conf_dirs.insert(conf_dirs.end(), system_output_dir.begin(), system_output_dir.end());
for (const auto& dir : conf_dirs) {
- input_file = dir / boost::filesystem::path{name + ".json"};
- if (boost::filesystem::exists(input_file)) {
+ input_file = dir / std::filesystem::path{name + ".json"};
+ if (std::filesystem::exists(input_file)) {
return true;
}
}
@@ -568,8 +568,8 @@ auto PresetsManager::preset_file_exists(
conf_dirs.insert(conf_dirs.end(), system_input_dir.begin(), system_input_dir.end());
for (const auto& dir : conf_dirs) {
- input_file = dir / boost::filesystem::path{name + ".json"};
- if (boost::filesystem::exists(input_file)) {
+ input_file = dir / std::filesystem::path{name + ".json"};
+ if (std::filesystem::exists(input_file)) {
return true;
}
}
--- a/src/meson.build
+++ b/src/meson.build
@@ -109,7 +109,7 @@ pulseeffects_deps = [
dependency('gstreamer-fft-1.0'),
dependency('lilv-0', version: '>=0.22', required: false),
dependency('libbs2b', required: false),
- dependency('boost', version: '>=1.86', modules:['system','filesystem']),
+ dependency('boost', version: '>=1.86'),
dependency('sndfile'),
dependency('threads')
]

View file

@ -1,10 +1,11 @@
# Template file for 'pulseeffects-legacy'
pkgname=pulseeffects-legacy
version=4.8.5
revision=8
version=4.8.7
revision=1
_commit=4c517815a483e8bb88b8762a0f6017218be1cfde
build_style=meson
hostmakedepends="itstool pkg-config gettext glib-devel"
makedepends="boost-devel gsettings-desktop-schemas-devel
makedepends="boost-devel-minimal gsettings-desktop-schemas-devel
gst-plugins-bad1-devel gtkmm-devel libebur128-devel lilv-devel
pulseaudio-devel sratom-devel zita-convolver-devel libbs2b-devel
libsamplerate-devel libsndfile-devel rnnoise-devel"
@ -14,6 +15,6 @@ maintainer="Artur Sinila <freesoftware@logarithmus.dev>"
license="GPL-3.0-or-later"
homepage="https://github.com/wwmm/easyeffects"
changelog="https://raw.githubusercontent.com/wwmm/easyeffects/pulseaudio-legacy/CHANGELOG.md"
distfiles="https://github.com/wwmm/easyeffects/archive/v${version}.tar.gz"
checksum=ff04fc3c768c2da9c1a06546b42f6fa7da5b2501b356fd733895b9e12fda7557
distfiles="https://github.com/wwmm/easyeffects/archive/${_commit}.tar.gz"
checksum=a5228b69fbf047bb70072ad2aff53e73870f4fd6b75fd8e48bdc0070130d3964
conflicts="pulseeffects"