diff options
| author | victorfisac <victorfisac@gmail.com> | 2016-06-07 23:41:34 +0200 |
|---|---|---|
| committer | victorfisac <victorfisac@gmail.com> | 2016-06-07 23:41:34 +0200 |
| commit | f97f39987c1b35205eb6824d017a1c288ce64a2d (patch) | |
| tree | 843d8839997deb76b541579b0aa6591a6753108d /src/audio.h | |
| parent | 11cf455fe0d2c956043aa70f7d8256c4a339b430 (diff) | |
| parent | 5631f822bd9195d494915d3b2bb80caf47a65068 (diff) | |
| download | raylib-f97f39987c1b35205eb6824d017a1c288ce64a2d.tar.gz raylib-f97f39987c1b35205eb6824d017a1c288ce64a2d.zip | |
Merge remote-tracking branch 'refs/remotes/raysan5/develop' into develop
Diffstat (limited to 'src/audio.h')
| -rw-r--r-- | src/audio.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/audio.h b/src/audio.h index 1140a60a..fe72d866 100644 --- a/src/audio.h +++ b/src/audio.h @@ -41,8 +41,9 @@ //---------------------------------------------------------------------------------- #ifndef __cplusplus // Boolean type - #ifndef true + #if !defined(_STDBOOL_H) typedef enum { false, true } bool; + #define _STDBOOL_H #endif #endif @@ -50,6 +51,7 @@ 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 @@ -63,6 +65,7 @@ typedef struct Wave { typedef int RawAudioContext; + #ifdef __cplusplus extern "C" { // Prevents name mangling of functions #endif @@ -90,7 +93,7 @@ bool IsSoundPlaying(Sound sound); // Check if a so void SetSoundVolume(Sound sound, float volume); // Set volume for a sound (1.0 is max level) void SetSoundPitch(Sound sound, float pitch); // Set pitch for a sound (1.0 is base level) -int PlayMusicStream(int musicIndex, char *fileName); // Start music playing (open stream) +int PlayMusicStream(int index, char *fileName); // Start music playing (open stream) void UpdateMusicStream(int index); // Updates buffers for music streaming void StopMusicStream(int index); // Stop music playing (close stream) void PauseMusicStream(int index); // Pause music playing @@ -99,7 +102,7 @@ bool IsMusicPlaying(int index); // Check if musi void SetMusicVolume(int index, float volume); // Set volume for music (1.0 is max level) float GetMusicTimeLength(int index); // Get music time length (in seconds) float GetMusicTimePlayed(int index); // Get current music time played (in seconds) -int getMusicStreamCount(void); +int GetMusicStreamCount(void); void SetMusicPitch(int index, float pitch); // used to output raw audio streams, returns negative numbers on error @@ -107,7 +110,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 } |
