diff options
| author | Ray <raysan5@gmail.com> | 2016-06-02 16:18:53 +0200 |
|---|---|---|
| committer | Ray <raysan5@gmail.com> | 2016-06-02 16:18:53 +0200 |
| commit | 7447b3e1dacf3075d8b6c20e227e6ef9e786bb1f (patch) | |
| tree | 7052da861ebbb3538749e31d08b57d4dbc9380b2 /src/raylib.h | |
| parent | 17878550b1e2dde44fcd1e668c92ca2d96680a28 (diff) | |
| parent | cf2975d062a991d69fde60c3cdc043a8a39a09dc (diff) | |
| download | raylib-7447b3e1dacf3075d8b6c20e227e6ef9e786bb1f.tar.gz raylib-7447b3e1dacf3075d8b6c20e227e6ef9e786bb1f.zip | |
Merge pull request #123 from kd7tck/develop
mod player
Diffstat (limited to 'src/raylib.h')
| -rw-r--r-- | src/raylib.h | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/src/raylib.h b/src/raylib.h index 1ef0a98e..21892d68 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -261,8 +261,9 @@ //---------------------------------------------------------------------------------- #ifndef __cplusplus // Boolean type - #ifndef true + #if !defined(_STDBOOL_H) typedef enum { false, true } bool; + #define _STDBOOL_H #endif #endif @@ -451,10 +452,29 @@ typedef struct Ray { Vector3 direction; } Ray; +typedef enum { // allows errors to be & together + ERROR_RAW_CONTEXT_CREATION = 1, + ERROR_XM_CONTEXT_CREATION = 2, + ERROR_MOD_CONTEXT_CREATION = 4, + ERROR_MIX_CHANNEL_CREATION = 8, + ERROR_MUSIC_CHANNEL_CREATION = 16, + ERROR_LOADING_XM = 32, + ERROR_LOADING_MOD = 64, + ERROR_LOADING_WAV = 128, + ERROR_LOADING_OGG = 256, + ERROR_OUT_OF_MIX_CHANNELS = 512, + ERROR_EXTENSION_NOT_RECOGNIZED = 1024, + ERROR_UNABLE_TO_OPEN_RRES_FILE = 2048, + ERROR_INVALID_RRES_FILE = 4096, + ERROR_INVALID_RRES_RESOURCE = 8192, + ERROR_UNINITIALIZED_CHANNELS = 16384 +} 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 @@ -468,6 +488,8 @@ typedef struct Wave { typedef int RawAudioContext; + + // Texture formats // NOTE: Support depends on OpenGL version and platform typedef enum { @@ -926,7 +948,7 @@ void SetMusicPitch(int index, float pitch); RawAudioContext InitRawAudioContext(int sampleRate, int channels, bool floatingPoint); void CloseRawAudioContext(RawAudioContext ctx); -int BufferRawAudioContext(RawAudioContext ctx, void *data, int numberElements); // returns number of elements buffered +int BufferRawAudioContext(RawAudioContext ctx, void *data, unsigned short numberElements); // returns number of elements buffered #ifdef __cplusplus } |
