diff options
| author | Joshua Reisenauer <[email protected]> | 2016-06-02 02:02:23 -0700 |
|---|---|---|
| committer | Joshua Reisenauer <[email protected]> | 2016-06-02 02:02:23 -0700 |
| commit | af1eb5453acc2772afbc316375c403b31a742626 (patch) | |
| tree | 4b31da2716256f952e833d37d002db346bf85ae5 /src/audio.h | |
| parent | 05f8e83ba970c45c40df570510e82b30e2b92687 (diff) | |
| download | raylib-af1eb5453acc2772afbc316375c403b31a742626.tar.gz raylib-af1eb5453acc2772afbc316375c403b31a742626.zip | |
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?
Diffstat (limited to 'src/audio.h')
| -rw-r--r-- | src/audio.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/audio.h b/src/audio.h index ca56032e..4baa30df 100644 --- a/src/audio.h +++ b/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 |
