diff options
author | Chris Robinson <[email protected]> | 2014-04-23 03:52:05 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-04-23 03:52:05 -0700 |
commit | 8fd224f84191b3d512f9ea0c44aa1104b23959d8 (patch) | |
tree | 2e5df0bb69426cd1f56d83f29020d5534d54a0f3 /Alc/backends/alsa.c | |
parent | 420599f8e37c8657fd1568aca3bcd5d1d4711234 (diff) |
Avoid forward-declaring backend vtables
Diffstat (limited to 'Alc/backends/alsa.c')
-rw-r--r-- | Alc/backends/alsa.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Alc/backends/alsa.c b/Alc/backends/alsa.c index 9d446208..53d8d8f0 100644 --- a/Alc/backends/alsa.c +++ b/Alc/backends/alsa.c @@ -398,7 +398,6 @@ typedef struct ALCplaybackAlsa { volatile int killNow; althrd_t thread; } ALCplaybackAlsa; -DECLARE_ALCBACKEND_VTABLE(ALCplaybackAlsa); static int ALCplaybackAlsa_mixerProc(void *ptr); static int ALCplaybackAlsa_mixerNoMMapProc(void *ptr); @@ -412,10 +411,13 @@ static ALCboolean ALCplaybackAlsa_start(ALCplaybackAlsa *self); static void ALCplaybackAlsa_stop(ALCplaybackAlsa *self); static DECLARE_FORWARD2(ALCplaybackAlsa, ALCbackend, ALCenum, captureSamples, void*, ALCuint) static DECLARE_FORWARD(ALCplaybackAlsa, ALCbackend, ALCuint, availableSamples) +static ALint64 ALCplaybackAlsa_getLatency(ALCplaybackAlsa *self); static DECLARE_FORWARD(ALCplaybackAlsa, ALCbackend, void, lock) static DECLARE_FORWARD(ALCplaybackAlsa, ALCbackend, void, unlock) DECLARE_DEFAULT_ALLOCATORS(ALCplaybackAlsa) +DEFINE_ALCBACKEND_VTABLE(ALCplaybackAlsa); + static void ALCplaybackAlsa_Construct(ALCplaybackAlsa *self, ALCdevice *device) { @@ -900,8 +902,6 @@ static ALint64 ALCplaybackAlsa_getLatency(ALCplaybackAlsa *self) return maxi64((ALint64)delay*1000000000/device->Frequency, 0); } -DEFINE_ALCBACKEND_VTABLE(ALCplaybackAlsa); - typedef struct ALCcaptureAlsa { DERIVE_FROM_TYPE(ALCbackend); @@ -916,7 +916,6 @@ typedef struct ALCcaptureAlsa { snd_pcm_sframes_t last_avail; } ALCcaptureAlsa; -DECLARE_ALCBACKEND_VTABLE(ALCcaptureAlsa); static void ALCcaptureAlsa_Construct(ALCcaptureAlsa *self, ALCdevice *device); static DECLARE_FORWARD(ALCcaptureAlsa, ALCbackend, void, Destruct) @@ -927,10 +926,13 @@ static ALCboolean ALCcaptureAlsa_start(ALCcaptureAlsa *self); static void ALCcaptureAlsa_stop(ALCcaptureAlsa *self); static ALCenum ALCcaptureAlsa_captureSamples(ALCcaptureAlsa *self, ALCvoid *buffer, ALCuint samples); static ALCuint ALCcaptureAlsa_availableSamples(ALCcaptureAlsa *self); +static ALint64 ALCcaptureAlsa_getLatency(ALCcaptureAlsa *self); static DECLARE_FORWARD(ALCcaptureAlsa, ALCbackend, void, lock) static DECLARE_FORWARD(ALCcaptureAlsa, ALCbackend, void, unlock) DECLARE_DEFAULT_ALLOCATORS(ALCcaptureAlsa) +DEFINE_ALCBACKEND_VTABLE(ALCcaptureAlsa); + static void ALCcaptureAlsa_Construct(ALCcaptureAlsa *self, ALCdevice *device) { @@ -1297,9 +1299,6 @@ static ALint64 ALCcaptureAlsa_getLatency(ALCcaptureAlsa *self) return maxi64((ALint64)delay*1000000000/device->Frequency, 0); } -DEFINE_ALCBACKEND_VTABLE(ALCcaptureAlsa); - - typedef struct ALCalsaBackendFactory { DERIVE_FROM_TYPE(ALCbackendFactory); |