diff options
author | Owen Williams <owilliams@mixxx.org> | 2019-12-30 15:52:23 -0500 |
---|---|---|
committer | Owen Williams <owilliams@mixxx.org> | 2019-12-30 15:52:23 -0500 |
commit | bcf5f7d9911beb66d75ebd0a5756b6ef869fb3e4 (patch) | |
tree | f12717ddffc7459ea4d8d2b55a7b4bf4bca8a48a /src/vinylcontrol | |
parent | 7d4a6bd043e0aec7cb36d05b49ae7d3589bee867 (diff) |
Master Sync: preallocate buffers in engine thread func.
pickMaster gets called from the engine thread so we have to be careful to
avoid memory allocation. Preallocating a constant number fixes this.
Also make kMaxNumberOfDecks a proper mixxx-global value, and check against
it when we add decks. If someone one day invents a skin that uses 6 or 8
decks, this warning will get tripped (but shouldn't break anything
fundamental in Mixxx).
Diffstat (limited to 'src/vinylcontrol')
-rw-r--r-- | src/vinylcontrol/vinylcontrolmanager.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/vinylcontrol/vinylcontrolmanager.h b/src/vinylcontrol/vinylcontrolmanager.h index 6002330499..4bf975331b 100644 --- a/src/vinylcontrol/vinylcontrolmanager.h +++ b/src/vinylcontrol/vinylcontrolmanager.h @@ -15,6 +15,7 @@ #include "soundio/soundmanagerutil.h" #include "preferences/usersettings.h" #include "vinylcontrol/vinylsignalquality.h" +#include "util/defs.h" class ControlProxy; class ControlPushButton; @@ -23,11 +24,6 @@ class VinylControl; class VinylControlProcessor; -const int kMaxNumberOfDecks = 4; // set to 4 because it will ideally not be more -// or less than the number of vinyl-controlled decks but will probably be -// forgotten in any 2->4 deck switchover. Only real consequence is -// sizeof(void*)*2 bytes of wasted memory if we're only using 2 decks -bkgood - // VinylControlManager is the main-thread interface that other parts of Mixxx // use to interact with the vinyl control subsystem (other than controls exposed // by vinyl control to the rest of Mixxx). VinylControlManager starts a |