mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-25 10:22:33 -05:00
I added audio errors
The only thing I did not change was the _g for globals. Is there any other way we can mark globals?
This commit is contained in:
20
src/audio.h
20
src/audio.h
@ -47,10 +47,29 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
ERROR_RAW_CONTEXT_CREATION = -20,
|
||||
ERROR_XM_CONTEXT_CREATION,
|
||||
ERROR_MOD_CONTEXT_CREATION,
|
||||
ERROR_MIX_CHANNEL_CREATION,
|
||||
ERROR_MUSIC_CHANNEL_CREATION,
|
||||
ERROR_LOADING_XM,
|
||||
ERROR_LOADING_MOD,
|
||||
ERROR_LOADING_WAV,
|
||||
ERROR_LOADING_OGG,
|
||||
ERROR_OUT_OF_MIX_CHANNELS,
|
||||
ERROR_EXTENSION_NOT_RECOGNIZED,
|
||||
ERROR_UNABLE_TO_OPEN_RRES_FILE,
|
||||
ERROR_INVALID_RRES_FILE,
|
||||
ERROR_INVALID_RRES_RESOURCE,
|
||||
ERROR_UNINITIALIZED_CHANNELS
|
||||
} AudioError;
|
||||
|
||||
// Sound source type
|
||||
typedef struct Sound {
|
||||
unsigned int source;
|
||||
unsigned int buffer;
|
||||
AudioError error; // if there was any error during the creation or use of this Sound
|
||||
} Sound;
|
||||
|
||||
// Wave type, defines audio wave data
|
||||
@ -64,6 +83,7 @@ typedef struct Wave {
|
||||
|
||||
typedef int RawAudioContext;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" { // Prevents name mangling of functions
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user