aboutsummaryrefslogtreecommitdiffstats
path: root/alc/alcontext.h
diff options
context:
space:
mode:
Diffstat (limited to 'alc/alcontext.h')
-rw-r--r--alc/alcontext.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/alc/alcontext.h b/alc/alcontext.h
index c4f23dfb..70215e9c 100644
--- a/alc/alcontext.h
+++ b/alc/alcontext.h
@@ -101,8 +101,8 @@ struct ALCcontext : public al::intrusive_ref<ALCcontext> {
ALfloat mDopplerFactor{1.0f};
ALfloat mDopplerVelocity{1.0f};
- ALfloat mSpeedOfSound{};
- ALfloat mMetersPerUnit{1.0f};
+ ALfloat mSpeedOfSound{SPEEDOFSOUNDMETRESPERSEC};
+ ALfloat mMetersPerUnit{AL_DEFAULT_METERS_PER_UNIT};
std::atomic_flag mPropsClean;
std::atomic<bool> mDeferUpdates{false};
@@ -155,6 +155,14 @@ struct ALCcontext : public al::intrusive_ref<ALCcontext> {
ALCcontext& operator=(const ALCcontext&) = delete;
~ALCcontext();
+ void init();
+ /**
+ * Removes the context from its device and removes it from being current on
+ * the running thread or globally. Returns true if other contexts still
+ * exist on the device.
+ */
+ bool deinit();
+
void allocVoices(size_t num_voices);
/**