Commit Graph

13 Commits

Author SHA1 Message Date
Lukas W
966bf1c6de Use CMake GenerateExportHeader 2018-07-07 11:20:54 +02:00
Matt Kline
ebed0296b3 Axe atomic int (#4326)
* 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.
2018-04-28 12:54:46 -07:00
Lukas W
f23cf4e0bf Fix "out of buffers" crash (#3783)
Remove BufferManager implementation. Use MemoryManager allocation instead and re-use buffers where they are allocated (AudioPort.cpp & PlayHandle.cpp)
2017-09-26 20:33:09 +02:00
Lukas W
29f832034a Remove unused includes (#3429) 2017-03-16 11:35:18 +00:00
grejppi
9e85d7c66e update all copyright headers to the proper url (#3326) 2017-02-06 02:41:15 +02:00
M374LX
e801384eed Move Mixer::clearAudioBuffer() to BufferManager 2015-09-27 00:36:17 -03:00
Lukas W
8b0b2df38e Fix compilation for Qt 5.0 2015-06-21 15:41:26 +02:00
Lukas W
df9d495571 Some #include cleanups 2015-01-22 16:28:41 +01:00
Lukas W
968909c07c Rename engine to Engine 2014-11-26 00:49:55 +01:00
Tobias Doerffel
68b5a21d14 Initialize BufferManager from within Mixer
Avoid crashes caused by worker threads accessing the buffer manager
before it is initialized. Therefore initialize it from within the
Mixer constructor which has the side effect that it gets initialized
in console-only rendering mode as well.
2014-11-18 13:58:40 +02:00
Vesa
7bc97f5d5b Fixes 2014-11-18 13:58:39 +02:00
Vesa
857de8d2c8 Huge structural changes
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.
2014-11-18 13:58:39 +02:00
Vesa
311d33d648 Implement BufferManager
Also, apply things learned while writing BufferManager to the similar NotePlayHandleManager
2014-11-18 13:58:38 +02:00