File: alError.h

package info (click to toggle)
openal-soft 1:1.19.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 3,580 kB
  • sloc: ansic: 49,037; cpp: 2,781; makefile: 51; sh: 36
file content (29 lines) | stat: -rw-r--r-- 807 bytes parent folder | download
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
29
#ifndef _AL_ERROR_H_
#define _AL_ERROR_H_

#include "alMain.h"
#include "logging.h"

#ifdef __cplusplus
extern "C" {
#endif

extern ALboolean TrapALError;

void alSetError(ALCcontext *context, ALenum errorCode, const char *msg, ...) DECL_FORMAT(printf, 3, 4);

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

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

#ifdef __cplusplus
}
#endif

#endif