Commit Graph

525 Commits

Author SHA1 Message Date
Robbert van der Helm 34e3f1a1bf Don't set WINEPREFIX for the current process
`native_environment` allows modification of the current process's
environment, so we had to use the plain `environment` class instead.
2020-06-20 13:43:54 +02:00
Robbert van der Helm 56af346277 Show Wine prefix overrides on the startup output
This might otherwise cause confusion, since otherwise the printed Wine
prefix might not actually be the prefix that will be used.
2020-06-20 01:01:48 +02:00
Robbert van der Helm 471d87bc16 Fix dumb memory error when reading buffers
Not sure how this got in, and I'm even less sure why this has not caused
any issues before this. In the particular case that was causing a crash,
the host was sending 138 sample sized buffers. This error likely only
became visible because the lack of memory alignment caused writes to
parts of the vector objects themselves.
2020-06-18 18:37:07 +02:00
Robbert van der Helm d032405c78 Fix stupid typo in readme and GitHub Actions build 2020-06-08 16:12:39 +02:00
Robbert van der Helm c4842ccda6 Make use-* aliases for new with-* build options
The 'use-*' variants will be marked as deprecated in a future version.
2020-06-08 16:02:53 +02:00
Robbert van der Helm 9385360331 Don't statically link Boost by default #20
Since this would only be needed for distribution, and we're already
doing something similar for libstdc++ on the Ubuntu 18.04 build. This
moves the static linking behind a new build option.
2020-06-08 15:46:09 +02:00
Robbert van der Helm 9ecb65664c List some more common errors and how to fix them 2020-06-06 23:42:03 +02:00
Robbert van der Helm 38a87b53ea Update the Bitwig Studio version number to 3.2 2020-06-06 21:39:37 +02:00
Robbert van der Helm 4403585a70 Use the new C++20 starts_with() and contains() 2020-06-06 13:44:26 +02:00
Robbert van der Helm 8202a6b250 Add missing const qualifiers to member functions 2020-06-06 13:44:26 +02:00
Robbert van der Helm 957da62137 Add missing type qualifiers 2020-06-06 13:44:23 +02:00
Robbert van der Helm 89c186f2c4 Target C++2a
Now that Ubuntu 20.04 is out every currently supported distro that's not
based on Ubuntu 18.04 is shipping GCC 10, so we can start using some
C++20 features. Ubuntu 18.04 already needed a newer version of GCC
installed through a PPA and a newer version of Boost to compile
yabridge, so requiring GCC 10 shouldn't be an issue.
2020-06-05 23:13:41 +02:00
Robbert van der Helm 3aab2e9727 Fix plugin group socket name generation
I'm pretty sure you're supposed to be able to format `size_t` values,
why does this break the stringstream?
2020-06-05 22:56:52 +02:00
Robbert van der Helm 33777d2876 Use same style for optional and avoid double check
I did not know that `std::optional::value()` did checked access. And I
still prefer a more explicit .has_value() over boolean conversion, but
this seems to be the accepted way to do this.
2020-06-05 22:35:56 +02:00
Robbert van der Helm ff298f3f46 Remove redundant conditions
As mentioned in C++ Core Guidelines ES.87.
2020-06-05 22:18:40 +02:00
Robbert van der Helm 047163c6f5 Change spelling in changelog 2020-06-01 16:18:40 +02:00
Robbert van der Helm ade82053f4 Mention GCC 10 in the readme
With instructions for Ubuntu 18.04.
2020-06-01 16:18:40 +02:00
Robbert van der Helm ce2e3ab52e Statically link to libstc++ on Ubuntu 18.04
Somehwere between yabridge 1.1.4 and 1.2.0 we apparently started
requiring newer libstc++ features, and I kind of forgot that libstdc++
needed is bound to the version of g++ the program was compiled with.

Statically linking libstdc++ could in theory cause issues, but I think
we'll be fine.
2020-06-01 00:40:12 +02:00
Robbert van der Helm 9a6116277d Change wording in example yabridge.toml file 2020-05-29 19:23:27 +02:00
Robbert van der Helm 150106e0e0 Bump version to 1.2.0 1.2.0 2020-05-29 18:47:51 +02:00
Robbert van der Helm 091e4db2ab Reword parts of the changelog 2020-05-29 18:47:10 +02:00
Robbert van der Helm 65f51d3f03 Rephrase parts of the plugin groups section 2020-05-29 18:44:12 +02:00
Robbert van der Helm ae740c285a Mention the three different AUR packages
With yabridge 1.2.0 I'll change the regular `yabridge` package to
compile from the source tarball and I'll a new `yabridge-bin` package
that just uses the binaries from the GitHub releases section to confrom
with the usual package naming conventions.
2020-05-29 18:24:59 +02:00
Robbert van der Helm b379708b21 Encapsulate individual/group handling differences
This cleans up the PluginBridge significantly by getting rid of all
fields and handling that was only needed for connecting to plugin
groups. This was also the last thing I wanted to refactor before
releasing the plugin groups feature with yabridge 1.2.
2020-05-29 18:08:44 +02:00
Robbert van der Helm d462421490 Expand the plugin groups section in the readme 2020-05-29 11:48:08 +02:00
Robbert van der Helm 1746fce7e3 Clarify group host plugin removal process better 2020-05-29 11:28:19 +02:00
Robbert van der Helm 890e5b736b Revert "Work around a memory corruption issue on unload"
This reverts commit 0c047f9a66.

This workaround was needed because of the weird threading behavior with
the Win32 APIs, std::thread and winelib. Now that the actual
`active_plugins.erase()` call is done from within the plugin
context/main thread, this hack is no longer needed.
2020-05-29 11:24:56 +02:00
Robbert van der Helm 4dcc8fd97f Better clarify the use cases for Win32Thread 2020-05-29 11:19:38 +02:00
Robbert van der Helm f8d7421a8b Remove now unneeded include 2020-05-28 19:29:43 +02:00
Robbert van der Helm 290a85e902 Simplify individual host and Fix memory corruption
Not sure why I made this more complicated than it needed to be to begin
with. And just like in `Vst2Bridge`, we can't reliably run third party
code inside of an `std::thread` so the IO context and initialization has
to be run on the main thread.
2020-05-28 19:26:37 +02:00
Robbert van der Helm 16aa1af14e Don't check for child termination with winedbg
This of course can't work since the process is spawned in a detached
state.
2020-05-28 19:00:10 +02:00
Robbert van der Helm 000438c59d Mention plugin groups in the readme's introduction 2020-05-28 17:24:32 +02:00
Robbert van der Helm 2a31a60266 Get rid of the ugly Win32 threads in group host
Running the audio processing and midi dispatcher loops in a regular
`std::thread` causes weird memory corruption issues (likely because of
calling conventions are not being respected). Luckily this does not
cause any issues here, so we can get rid of a lot of ugly glue code and
manual memory management.
2020-05-28 16:27:30 +02:00
Robbert van der Helm 00bcdf8fca Add a RAII wrapper around SetTimer() 2020-05-28 15:27:45 +02:00
Robbert van der Helm 10cc871798 Fix dangling references in last commit 2020-05-28 14:18:16 +02:00
Robbert van der Helm 06de49ded2 Unify event handling behavior for all cases
This makes the individual plugin host slightly more complex, but now
both individually hosted plugins and plugin groups handle both
dispatcher events and GUI events in the exact same way.
2020-05-28 13:53:25 +02:00
Robbert van der Helm f32ef61fde Link to plugin groups section further in readme
As it may not immediately be obvious what this is for when just scanning
through the readme.
2020-05-27 17:17:09 +02:00
Robbert van der Helm effca96ead Correct capitalization on FabFilter 2020-05-27 17:12:48 +02:00
Robbert van der Helm c7976e8802 Update installation instructions for plugin groups
Since there are now also 64 and 32 bit group host files.
2020-05-27 16:51:27 +02:00
Robbert van der Helm ce35124e0c Merge branch 'feature/plugin-groups' 2020-05-27 15:47:57 +02:00
Robbert van der Helm 706b34eeb4 Rearrange order of Win32 and X11 event handling
Should not matter that much, but a potential situation where you would
want to have handled the X11 events first is when the editor enters a
blocking message loop while it is waiting on a GUI component just as the
window gets moved by an external program or window manager.
2020-05-27 15:44:14 +02:00
Robbert van der Helm 40f88b948f Document behaviour differences with plugin groups 2020-05-27 15:43:43 +02:00
Robbert van der Helm 941f915dfe Move the architecture section to docs/
It's getting a bit unwieldy to be left in the readme.
2020-05-27 15:24:54 +02:00
Robbert van der Helm 276e4ac02f Make the local coordinate fix more robust
Without this fix and when using plugin groups, hovering over an opened
window that has not yet been interacted with shows some weird behavior.
2020-05-27 14:29:31 +02:00
Robbert van der Helm 5a0c3c4627 Simplify the opening editor behaviour again
This partially reverts 16fce5577d.
2020-05-27 14:05:57 +02:00
Robbert van der Helm d65281d691 Clarify local coordinate fix function name 2020-05-27 13:50:52 +02:00
Robbert van der Helm ab4d35886e Add a fix for the keyboard focus in Bitwig 3.2 2020-05-26 19:39:51 +02:00
Robbert van der Helm be969a69d0 Document plugin groups 2020-05-26 19:39:51 +02:00
Robbert van der Helm 0c047f9a66 Work around a memory corruption issue on unload
I'm really not sure what is happening here, and it might just be a
winelib thing.
2020-05-26 17:09:09 +02:00
Robbert van der Helm fc35b6c9c8 Show the init message before launching VST host 2020-05-26 17:07:14 +02:00