aboutsummaryrefslogtreecommitdiffstats
path: root/al/source.h
diff options
context:
space:
mode:
Diffstat (limited to 'al/source.h')
-rw-r--r--al/source.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/al/source.h b/al/source.h
index ac97c8a7..c7694f83 100644
--- a/al/source.h
+++ b/al/source.h
@@ -4,9 +4,10 @@
#include <array>
#include <atomic>
#include <cstddef>
+#include <deque>
#include <iterator>
#include <limits>
-#include <deque>
+#include <string_view>
#include "AL/al.h"
#include "AL/alc.h"
@@ -14,7 +15,6 @@
#include "alc/alu.h"
#include "alc/context.h"
#include "alc/inprogext.h"
-#include "aldeque.h"
#include "almalloc.h"
#include "alnumeric.h"
#include "atomic.h"
@@ -39,9 +39,9 @@ enum class SourceStereo : bool {
#define DEFAULT_SENDS 2
-#define INVALID_VOICE_IDX static_cast<ALuint>(-1)
+inline constexpr ALuint InvalidVoiceIndex{std::numeric_limits<ALuint>::max()};
-extern bool sBufferSubDataCompat;
+inline bool sBufferSubDataCompat{false};
struct ALbufferQueueItem : public VoiceBufferItem {
ALbuffer *mBuffer{nullptr};
@@ -138,14 +138,14 @@ struct ALsource {
ALenum state{AL_INITIAL};
/** Source Buffer Queue head. */
- al::deque<ALbufferQueueItem> mQueue;
+ std::deque<ALbufferQueueItem> mQueue;
bool mPropsDirty{true};
/* Index into the context's Voices array. Lazily updated, only checked and
* reset when looking up the voice.
*/
- ALuint VoiceIdx{INVALID_VOICE_IDX};
+ ALuint VoiceIdx{InvalidVoiceIndex};
/** Self ID */
ALuint id{0};
@@ -157,6 +157,8 @@ struct ALsource {
ALsource(const ALsource&) = delete;
ALsource& operator=(const ALsource&) = delete;
+ static void SetName(ALCcontext *context, ALuint id, std::string_view name);
+
DISABLE_ALLOC()
#ifdef ALSOFT_EAX