aboutsummaryrefslogtreecommitdiffstats
path: root/core/context.h
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-11-28 12:51:46 +0100
committerSven Gothel <[email protected]>2023-11-28 12:51:46 +0100
commit1aaf4f070011490bcece50394b9b32dfa593fd9e (patch)
tree17d68284e401a35eea3d3a574d986d446a60763a /core/context.h
parent6e7cee4fa9a8af03f28ca26cd89f8357390dfc90 (diff)
parent571b546f35eead77ce109f8d4dd6c3de3199d573 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'core/context.h')
-rw-r--r--core/context.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/core/context.h b/core/context.h
index 9723eac3..ccb7dd3b 100644
--- a/core/context.h
+++ b/core/context.h
@@ -7,15 +7,15 @@
#include <cstddef>
#include <memory>
#include <thread>
+#include <vector>
#include "almalloc.h"
+#include "alsem.h"
#include "alspan.h"
#include "async_event.h"
#include "atomic.h"
-#include "bufferline.h"
-#include "threads.h"
+#include "opthelpers.h"
#include "vecmat.h"
-#include "vector.h"
struct DeviceBase;
struct EffectSlot;
@@ -25,8 +25,6 @@ struct Voice;
struct VoiceChange;
struct VoicePropsItem;
-using uint = unsigned int;
-
constexpr float SpeedOfSoundMetersPerSec{343.3f};
@@ -137,7 +135,7 @@ struct ContextBase {
std::thread mEventThread;
al::semaphore mEventSem;
std::unique_ptr<RingBuffer> mAsyncEvents;
- using AsyncEventBitset = std::bitset<AsyncEvent::UserEventCount>;
+ using AsyncEventBitset = std::bitset<al::to_underlying(AsyncEnableBits::Count)>;
std::atomic<AsyncEventBitset> mEnabledEvts{0u};
/* Asynchronous voice change actions are processed as a linked list of
@@ -146,20 +144,20 @@ struct ContextBase {
* in clusters that are stored in a vector for easy automatic cleanup.
*/
using VoiceChangeCluster = std::unique_ptr<VoiceChange[]>;
- al::vector<VoiceChangeCluster> mVoiceChangeClusters;
+ std::vector<VoiceChangeCluster> mVoiceChangeClusters;
using VoiceCluster = std::unique_ptr<Voice[]>;
- al::vector<VoiceCluster> mVoiceClusters;
+ std::vector<VoiceCluster> mVoiceClusters;
using VoicePropsCluster = std::unique_ptr<VoicePropsItem[]>;
- al::vector<VoicePropsCluster> mVoicePropClusters;
+ std::vector<VoicePropsCluster> mVoicePropClusters;
static constexpr size_t EffectSlotClusterSize{4};
EffectSlot *getEffectSlot();
using EffectSlotCluster = std::unique_ptr<EffectSlot[]>;
- al::vector<EffectSlotCluster> mEffectSlotClusters;
+ std::vector<EffectSlotCluster> mEffectSlotClusters;
ContextBase(DeviceBase *device);