Fix effect slot struct declarations so KDevelop doesn't barf on them

This commit is contained in:
Chris Robinson
2013-10-07 05:41:41 -07:00
parent 5d014ba85f
commit 8aa237ac23
3 changed files with 17 additions and 20 deletions
+15 -16
View File
@@ -8,23 +8,21 @@
extern "C" {
#endif
typedef struct ALeffectStateFactory ALeffectStateFactory;
struct ALeffectStateVtable;
struct ALeffectslot;
typedef struct ALeffectState ALeffectState;
typedef struct ALeffectslot ALeffectslot;
typedef struct ALeffectState {
const struct ALeffectStateVtable *vtbl;
} ALeffectState;
struct ALeffectStateVtable {
ALvoid (*const Destruct)(ALeffectState *state);
ALboolean (*const deviceUpdate)(ALeffectState *state, ALCdevice *device);
ALvoid (*const update)(ALeffectState *state, ALCdevice *device, const ALeffectslot *slot);
ALvoid (*const update)(ALeffectState *state, ALCdevice *device, const struct ALeffectslot *slot);
ALvoid (*const process)(ALeffectState *state, ALuint samplesToDo, const ALfloat *restrict samplesIn, ALfloat (*restrict samplesOut)[BUFFERSIZE]);
void (*const Delete)(ALeffectState *state);
};
struct ALeffectState {
const struct ALeffectStateVtable *vtbl;
void (*const Delete)(struct ALeffectState *state);
};
#define DEFINE_ALEFFECTSTATE_VTABLE(T) \
@@ -50,14 +48,16 @@ static const struct ALeffectStateVtable T##_ALeffectState_vtable = { \
}
struct ALeffectStateFactoryVtable;
typedef struct ALeffectStateFactory {
const struct ALeffectStateFactoryVtable *vtbl;
} ALeffectStateFactory;
struct ALeffectStateFactoryVtable {
ALeffectState *(*const create)(ALeffectStateFactory *factory);
};
struct ALeffectStateFactory {
const struct ALeffectStateFactoryVtable *vtbl;
};
#define DEFINE_ALEFFECTSTATEFACTORY_VTABLE(T) \
static ALeffectState* T##_ALeffectStateFactory_create(ALeffectStateFactory *factory) \
{ return T##_create(STATIC_UPCAST(T, ALeffectStateFactory, factory)); } \
@@ -67,8 +67,7 @@ static const struct ALeffectStateFactoryVtable T##_ALeffectStateFactory_vtable =
}
struct ALeffectslot
{
typedef struct ALeffectslot {
ALenum EffectType;
ALeffectProps EffectProps;
@@ -87,7 +86,7 @@ struct ALeffectslot
/* Self ID */
ALuint id;
};
} ALeffectslot;
ALenum InitEffectSlot(ALeffectslot *slot);
+1 -2
View File
@@ -67,8 +67,7 @@ static inline ALuint FrameSizeFromFmt(enum FmtChannels chans, enum FmtType type)
}
typedef struct ALbuffer
{
typedef struct ALbuffer {
ALvoid *data;
ALsizei Frequency;
+1 -2
View File
@@ -22,8 +22,7 @@ extern const ALsizei ResamplerPadding[ResamplerMax];
extern const ALsizei ResamplerPrePadding[ResamplerMax];
typedef struct ALbufferlistitem
{
typedef struct ALbufferlistitem {
struct ALbuffer *buffer;
struct ALbufferlistitem *next;
struct ALbufferlistitem *prev;