Merge pull request #269 from gongminmin/FixForVS2019

Fix compiling problems on VS2019 with vc142 toolset
This commit is contained in:
kcat
2019-02-04 21:22:16 -08:00
committed by GitHub
6 changed files with 10 additions and 5 deletions
+1
View File
@@ -2312,6 +2312,7 @@ static DeviceRef VerifyDevice(ALCdevice *device)
ALCcontext::ALCcontext(ALCdevice *device) : Device{device}
{
PropsClean.test_and_set();
}
/* InitContext
+1 -1
View File
@@ -80,7 +80,7 @@ struct ALCcontext {
ALfloat SpeedOfSound{};
ALfloat MetersPerUnit{1.0f};
std::atomic_flag PropsClean{true};
std::atomic_flag PropsClean;
std::atomic<bool> DeferUpdates{false};
std::mutex PropLock;
+2 -2
View File
@@ -73,7 +73,7 @@ struct ALeffectslot {
EffectState *State{nullptr};
} Effect;
std::atomic_flag PropsClean{true};
std::atomic_flag PropsClean;
RefCount ref{0u};
@@ -113,7 +113,7 @@ struct ALeffectslot {
*/
alignas(16) ALfloat WetBuffer[MAX_EFFECT_CHANNELS][BUFFERSIZE];
ALeffectslot() = default;
ALeffectslot() { PropsClean.test_and_set(); }
ALeffectslot(const ALeffectslot&) = delete;
ALeffectslot& operator=(const ALeffectslot&) = delete;
~ALeffectslot();
+3 -1
View File
@@ -30,7 +30,7 @@ struct ALlistener {
std::array<ALfloat,3> OrientUp{{0.0f, 1.0f, 0.0f}};
ALfloat Gain{1.0f};
std::atomic_flag PropsClean{true};
std::atomic_flag PropsClean;
/* Pointer to the most recent property values that are awaiting an update.
*/
@@ -50,6 +50,8 @@ struct ALlistener {
ALboolean SourceDistanceModel;
DistanceModel mDistanceModel;
} Params;
ALlistener() { PropsClean.test_and_set(); }
};
void UpdateListenerProps(ALCcontext *context);
+1 -1
View File
@@ -98,7 +98,7 @@ struct ALsource {
/** Source Buffer Queue head. */
ALbufferlistitem *queue;
std::atomic_flag PropsClean{true};
std::atomic_flag PropsClean;
/* Index into the context's Voices array. Lazily updated, only checked and
* reset when looking up the voice.
+2
View File
@@ -3353,6 +3353,8 @@ ALsource::ALsource(ALsizei num_sends)
queue = nullptr;
VoiceIdx = -1;
PropsClean.test_and_set();
}
ALsource::~ALsource()