aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include/alError.h
blob: 3dc161033130d354e3aa69ca841e88b4e42a7e52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef _AL_ERROR_H_
#define _AL_ERROR_H_

#include "alMain.h"

#ifdef __cplusplus
extern "C" {
#endif

extern ALboolean TrapALError;

ALvoid alSetError(ALCcontext *context, ALenum errorCode, ALuint objid, const char *msg);

#define SETERR_GOTO(ctx, err, objid, msg, lbl) do {                            \
    alSetError((ctx), (err), (objid), (msg));                                  \
    goto lbl;                                                                  \
} while(0)

#define SETERR_RETURN(ctx, err, objid, msg, retval) do {                       \
    alSetError((ctx), (err), (objid), (msg));                                  \
    return retval;                                                             \
} while(0)

#ifdef __cplusplus
}
#endif

#endif