Compare commits

...

17 commits

Author SHA1 Message Date
Robin Gareus
605de3eef4
VST3: fix bus configuration/connections
This handles the case where only part of a bus' ports are
connected. This can happen when a given speaker configuration
is not directly accepted, and the plugin provides more I/O than
requested.
2025-12-05 23:11:20 +01:00
Robin Gareus
8943e28931
VST3: add debug message and code cleanup 2025-12-05 23:06:02 +01:00
Robin Gareus
f8d4197ce7
Add some missing more tooltips 2025-12-05 17:33:13 +01:00
Robin Gareus
728558e51c
Use compiler provided PTW_VERSION define for compatibility 2025-12-05 16:00:09 +01:00
Robin Gareus
b938daca95
Yet another unistd.h special case for 2025-12-05 14:46:05 +01:00
Robin Gareus
0f3760a8d1
Amend be445a8079, add missing symbol 2025-12-05 00:09:28 +01:00
Robin Gareus
a04e56f3a8 Fix builds with clang
chan_count.h:216:29: note: 'operator<<' should be declared prior to the call site or in namespace 'ARDOUR'
2025-12-04 23:55:37 +01:00
Robin Gareus
31ac7db2ed
Allow to reconfigure VST3 I/O pins 2025-12-04 23:39:54 +01:00
Robin Gareus
be445a8079
VST3: set VSTSpeakerArrangements to match track
This fixes some plugins that require a valid Bus/SpeakerArrangement
setting to set the available per bus I/O channel-count.
(e.g. Altiverb). Most other VST3s initially announce all
available channels.

TODO: check that this does not break plugins with optional
busses (sidechain in, multi-out instruments)
2025-12-04 23:39:54 +01:00
Aleksandr Prokudin
1190dd3a3e Add Juan Vardy to the list of Spanish translators 2025-12-04 23:23:49 +01:00
Robin Gareus
f8212aec53
Fix pesky follow-playhead button tooltip
ArdourButton uses the tooltip from the related action (if any).
2025-12-04 01:26:31 +01:00
John Emmas
8ca808346a Partially revert commit #d0109bed16 (it shouldn't have been affecting MacOS builds???) 2025-12-03 10:24:59 +00:00
Paul Davis
dddaffe3ac plugin selector: if neither name nor tag buttons are enabled, include creator in search fields 2025-12-02 17:45:14 -07:00
Robin Gareus
c08531f96e
Fix macOS builds (missing header)
implicit instantiation of undefined template 'std::array<..>'
2025-12-02 16:54:05 +01:00
Robin Gareus
d0109bed16
Move unistd.h detection to the correct wscript
This fixes macOS builds (getpid())
2025-12-02 16:38:42 +01:00
Robin Gareus
6ce8358709
Remove yet another irrelevant unistd.h 2025-12-02 14:00:59 +01:00
Robin Gareus
39370aff7b
Fix crash when selecting multiple regions
see also 7a5591121b, action was renamed.
2025-12-02 13:58:15 +01:00
26 changed files with 309 additions and 70 deletions

View file

@ -258,7 +258,8 @@ static const char* translators[] = {
N_("Brazilian Portuguese:\n\tAlexander da Franca Fernandes <alexander@nautae.eti.br>\ N_("Brazilian Portuguese:\n\tAlexander da Franca Fernandes <alexander@nautae.eti.br>\
\n\tChris Ross <chris@tebibyte.org>\n"), \n\tChris Ross <chris@tebibyte.org>\n"),
N_("Spanish:\n\t Alex Krohn <alexkrohn@fastmail.fm>\ N_("Spanish:\n\t Alex Krohn <alexkrohn@fastmail.fm>\
\n\tPablo Fernández <pablo.fbus@gmail.com>\n"), \n\tPablo Fernández <pablo.fbus@gmail.com>\
\n\tJuan Cruz Vardy Sabaté <juanvardy@zohomail.com>\n"),
N_("Russian:\n\t Igor Blinov <pitstop@nm.ru>\ N_("Russian:\n\t Igor Blinov <pitstop@nm.ru>\
\n\tAleksandr Koltsov <ag1455@mail.ru>\ \n\tAleksandr Koltsov <ag1455@mail.ru>\
\n\tPetr Semiletov <tea@list.ru>\ \n\tPetr Semiletov <tea@list.ru>\

View file

@ -489,10 +489,15 @@ CueEditor::build_upper_toolbar ()
play_button.set_size_request (PX_SCALE(20), PX_SCALE(20)); play_button.set_size_request (PX_SCALE(20), PX_SCALE(20));
#undef PX_SCALE #undef PX_SCALE
set_tooltip (play_button, _("Play this clip from the top"));
set_tooltip (loop_button, _("Loop the range of this clip"));
set_tooltip (solo_button, _("Solo the track containing this clip"));
play_button.signal_button_release_event().connect (sigc::mem_fun (*this, &CueEditor::play_button_press), false); play_button.signal_button_release_event().connect (sigc::mem_fun (*this, &CueEditor::play_button_press), false);
solo_button.signal_button_release_event().connect (sigc::mem_fun (*this, &CueEditor::solo_button_press), false); solo_button.signal_button_release_event().connect (sigc::mem_fun (*this, &CueEditor::solo_button_press), false);
loop_button.signal_button_release_event().connect (sigc::mem_fun (*this, &CueEditor::loop_button_press), false); loop_button.signal_button_release_event().connect (sigc::mem_fun (*this, &CueEditor::loop_button_press), false);
} else { } else {
set_tooltip (play_button, _("Launch selected clip"));
rec_box.pack_start (play_button, false, false); rec_box.pack_start (play_button, false, false);
play_button.signal_button_release_event().connect (sigc::mem_fun (*this, &CueEditor::bang_button_press), false); play_button.signal_button_release_event().connect (sigc::mem_fun (*this, &CueEditor::bang_button_press), false);
} }
@ -502,6 +507,9 @@ CueEditor::build_upper_toolbar ()
rec_enable_button.signal_button_release_event().connect (sigc::mem_fun (*this, &CueEditor::rec_button_press), false); rec_enable_button.signal_button_release_event().connect (sigc::mem_fun (*this, &CueEditor::rec_button_press), false);
rec_enable_button.set_name ("record enable button"); rec_enable_button.set_name ("record enable button");
set_tooltip (rec_enable_button, _("Record clip"));
set_tooltip (length_selector, _("Record length"));
std::string label; std::string label;
std::string noun; std::string noun;

View file

@ -234,7 +234,6 @@ EditingContext::EditingContext (std::string const & name)
set_tooltip (play_note_selection_button, _("Play notes when selected")); set_tooltip (play_note_selection_button, _("Play notes when selected"));
set_tooltip (note_mode_button, _("Switch between sustained and percussive mode")); set_tooltip (note_mode_button, _("Switch between sustained and percussive mode"));
set_tooltip (follow_playhead_button, _("Scroll automatically to keep playhead visible"));
set_tooltip (follow_edits_button, _("Playhead follows Range tool clicks, and Range selections")); set_tooltip (follow_edits_button, _("Playhead follows Range tool clicks, and Range selections"));
/* Leave tip for full zoom button to derived class */ /* Leave tip for full zoom button to derived class */
set_tooltip (visible_channel_selector, _("Select visible MIDI channel")); set_tooltip (visible_channel_selector, _("Select visible MIDI channel"));
@ -455,6 +454,8 @@ EditingContext::register_common_actions (Bindings* common_bindings, std::string
follow_playhead_action = toggle_reg_sens (_common_actions, "toggle-follow-playhead", _("Follow Playhead"), sigc::mem_fun (*this, &EditingContext::follow_playhead_chosen)); follow_playhead_action = toggle_reg_sens (_common_actions, "toggle-follow-playhead", _("Follow Playhead"), sigc::mem_fun (*this, &EditingContext::follow_playhead_chosen));
stationary_playhead_action = toggle_reg_sens (_common_actions, "toggle-stationary-playhead", _("Stationary Playhead"), (mem_fun(*this, &EditingContext::stationary_playhead_chosen))); stationary_playhead_action = toggle_reg_sens (_common_actions, "toggle-stationary-playhead", _("Stationary Playhead"), (mem_fun(*this, &EditingContext::stationary_playhead_chosen)));
follow_playhead_action->set_tooltip (_("Scroll automatically to keep playhead visible"));
undo_action = reg_sens (_common_actions, "undo", S_("Command|Undo"), sigc::bind (sigc::mem_fun (*this, &EditingContext::undo), 1U)); undo_action = reg_sens (_common_actions, "undo", S_("Command|Undo"), sigc::bind (sigc::mem_fun (*this, &EditingContext::undo), 1U));
redo_action = reg_sens (_common_actions, "redo", _("Redo"), sigc::bind (sigc::mem_fun (*this, &EditingContext::redo), 1U)); redo_action = reg_sens (_common_actions, "redo", _("Redo"), sigc::bind (sigc::mem_fun (*this, &EditingContext::redo), 1U));
alternate_redo_action = reg_sens (_common_actions, "alternate-redo", _("Redo"), sigc::bind (sigc::mem_fun (*this, &EditingContext::redo), 1U)); alternate_redo_action = reg_sens (_common_actions, "alternate-redo", _("Redo"), sigc::bind (sigc::mem_fun (*this, &EditingContext::redo), 1U));
@ -2350,8 +2351,11 @@ EditingContext::bind_mouse_mode_buttons ()
RefPtr<Action> act; RefPtr<Action> act;
act = ActionManager::get_action ((_name + X_("Editing")).c_str(), X_("temporal-zoom-in")); act = ActionManager::get_action ((_name + X_("Editing")).c_str(), X_("temporal-zoom-in"));
act->set_tooltip (_("Zoom In"));
zoom_in_button.set_related_action (act); zoom_in_button.set_related_action (act);
act = ActionManager::get_action ((_name + X_("Editing")).c_str(), X_("temporal-zoom-out")); act = ActionManager::get_action ((_name + X_("Editing")).c_str(), X_("temporal-zoom-out"));
act->set_tooltip (_("Zoom Out"));
zoom_out_button.set_related_action (act); zoom_out_button.set_related_action (act);
follow_playhead_button.set_related_action (follow_playhead_action); follow_playhead_button.set_related_action (follow_playhead_action);

View file

@ -2894,8 +2894,6 @@ Editor::setup_tooltips ()
set_tooltip (*_group_tabs, _("Groups: click to (de)activate\nContext-click for other operations")); set_tooltip (*_group_tabs, _("Groups: click to (de)activate\nContext-click for other operations"));
set_tooltip (nudge_forward_button, _("Nudge Region/Selection Later")); set_tooltip (nudge_forward_button, _("Nudge Region/Selection Later"));
set_tooltip (nudge_backward_button, _("Nudge Region/Selection Earlier")); set_tooltip (nudge_backward_button, _("Nudge Region/Selection Earlier"));
set_tooltip (zoom_in_button, _("Zoom In"));
set_tooltip (zoom_out_button, _("Zoom Out"));
set_tooltip (zoom_preset_selector, _("Zoom to Time Scale")); set_tooltip (zoom_preset_selector, _("Zoom to Time Scale"));
set_tooltip (full_zoom_button, _("Zoom to Session")); set_tooltip (full_zoom_button, _("Zoom to Session"));
set_tooltip (tav_expand_button, _("Expand Tracks")); set_tooltip (tav_expand_button, _("Expand Tracks"));

View file

@ -1523,7 +1523,7 @@ Editor::sensitize_the_right_region_actions (bool because_canvas_crossing)
if (rs.size() > 1) { if (rs.size() > 1) {
_region_actions->get_action("show-region-list-editor")->set_sensitive (false); _region_actions->get_action("show-region-list-editor")->set_sensitive (false);
_region_actions->get_action("show-region-properties")->set_sensitive (false); _region_actions->get_action("edit-region-dedicated-window")->set_sensitive (false);
_region_actions->get_action("rename-region")->set_sensitive (false); _region_actions->get_action("rename-region")->set_sensitive (false);
/* XXX need to check whether there is than 1 per /* XXX need to check whether there is than 1 per
playlist, because otherwise this makes no sense. playlist, because otherwise this makes no sense.

View file

@ -123,7 +123,7 @@ PluginPinWidget::PluginPinWidget (std::shared_ptr<ARDOUR::PluginInsert> pi)
_pm_size_group = SizeGroup::create (SIZE_GROUP_BOTH); _pm_size_group = SizeGroup::create (SIZE_GROUP_BOTH);
_add_plugin.set_tweaks (ArdourButton::Square); _add_plugin.set_tweaks (ArdourButton::Square);
_del_plugin.set_tweaks (ArdourButton::Square); _del_plugin.set_tweaks (ArdourButton::Square);
if (_pi->plugin (0)->get_info()->reconfigurable_io ()) { if (_pi->plugin (0)->get_info()->reconfigurable_io () || _pi->plugin (0)->get_info()->variable_bus_layout ()) {
_pm_size_group->add_widget (_add_input_audio); _pm_size_group->add_widget (_add_input_audio);
_pm_size_group->add_widget (_del_input_audio); _pm_size_group->add_widget (_del_input_audio);
_pm_size_group->add_widget (_add_input_midi); _pm_size_group->add_widget (_add_input_midi);
@ -151,7 +151,7 @@ PluginPinWidget::PluginPinWidget (std::shared_ptr<ARDOUR::PluginInsert> pi)
/* left side */ /* left side */
tl->pack_start (_set_config, false, false); tl->pack_start (_set_config, false, false);
if (_pi->plugin (0)->get_info()->reconfigurable_io ()) { if (_pi->plugin (0)->get_info()->reconfigurable_io () || _pi->plugin (0)->get_info()->variable_bus_layout ()) {
box = manage (new HBox ()); box = manage (new HBox ());
box->set_border_width (2); box->set_border_width (2);
box->pack_start (_add_input_audio, true, false); box->pack_start (_add_input_audio, true, false);

View file

@ -384,20 +384,36 @@ PluginSelector::show_this_plugin (const PluginInfoPtr& info, const std::string&
return false; return false;
} }
bool search_name = _search_name_checkbox->get_active();
bool search_tags = _search_tags_checkbox->get_active();
bool search_creator = false;
if (!search_name && !search_tags) {
search_name = true;
search_tags = true;
search_creator = true;
}
if (!searchstr.empty()) { if (!searchstr.empty()) {
if (_search_name_checkbox->get_active()) { /* name contains */ if (search_name) {
std::string compstr = info->name; std::string compstr = info->name;
setup_search_string (compstr); setup_search_string (compstr);
maybe_show |= match_search_strings (compstr, searchstr); maybe_show |= match_search_strings (compstr, searchstr);
} }
if (_search_tags_checkbox->get_active()) { /* tag contains */ if (search_tags) {
std::string compstr = manager.get_tags_as_string (info); std::string compstr = manager.get_tags_as_string (info);
setup_search_string (compstr); setup_search_string (compstr);
maybe_show |= match_search_strings (compstr, searchstr); maybe_show |= match_search_strings (compstr, searchstr);
} }
if (search_creator) {
std::string compstr = info->creator;
setup_search_string (compstr);
maybe_show |= match_search_strings (compstr, searchstr);
}
if (!maybe_show) { if (!maybe_show) {
return false; return false;
} }

View file

@ -492,6 +492,8 @@ def configure(conf):
autowaf.check_pkg(conf, 'pangoft2', uselib_store='PANGOFT2', atleast_version='1.36.8', mandatory=False) autowaf.check_pkg(conf, 'pangoft2', uselib_store='PANGOFT2', atleast_version='1.36.8', mandatory=False)
autowaf.check_pkg(conf, 'fontconfig', uselib_store='FONTCONFIG') autowaf.check_pkg(conf, 'fontconfig', uselib_store='FONTCONFIG')
conf.check(header_name='unistd.h', define_name='HAVE_UNISTD_H',mandatory=False)
if conf.env.CC_NAME == 'gcc' and Options.options.strict: if conf.env.CC_NAME == 'gcc' and Options.options.strict:
conf.define('GLIB_DISABLE_DEPRECATION_WARNINGS', 1) conf.define('GLIB_DISABLE_DEPRECATION_WARNINGS', 1)
for var in ['CFLAGS', 'CXXFLAGS']: for var in ['CFLAGS', 'CXXFLAGS']:

View file

@ -315,6 +315,7 @@ public:
virtual bool reconfigure_io (ChanCount /*in*/, ChanCount /*aux_in*/, ChanCount /*out*/) { return true; } virtual bool reconfigure_io (ChanCount /*in*/, ChanCount /*aux_in*/, ChanCount /*out*/) { return true; }
virtual bool match_variable_io (ChanCount& /*in*/, ChanCount& /*aux_in*/, ChanCount& /*out*/) { return false; } virtual bool match_variable_io (ChanCount& /*in*/, ChanCount& /*aux_in*/, ChanCount& /*out*/) { return false; }
virtual void request_bus_layout (ChanCount const& /*in*/, ChanCount const& /*aux_in*/, ChanCount const& /*out*/) { }
virtual ChanCount output_streams () const; virtual ChanCount output_streams () const;
virtual ChanCount input_streams () const; virtual ChanCount input_streams () const;
@ -532,6 +533,11 @@ public:
/* @return true if the plugin can change its inputs or outputs on demand. */ /* @return true if the plugin can change its inputs or outputs on demand. */
virtual bool reconfigurable_io () const { return false; } virtual bool reconfigurable_io () const { return false; }
/* @return true if the plugin has configurable busses but no AU style reconfigureable I/O (VST3)
* implies request_bus_layout ()
*/
virtual bool variable_bus_layout () const { return false; }
/* max [re]configurable outputs (if finite, 0 otherwise) */ /* max [re]configurable outputs (if finite, 0 otherwise) */
virtual uint32_t max_configurable_outputs () const virtual uint32_t max_configurable_outputs () const
{ {

View file

@ -202,6 +202,7 @@ public:
void set_owner (ARDOUR::SessionObject* o); void set_owner (ARDOUR::SessionObject* o);
void set_non_realtime (bool); void set_non_realtime (bool);
void request_bus_layout (uint32_t main_in, uint32_t aux_in, uint32_t main_out);
void enable_io (std::vector<bool> const&, std::vector<bool> const&, bool force = false); void enable_io (std::vector<bool> const&, std::vector<bool> const&, bool force = false);
void process (float** ins, float** outs, uint32_t n_samples); void process (float** ins, float** outs, uint32_t n_samples);
@ -242,8 +243,10 @@ private:
bool disconnect_components (); bool disconnect_components ();
bool update_processor (); bool update_processor ();
void query_io_config ();
int32 count_channels (Vst::MediaType, Vst::BusDirection, Vst::BusType); int32 count_channels (Vst::MediaType, Vst::BusDirection, Vst::BusType);
bool evoral_to_vst3 (Vst::Event&, Evoral::Event<samplepos_t> const&, int32_t); bool evoral_to_vst3 (Vst::Event&, Evoral::Event<samplepos_t> const&, int32_t);
void update_shadow_data (); void update_shadow_data ();
@ -403,6 +406,12 @@ public:
IOPortDescription describe_io_port (DataType dt, bool input, uint32_t id) const; IOPortDescription describe_io_port (DataType dt, bool input, uint32_t id) const;
PluginOutputConfiguration possible_output () const; PluginOutputConfiguration possible_output () const;
void request_bus_layout (ChanCount const& /*in*/, ChanCount const& /*aux_in*/, ChanCount const& /*out*/);
bool reconfigure_io (ChanCount /*in*/, ChanCount /*aux_in*/, ChanCount /*out*/);
ChanCount output_streams () const;
ChanCount input_streams () const;
void set_automation_control (uint32_t, std::shared_ptr<ARDOUR::AutomationControl>); void set_automation_control (uint32_t, std::shared_ptr<ARDOUR::AutomationControl>);
std::string state_node_name () const std::string state_node_name () const
@ -487,6 +496,8 @@ public:
bool is_instrument () const; bool is_instrument () const;
PBD::Searchpath preset_search_path () const; PBD::Searchpath preset_search_path () const;
bool variable_bus_layout () const { return true; }
std::optional<bool> has_editor; std::optional<bool> has_editor;
std::shared_ptr<VST3PluginModule> m; std::shared_ptr<VST3PluginModule> m;

View file

@ -46,6 +46,7 @@
#include "ardour/port.h" #include "ardour/port.h"
#include "ardour/session.h" #include "ardour/session.h"
#include "ardour/types.h" #include "ardour/types.h"
#include "ardour/vst3_plugin.h"
#include "pbd/i18n.h" #include "pbd/i18n.h"
@ -2100,6 +2101,10 @@ PluginInsert::configure_io (ChanCount in, ChanCount out)
/* NB. When resolving impossible matches, "replicate 1 time" is valid. /* NB. When resolving impossible matches, "replicate 1 time" is valid.
* e.g. add a MIDI filter (1 MIDI in, 1 MIDI out) after some audio plugin */ * e.g. add a MIDI filter (1 MIDI in, 1 MIDI out) after some audio plugin */
assert (!_plugins.front()->get_info()->reconfigurable_io ()); assert (!_plugins.front()->get_info()->reconfigurable_io ());
/* VST3 */
for (auto const& p : _plugins) {
p->reconfigure_io (natural_input_streams (), aux_in, natural_output_streams ());
}
break; break;
default: default:
@ -2260,6 +2265,24 @@ PluginInsert::configure_io (ChanCount in, ChanCount out)
bool bool
PluginInsert::can_support_io_configuration (const ChanCount& in, ChanCount& out) PluginInsert::can_support_io_configuration (const ChanCount& in, ChanCount& out)
{ {
if (plugin()->get_info ()->variable_bus_layout ()) {
ChanCount input_streams = natural_input_streams ();
ChanCount sc;
if (_sidechain) {
_sidechain->can_support_io_configuration (sc, sc);
}
for (auto const& p : _plugins) {
if (_custom_cfg) {
p->request_bus_layout (_custom_sinks, sc, _custom_sinks);
} else {
p->request_bus_layout (in, sc, in);
}
}
if (input_streams != natural_input_streams ()) {
mapping_changed ();
}
}
if (_sidechain) { if (_sidechain) {
_sidechain->can_support_io_configuration (in, out); // never fails, sets "out" _sidechain->can_support_io_configuration (in, out); // never fails, sets "out"
} }

View file

@ -32,6 +32,7 @@
#include "ardour/readonly_control.h" #include "ardour/readonly_control.h"
#include "ardour/region_fx_plugin.h" #include "ardour/region_fx_plugin.h"
#include "ardour/session.h" #include "ardour/session.h"
#include "ardour/vst3_plugin.h"
using namespace std; using namespace std;
using namespace ARDOUR; using namespace ARDOUR;
@ -835,6 +836,12 @@ RegionFxPlugin::can_support_io_configuration (const ChanCount& in, ChanCount& ou
out = ChanCount::min (in, out); out = ChanCount::min (in, out);
return true; return true;
} }
if (plugin()->get_info ()->variable_bus_layout ()) {
ChanCount sc;
for (auto const& p : _plugins) {
p->request_bus_layout (in, sc, in);
}
}
return private_can_support_io_configuration (in, out).method != Impossible; return private_can_support_io_configuration (in, out).method != Impossible;
} }

View file

@ -16,13 +16,16 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#ifdef WAF_BUILD
#include "libardour-config.h"
#endif
#include <regex> #include <regex>
#include "pbd/gstdio_compat.h" #include "pbd/gstdio_compat.h"
#include <glibmm.h> #include <glibmm.h>
#include "pbd/basename.h" #include "pbd/basename.h"
#include "pbd/compose.h"
#include "pbd/convert.h" #include "pbd/convert.h"
#include "pbd/debug.h" #include "pbd/debug.h"
#include "pbd/error.h" #include "pbd/error.h"
@ -98,22 +101,6 @@ VST3Plugin::init ()
_plug->OnResizeView.connect_same_thread (_connections, std::bind (&VST3Plugin::forward_resize_view, this, _1, _2)); _plug->OnResizeView.connect_same_thread (_connections, std::bind (&VST3Plugin::forward_resize_view, this, _1, _2));
_plug->OnParameterChange.connect_same_thread (_connections, std::bind (&VST3Plugin::parameter_change_handler, this, _1, _2, _3)); _plug->OnParameterChange.connect_same_thread (_connections, std::bind (&VST3Plugin::parameter_change_handler, this, _1, _2, _3));
_plug->OnProcessorChange.connect_same_thread (_connections, [&](ARDOUR::RouteProcessorChange const& rpc) { Plugin::send_processors_changed (rpc); }); _plug->OnProcessorChange.connect_same_thread (_connections, [&](ARDOUR::RouteProcessorChange const& rpc) { Plugin::send_processors_changed (rpc); });
/* assume only default active busses are connected */
for (auto const& abi : _plug->bus_info_in ()) {
for (int32_t i = 0; i < abi.second.n_chn; ++i) {
_connected_inputs.push_back (abi.second.dflt);
}
}
for (auto const& abi : _plug->bus_info_out ()) {
for (int32_t i = 0; i < abi.second.n_chn; ++i) {
_connected_outputs.push_back (abi.second.dflt);
}
}
/* pre-configure from GUI thread */
_plug->enable_io (_connected_inputs, _connected_outputs, true);
} }
void void
@ -337,6 +324,53 @@ VST3Plugin::possible_output () const
#endif #endif
} }
ChanCount
VST3Plugin::input_streams () const
{
ChanCount cc;
cc.set_audio (_plug->n_audio_inputs (true));
cc.set_midi (_plug->n_midi_inputs ());
return cc;
}
ChanCount
VST3Plugin::output_streams () const
{
ChanCount cc;
cc.set_audio (_plug->n_audio_outputs (true));
cc.set_midi (_plug->n_midi_outputs ());
return cc;
}
void
VST3Plugin::request_bus_layout (ChanCount const& in, ChanCount const& aux_in, ChanCount const& out)
{
_plug->request_bus_layout (in.n_audio (), aux_in.n_audio (), out.n_audio ());
}
bool
VST3Plugin::reconfigure_io (ChanCount in, ChanCount aux_in, ChanCount out)
{
DEBUG_TRACE (DEBUG::VST3Config, string_compose ("VST3Plugin::reconfigure_io in: %1 aux: %2 out: %3 ; n_in=%4 n_out=%5\n",
in, aux_in, out, _plug->n_audio_inputs (), _plug->n_audio_outputs ()));
assert (_plug->n_audio_inputs () >= in.n_audio () + aux_in.n_audio ());
assert (_plug->n_audio_outputs () >= out.n_audio ());
_connected_inputs.clear ();
_connected_inputs.resize (in.n_audio () + aux_in.n_audio ());
_connected_inputs.flip ();
_connected_inputs.resize (_plug->n_audio_inputs ());
_connected_outputs.clear ();
_connected_outputs.resize (out.n_audio ());
_connected_outputs.flip ();
_connected_outputs.resize (_plug->n_audio_outputs ());
_plug->enable_io (_connected_inputs, _connected_outputs);
return true;
}
/* **************************************************************************** /* ****************************************************************************
* Plugin UI * Plugin UI
*/ */
@ -838,8 +872,6 @@ VST3Plugin::connect_and_run (BufferSet& bufs,
} }
} }
_plug->enable_io (_connected_inputs, _connected_outputs);
_plug->process (ins, outs, n_samples); _plug->process (ins, outs, n_samples);
/* handle outgoing MIDI events */ /* handle outgoing MIDI events */
@ -1303,13 +1335,14 @@ VST3PI::VST3PI (std::shared_ptr<ARDOUR::VST3PluginModule> m, std::string unique_
_busbuf_in.resize (_n_bus_in); _busbuf_in.resize (_n_bus_in);
_busbuf_out.resize (_n_bus_out); _busbuf_out.resize (_n_bus_out);
/* do not re-order, _io_name is build in sequence */ query_io_config ();
_n_inputs = count_channels (Vst::kAudio, Vst::kInput, Vst::kMain);
_n_aux_inputs = count_channels (Vst::kAudio, Vst::kInput, Vst::kAux); if (n_audio_inputs () == 0 && n_audio_outputs () == 0 && n_midi_inputs () == 0 && n_midi_outputs () == 0) {
_n_outputs = count_channels (Vst::kAudio, Vst::kOutput, Vst::kMain); DEBUG_TRACE (DEBUG::VST3Config, "forcing I/O rescan with stereo layout\n");
_n_aux_outputs = count_channels (Vst::kAudio, Vst::kOutput, Vst::kAux); /* see also vst3_scan discover_vst3 -- assume stereo by default */
_n_midi_inputs = count_channels (Vst::kEvent, Vst::kInput, Vst::kMain); request_bus_layout (2, 0, 2);
_n_midi_outputs = count_channels (Vst::kEvent, Vst::kOutput, Vst::kMain); query_io_config ();
}
if (!connect_components ()) { if (!connect_components ()) {
//_controller->terminate(); // XXX ? //_controller->terminate(); // XXX ?
@ -1547,6 +1580,26 @@ VST3PI::queryInterface (const TUID _iid, void** obj)
return kNoInterface; return kNoInterface;
} }
void
VST3PI::query_io_config ()
{
_io_name[Vst::kAudio][Vst::kInput].clear ();
_io_name[Vst::kAudio][Vst::kOutput].clear ();
_io_name[Vst::kEvent][Vst::kInput].clear ();
_io_name[Vst::kEvent][Vst::kOutput].clear ();
_bus_info_in.clear ();
_bus_info_out.clear ();
/* do not re-order, _io_name is build in sequence */
_n_inputs = count_channels (Vst::kAudio, Vst::kInput, Vst::kMain);
_n_aux_inputs = count_channels (Vst::kAudio, Vst::kInput, Vst::kAux);
_n_outputs = count_channels (Vst::kAudio, Vst::kOutput, Vst::kMain);
_n_aux_outputs = count_channels (Vst::kAudio, Vst::kOutput, Vst::kAux);
_n_midi_inputs = count_channels (Vst::kEvent, Vst::kInput, Vst::kMain);
_n_midi_outputs = count_channels (Vst::kEvent, Vst::kOutput, Vst::kMain);
}
tresult tresult
VST3PI::restartComponent (int32 flags) VST3PI::restartComponent (int32 flags)
{ {
@ -2253,6 +2306,72 @@ VST3PI::set_event_bus_state (bool enable)
} }
} }
void
VST3PI::request_bus_layout (uint32_t in, uint32_t aux_in, uint32_t out)
{
// TODO only if changed .. and if plugin doesn't have defaults
DEBUG_TRACE (DEBUG::VST3Config, string_compose ("VST3PI::request_bus_layout: in = %1 aux-in = %2 out = %3\n", in, aux_in, out));
bool was_active = _is_processing;
if (!deactivate ()) {
DEBUG_TRACE (DEBUG::VST3Config, "VST3PI::request_bus_layout failed to deactivate plugin\n");
}
typedef std::vector<Vst::SpeakerArrangement> VSTSpeakerArrangements;
VSTSpeakerArrangements sa_in;
VSTSpeakerArrangements sa_out;
Vst::SpeakerArrangement sa = ((uint64_t)1 << in) - 1;
if (in == 1 /*Vst::SpeakerArr::kSpeakerL */ && !_no_kMono) {
sa = Vst::SpeakerArr::kMono; /* 1 << 19 */
}
if (_n_bus_in > 0) {
sa_in.push_back (sa);
}
sa = ((uint64_t)1 << out) - 1;
if (out == 1 /*Vst::SpeakerArr::kSpeakerL */ && !_no_kMono) {
sa = Vst::SpeakerArr::kMono; /* 1 << 19 */
}
if (_n_bus_out > 0) {
sa_out.push_back (sa);
}
sa = ((uint64_t)1 << aux_in) - 1;
if (_n_bus_in > 1) {
sa_in.push_back (sa);
}
sa = 0;
while (sa_in.size () < (VSTSpeakerArrangements::size_type) _n_bus_in) {
sa_in.push_back (sa);
}
while (sa_out.size () < (VSTSpeakerArrangements::size_type) _n_bus_out) {
sa_out.push_back (sa);
}
Vst::SpeakerArrangement null_arrangement = {};
#ifndef NDEBUG
tresult rv =
#endif
_processor->setBusArrangements (sa_in.size () > 0 ? &sa_in[0] : &null_arrangement, sa_in.size (),
sa_out.size () > 0 ? &sa_out[0] : &null_arrangement, sa_out.size ());
DEBUG_TRACE (DEBUG::VST3Config, string_compose ("VST3PI::request_bus_layout setBusArrangements ins = %1 outs = %2 | rv = %3\n", sa_in.size (), sa_out.size (), rv));
query_io_config ();
if (was_active) {
activate ();
}
}
void void
VST3PI::enable_io (std::vector<bool> const& ins, std::vector<bool> const& outs, bool force) VST3PI::enable_io (std::vector<bool> const& ins, std::vector<bool> const& outs, bool force)
{ {
@ -2273,11 +2392,11 @@ VST3PI::enable_io (std::vector<bool> const& ins, std::vector<bool> const& outs,
_enabled_audio_in = ins; _enabled_audio_in = ins;
_enabled_audio_out = outs; _enabled_audio_out = outs;
assert (_enabled_audio_in.size () == n_audio_inputs ());
assert (_enabled_audio_out.size () == n_audio_outputs ());
/* check that settings have not changed */ /* check that settings have not changed */
assert (_n_bus_in == _component->getBusCount (Vst::kAudio, Vst::kInput)); assert (_n_bus_in == _component->getBusCount (Vst::kAudio, Vst::kInput));
assert (_n_bus_out == _component->getBusCount (Vst::kAudio, Vst::kOutput)); assert (_n_bus_out == _component->getBusCount (Vst::kAudio, Vst::kOutput));
assert (_bus_info_in.size () == _n_bus_in);
assert (_bus_info_out.size () == _n_bus_out);
DEBUG_TRACE (DEBUG::VST3Config, string_compose ("VST3PI::enable_io: n_bus_in = %1 n_bus_out = %2\n", _n_bus_in, _n_bus_out)); DEBUG_TRACE (DEBUG::VST3Config, string_compose ("VST3PI::enable_io: n_bus_in = %1 n_bus_out = %2\n", _n_bus_in, _n_bus_out));

View file

@ -74,7 +74,7 @@ static const char* fmt_type (Vst::BusType t) {
} }
static int32 static int32
count_channels (Vst::IComponent* c, Vst::MediaType media, Vst::BusDirection dir, Vst::BusType type, bool verbose = false) count_channels (Vst::IComponent* c, Vst::MediaType media, Vst::BusDirection dir, Vst::BusType type, bool verbose = false, bool can_fail = true)
{ {
/* see also libs/ardour/vst3_plugin.cc VST3PI::count_channels */ /* see also libs/ardour/vst3_plugin.cc VST3PI::count_channels */
int32 n_busses = c->getBusCount (media, dir); int32 n_busses = c->getBusCount (media, dir);
@ -100,13 +100,57 @@ count_channels (Vst::IComponent* c, Vst::MediaType media, Vst::BusDirection dir,
} else { } else {
n_channels += bus.channelCount; n_channels += bus.channelCount;
} }
} else if (verbose && rv != kResultTrue) { } else if (rv != kResultTrue) {
PBD::info << "VST3: \\ error getting busInfo for bus: " << i << " rv: " << rv << ", got type: " << fmt_type (bus.busType) << endmsg; if (verbose) {
PBD::info << "VST3: \\ error getting busInfo for bus: " << i << " rv: " << rv << ", got type: " << fmt_type (bus.busType) << endmsg;
}
if (!can_fail) {
return -1;
}
} }
} }
return n_channels; return n_channels;
} }
static bool
count_all_count_channels (ARDOUR::VST3Info& nfo, Vst::IComponent* c, bool verbose, bool require_result)
{
nfo.n_inputs = count_channels (c, Vst::kAudio, Vst::kInput, Vst::kMain, verbose, require_result);
nfo.n_aux_inputs = count_channels (c, Vst::kAudio, Vst::kInput, Vst::kAux, verbose);
nfo.n_outputs = count_channels (c, Vst::kAudio, Vst::kOutput, Vst::kMain, verbose, require_result);
nfo.n_aux_outputs = count_channels (c, Vst::kAudio, Vst::kOutput, Vst::kAux, verbose);
nfo.n_midi_inputs = count_channels (c, Vst::kEvent, Vst::kInput, Vst::kMain, verbose);
nfo.n_midi_outputs = count_channels (c, Vst::kEvent, Vst::kOutput, Vst::kMain, verbose);
return nfo.n_inputs < 0 || nfo.n_outputs < 0;
}
static void
set_speaker_arrangement (Vst::IComponent* c, IPtr<Vst::IAudioProcessor> p)
{
Vst::SpeakerArrangement null_arrangement = {};
typedef std::vector<Vst::SpeakerArrangement> VSTSpeakerArrangements;
VSTSpeakerArrangements sa_in;
VSTSpeakerArrangements sa_out;
/* assume stereo by default */
int n_bus_in = c->getBusCount (Vst::kAudio, Vst::kInput);
int n_bus_out = c->getBusCount (Vst::kAudio, Vst::kOutput);
while (sa_in.size () < (VSTSpeakerArrangements::size_type) n_bus_in) {
Vst::SpeakerArrangement sa = Vst::SpeakerArr::kStereo;
sa_in.push_back (sa);
}
while (sa_out.size () < (VSTSpeakerArrangements::size_type) n_bus_out) {
Vst::SpeakerArrangement sa = Vst::SpeakerArr::kStereo;
sa_out.push_back (sa);
}
p->setBusArrangements (sa_in.size () > 0 ? &sa_in[0] : &null_arrangement, sa_in.size (),
sa_out.size () > 0 ? &sa_out[0] : &null_arrangement, sa_out.size ());
}
static bool static bool
discover_vst3 (std::shared_ptr<ARDOUR::VST3PluginModule> m, std::vector<ARDOUR::VST3Info>& rv, bool verbose) discover_vst3 (std::shared_ptr<ARDOUR::VST3PluginModule> m, std::vector<ARDOUR::VST3Info>& rv, bool verbose)
{ {
@ -209,12 +253,12 @@ discover_vst3 (std::shared_ptr<ARDOUR::VST3PluginModule> m, std::vector<ARDOUR::
continue; continue;
} }
nfo.n_inputs = count_channels (component, Vst::kAudio, Vst::kInput, Vst::kMain, verbose); /* first try to get default layout ..*/
nfo.n_aux_inputs = count_channels (component, Vst::kAudio, Vst::kInput, Vst::kAux, verbose); if (!count_all_count_channels (nfo, component, verbose, false)) {
nfo.n_outputs = count_channels (component, Vst::kAudio, Vst::kOutput, Vst::kMain, verbose); /* some plugins e.g. Altiverb require a valid Bus/SpeakerArrangement */
nfo.n_aux_outputs = count_channels (component, Vst::kAudio, Vst::kOutput, Vst::kAux, verbose); set_speaker_arrangement (component, processor);
nfo.n_midi_inputs = count_channels (component, Vst::kEvent, Vst::kInput, Vst::kMain, verbose); count_all_count_channels (nfo, component, verbose, true);
nfo.n_midi_outputs = count_channels (component, Vst::kEvent, Vst::kOutput, Vst::kMain, verbose); }
processor->setProcessing (false); processor->setProcessing (false);
component->setActive (false); component->setActive (false);

View file

@ -341,7 +341,6 @@ def configure(conf):
conf.check(header_name='sys/vfs.h', define_name='HAVE_SYS_VFS_H',mandatory=False) conf.check(header_name='sys/vfs.h', define_name='HAVE_SYS_VFS_H',mandatory=False)
conf.check(header_name='sys/statvfs.h', define_name='HAVE_SYS_STATVFS_H',mandatory=False) conf.check(header_name='sys/statvfs.h', define_name='HAVE_SYS_STATVFS_H',mandatory=False)
conf.check(header_name='unistd.h', define_name='HAVE_UNISTD_H',mandatory=False)
have_sys_ioprio = conf.check_cc( have_sys_ioprio = conf.check_cc(
msg="Checking for 'ioprio_set' syscall support", msg="Checking for 'ioprio_set' syscall support",

View file

@ -846,7 +846,7 @@ JACKAudioBackend::join_process_threads ()
bool bool
JACKAudioBackend::in_process_thread () JACKAudioBackend::in_process_thread ()
{ {
#if defined COMPILER_MINGW && (!defined PTW32_VERSION || defined __jack_systemdeps_h__) #if defined COMPILER_MINGW && (!defined __PTW32_VERSION || defined __jack_systemdeps_h__)
if (_main_thread == GetCurrentThread()) { if (_main_thread == GetCurrentThread()) {
return true; return true;
} }
@ -858,7 +858,7 @@ JACKAudioBackend::in_process_thread ()
for (auto & thread : _jack_threads) { for (auto & thread : _jack_threads) {
#if defined COMPILER_MINGW && (!defined PTW32_VERSION || defined __jack_systemdeps_h__) #if defined COMPILER_MINGW && (!defined __PTW32_VERSION || defined __jack_systemdeps_h__)
if (thread == GetCurrentThread()) { if (thread == GetCurrentThread()) {
return true; return true;
} }
@ -909,7 +909,7 @@ JACKAudioBackend::process_thread ()
/* JACK doesn't do this for us when we use the wait API /* JACK doesn't do this for us when we use the wait API
*/ */
#if defined COMPILER_MINGW && (!defined PTW32_VERSION || defined __jack_systemdeps_h__) #if defined COMPILER_MINGW && (!defined __PTW32_VERSION || defined __jack_systemdeps_h__)
_main_thread = GetCurrentThread(); _main_thread = GetCurrentThread();
#else #else
_main_thread = pthread_self (); _main_thread = pthread_self ();

View file

@ -35,8 +35,8 @@
#include "pbd/cpus.h" #include "pbd/cpus.h"
#if defined(COMPILER_MSVC) && !defined(PTW32_VERSION) #if defined(COMPILER_MSVC) && !defined(__PTW32_VERSION)
#include <ardourext/pthread.h> // Gets us 'PTW32_VERSION' #include <ardourext/pthread.h> // Gets us '__PTW32_VERSION'
#endif #endif
int32_t int32_t
@ -69,7 +69,7 @@ PBD::hardware_concurrency()
return c; return c;
} }
} }
#if defined(PTW32_VERSION) || defined(__hpux) #if defined(__PTW32_VERSION) || defined(__hpux)
return pthread_num_processors_np(); return pthread_num_processors_np();
#elif defined(__APPLE__) #elif defined(__APPLE__)
int count; int count;

View file

@ -73,7 +73,7 @@ protected:
}; };
typedef typename RequestBuffer::rw_vector RequestBufferVector; typedef typename RequestBuffer::rw_vector RequestBufferVector;
#if defined(COMPILER_MINGW) && defined(PTW32_VERSION) #if defined(COMPILER_MINGW) && defined(__PTW32_VERSION)
struct pthread_cmp struct pthread_cmp
{ {
bool operator() (const ptw32_handle_t& thread1, const ptw32_handle_t& thread2) bool operator() (const ptw32_handle_t& thread1, const ptw32_handle_t& thread2)

View file

@ -21,7 +21,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#include <unistd.h>
#include <iostream> #include <iostream>
#include <algorithm> #include <algorithm>

View file

@ -29,7 +29,7 @@
#include "pbd/libpbd_visibility.h" #include "pbd/libpbd_visibility.h"
#include "pbd/timing.h" #include "pbd/timing.h"
/* check for PTW32_VERSION */ /* check for __PTW32_VERSION */
#ifdef COMPILER_MSVC #ifdef COMPILER_MSVC
#include <ardourext/pthread.h> #include <ardourext/pthread.h>
#else #else
@ -83,7 +83,7 @@ namespace PBD {
#define DEBUG_STR(id) __debug_str ## id #define DEBUG_STR(id) __debug_str ## id
#define DEBUG_STR_APPEND(id,s) __debug_str ## id << s; #define DEBUG_STR_APPEND(id,s) __debug_str ## id << s;
#define DEBUG_ENABLED(bits) (((bits) & PBD::debug_bits).any()) #define DEBUG_ENABLED(bits) (((bits) & PBD::debug_bits).any())
#ifdef PTW32_VERSION #ifdef __PTW32_VERSION
#define DEBUG_THREAD_SELF pthread_self().p #define DEBUG_THREAD_SELF pthread_self().p
#define DEBUG_THREAD_PRINT(t) t.p #define DEBUG_THREAD_PRINT(t) t.p
#else #else

View file

@ -27,13 +27,13 @@
*/ */
#ifndef PTHREAD_MACROS_DEFINED #ifndef PTHREAD_MACROS_DEFINED
#define PTHREAD_MACROS_DEFINED #define PTHREAD_MACROS_DEFINED
#ifdef PTW32_VERSION /* pthread_win32 */ #ifdef __PTW32_VERSION /* pthread_win32 */
#define mark_pthread_inactive(threadID) threadID.p=0 #define mark_pthread_inactive(threadID) threadID.p=0
#define is_pthread_active(threadID) (threadID.p!=0) #define is_pthread_active(threadID) (threadID.p!=0)
#else /* normal pthread */ #else /* normal pthread */
#define mark_pthread_inactive(threadID) threadID=0 #define mark_pthread_inactive(threadID) threadID=0
#define is_pthread_active(threadID) threadID!=0 #define is_pthread_active(threadID) threadID!=0
#endif /* PTW32_VERSION */ #endif /* __PTW32_VERSION */
#endif /* PTHREAD_MACROS_DEFINED */ #endif /* PTHREAD_MACROS_DEFINED */
#ifdef COMPILER_MSVC #ifdef COMPILER_MSVC

View file

@ -237,7 +237,7 @@ pthread_set_name (const char* str)
/* copy string and delete it when exiting */ /* copy string and delete it when exiting */
thread_name.set (strdup (str)); // leaks thread_name.set (strdup (str)); // leaks
#if !defined PTW32_VERSION && defined _GNU_SOURCE #if !defined __PTW32_VERSION && defined _GNU_SOURCE
/* set public thread name, up to 16 chars */ /* set public thread name, up to 16 chars */
char ptn[16]; char ptn[16];
memset (ptn, 0, 16); memset (ptn, 0, 16);

View file

@ -20,6 +20,7 @@
#ifndef mackie_surface_h #ifndef mackie_surface_h
#define mackie_surface_h #define mackie_surface_h
#include <array>
#include <stdint.h> #include <stdint.h>
#include <sigc++/trackable.h> #include <sigc++/trackable.h>

View file

@ -20,10 +20,11 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h>
#ifdef _MSC_VER #ifdef _MSC_VER
#include <windows.h> // Needed for MSVC 'Sleep()' #include <windows.h> // Needed for MSVC 'Sleep()'
#else
#include <unistd.h> // for usleep ()
#endif #endif
#include "zita-convolver/zita-convolver.h" #include "zita-convolver/zita-convolver.h"
@ -432,7 +433,7 @@ Convlevel::Convlevel (void)
, _npar (0) , _npar (0)
, _parsize (0) , _parsize (0)
, _options (0) , _options (0)
#ifndef PTW32_VERSION #ifndef __PTW32_VERSION
, _pthr (0) , _pthr (0)
#endif #endif
, _inp_list (0) , _inp_list (0)
@ -607,7 +608,7 @@ Convlevel::start (int abspri, int policy)
pthread_attr_t attr; pthread_attr_t attr;
struct sched_param parm; struct sched_param parm;
#ifndef PTW32_VERSION #ifndef __PTW32_VERSION
_pthr = 0; _pthr = 0;
#endif #endif
min = sched_get_priority_min (policy); min = sched_get_priority_min (policy);
@ -685,7 +686,7 @@ void*
Convlevel::static_main (void* arg) Convlevel::static_main (void* arg)
{ {
((Convlevel*)arg)->main (); ((Convlevel*)arg)->main ();
#if !defined PTW32_VERSION && defined _GNU_SOURCE #if !defined __PTW32_VERSION && defined _GNU_SOURCE
pthread_setname_np (pthread_self(), "ZConvlevel"); pthread_setname_np (pthread_self(), "ZConvlevel");
#endif #endif
return 0; return 0;
@ -699,7 +700,7 @@ Convlevel::main (void)
_trig.wait (); _trig.wait ();
if (_stat == ST_TERM) { if (_stat == ST_TERM) {
_stat = ST_IDLE; _stat = ST_IDLE;
#ifndef PTW32_VERSION #ifndef __PTW32_VERSION
_pthr = 0; _pthr = 0;
#endif #endif
return; return;

View file

@ -27,7 +27,7 @@
#include "zita-convolver/zconvolver_visibility.h" #include "zita-convolver/zconvolver_visibility.h"
#if defined(__linux__) || defined(__GNU__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(PTW32_VERSION) || defined(__WINPTHREADS_VERSION) #if defined(__linux__) || defined(__GNU__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__PTW32_VERSION) || defined(__WINPTHREADS_VERSION)
#include <semaphore.h> #include <semaphore.h>
#endif #endif
@ -38,7 +38,7 @@ namespace ArdourZita {
#endif #endif
/* note: mingw and msvc actually use PTW32's implementation of semaphores */ /* note: mingw and msvc actually use PTW32's implementation of semaphores */
#if defined(__linux__) || defined(__GNU__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(PTW32_VERSION) || defined (__WINPTHREADS_VERSION) #if defined(__linux__) || defined(__GNU__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__PTW32_VERSION) || defined (__WINPTHREADS_VERSION)
class LIBZCONVOLVER_API ZCsema class LIBZCONVOLVER_API ZCsema
{ {

View file

@ -42,8 +42,8 @@
* See the README file for an explanation of the pthreads-win32 version * See the README file for an explanation of the pthreads-win32 version
* numbering scheme and how the DLL is named etc. * numbering scheme and how the DLL is named etc.
*/ */
#define PTW32_VERSION 2,9,1,0 #define __PTW32_VERSION 2,9,1,0
#define PTW32_VERSION_STRING "2, 9, 1, 0\0" #define __PTW32_VERSION_STRING "2, 9, 1, 0\0"
/* There are three implementations of cancel cleanup. /* There are three implementations of cancel cleanup.
* Note that pthread.h is included in both application * Note that pthread.h is included in both application