diff options
Diffstat (limited to 'Alc/backends/base.h')
-rw-r--r-- | Alc/backends/base.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Alc/backends/base.h b/Alc/backends/base.h index 9cc0d66b..ed690f56 100644 --- a/Alc/backends/base.h +++ b/Alc/backends/base.h @@ -12,6 +12,9 @@ typedef struct ALCbackend { ALCdevice *mDevice; } ALCbackend; +void ALCbackend_lock(ALCbackend *self); +void ALCbackend_unlock(ALCbackend *self); + struct ALCbackendVtable { void (*const Destruct)(ALCbackend *state); @@ -24,6 +27,9 @@ struct ALCbackendVtable { ALint64 (*getLatency)(ALCbackend*); + void (*lock)(ALCbackend*); + void (*unlock)(ALCbackend*); + void (*const Delete)(ALCbackend *state); }; @@ -42,6 +48,10 @@ static void T##_ALCbackend_stop(ALCbackend *obj) \ { T##_stop(STATIC_UPCAST(T, ALCbackend, obj)); } \ static ALint64 T##_ALCbackend_getLatency(ALCbackend *obj) \ { return T##_getLatency(STATIC_UPCAST(T, ALCbackend, obj)); } \ +static void T##_ALCbackend_lock(ALCbackend *obj) \ +{ T##_lock(STATIC_UPCAST(T, ALCbackend, obj)); } \ +static void T##_ALCbackend_unlock(ALCbackend *obj) \ +{ T##_unlock(STATIC_UPCAST(T, ALCbackend, obj)); } \ static void T##_ALCbackend_Delete(ALCbackend *obj) \ { T##_Delete(STATIC_UPCAST(T, ALCbackend, obj)); } \ \ @@ -54,6 +64,8 @@ static const struct ALCbackendVtable T##_ALCbackend_vtable = { \ T##_ALCbackend_start, \ T##_ALCbackend_stop, \ T##_ALCbackend_getLatency, \ + T##_ALCbackend_lock, \ + T##_ALCbackend_unlock, \ \ T##_ALCbackend_Delete, \ } |