Move VoiceChange to a separate header

This commit is contained in:
Chris Robinson
2020-12-16 00:50:50 -08:00
parent f38919eecc
commit 5ad28f8cba
6 changed files with 30 additions and 13 deletions
+2 -1
View File
@@ -696,7 +696,8 @@ set(ALC_OBJS
alc/panning.cpp
alc/uiddefs.cpp
alc/voice.cpp
alc/voice.h)
alc/voice.h
alc/voice_change.h)
set(CPU_EXTS "Default")
+1
View File
@@ -69,6 +69,7 @@
#include "opthelpers.h"
#include "ringbuffer.h"
#include "threads.h"
#include "voice_change.h"
namespace {
+1
View File
@@ -100,6 +100,7 @@
#include "threads.h"
#include "vecmat.h"
#include "vector.h"
#include "voice_change.h"
#include "backends/base.h"
#include "backends/null.h"
+1 -12
View File
@@ -30,6 +30,7 @@ struct ALsource;
struct EffectSlot;
struct EffectSlotProps;
struct RingBuffer;
struct VoiceChange;
enum class DistanceModel {
@@ -100,18 +101,6 @@ struct ContextParams {
};
struct VoiceChange {
Voice *mOldVoice{nullptr};
Voice *mVoice{nullptr};
ALuint mSourceID{0};
ALenum mState{0};
std::atomic<VoiceChange*> mNext{nullptr};
DEF_NEWDEL(VoiceChange)
};
struct SourceSubList {
uint64_t FreeMask{~0_u64};
ALsource *Sources{nullptr}; /* 64 */
+1
View File
@@ -77,6 +77,7 @@
#include "threads.h"
#include "vecmat.h"
#include "voice.h"
#include "voice_change.h"
struct CTag;
#ifdef HAVE_SSE
+24
View File
@@ -0,0 +1,24 @@
#ifndef VOICE_CHANGE_H
#define VOICE_CHANGE_H
#include <atomic>
#include "almalloc.h"
struct Voice;
using uint = unsigned int;
struct VoiceChange {
Voice *mOldVoice{nullptr};
Voice *mVoice{nullptr};
uint mSourceID{0};
int mState{0};
std::atomic<VoiceChange*> mNext{nullptr};
DEF_NEWDEL(VoiceChange)
};
#endif /* VOICE_CHANGE_H */