This PR places all LMMS symbols into namespaces to eliminate any potential future name collisions between LMMS and third-party modules.
Also, this PR changes back `LmmsCore` to `Engine`, reverting c519921306 .
Co-authored-by: allejok96 <allejok96@gmail.com>
* ThreadableJob: Move from AtomicInt to std::atomic
This is the first in a series of commits that migrates away from
AtomicInt towards the C++11 standard library types.
This would allow the removal of AtomicInt and related Qt
version-specific code.
While we're at it, also make ProcessingState an `enum class` so that
it's not implicitly convertible to integers.
* LocklessAllocator: Switch from AtomicInt to std::atomic_int
If it looks like some assignments around the Compare & Swap loops went
missing, it's because compare_exchange_weak() updates the first argument
to the current value when it fails (i.e., returns false).
* BufferManager: Remove extra AtomicInt include
* MixerWorkerThread: AtomicInt to std::atomic_int
* NotePlayHandle: AtomicInt to std::atomic_int
* Remove AtomicInt.h
* Move from QAtomicPointer to std::atomic<T*>
This removes some #ifdef trickery that was being used to get
load-acquire and store-release from Qt5 and "plain" (presumably
sequentially-consistent) loads and stores from Qt4.
Well, this commit got a bit out of hand, what with 26 files changed. Oh well.
Basically, we're using the buffermanager to dispense temporary buffers for playhandles and audioports to use.
This allows us to change the way playhandles work. Earlier, playhandles of the same track were waiting in line
to push their output to the audioport. This was of course inefficient, so now they just register themselves to the port,
then the port handles mixing the buffers.
Caveat: this is still a work in progress, the vol/pan knobs on instruments are temporarily non-functional - will be fixed in
the next commit, but I have to get some sleep now.
There once have been huge efforts to implement FX send support in the
master branch. In order to make it available on a stable base here's
a backport which is non-trivial as there have been major rewrites of
the mixer's worker thread architecture.
There still seem to be bugs which we have to fix before merging into
stable branch.
Thanks to Andrew Kelley for the original work.