diff options
| author | raysan5 <raysan5@gmail.com> | 2016-08-01 12:49:17 +0200 |
|---|---|---|
| committer | raysan5 <raysan5@gmail.com> | 2016-08-01 12:49:17 +0200 |
| commit | 02c456432d7f284c41519f6d540ad6c4dfb4a065 (patch) | |
| tree | 2c59dab7bc67e2ae7164d942535bd3d77f3809cf /src/raylib.h | |
| parent | a61b832c4ad976ab083cfebf8039149c2a7022f8 (diff) | |
| download | raylib-02c456432d7f284c41519f6d540ad6c4dfb4a065.tar.gz raylib-02c456432d7f284c41519f6d540ad6c4dfb4a065.zip | |
Complete review of audio system
Still some work left...
Diffstat (limited to 'src/raylib.h')
| -rw-r--r-- | src/raylib.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/raylib.h b/src/raylib.h index 1966f75e..f8dd8359 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -478,10 +478,9 @@ typedef struct Wave { short channels; } Wave; -typedef struct MusicBuffer { - char *fileName; - int index; // index in musicStreams -} MusicBuffer; +// Music type (file streaming from memory) +// NOTE: Anything longer than ~10 seconds should be streamed +typedef struct Music *Music; // Texture formats // NOTE: Support depends on OpenGL version and platform @@ -897,23 +896,24 @@ Sound LoadSoundFromRES(const char *rresName, int resId); // Load sound to void UnloadSound(Sound sound); // Unload sound void PlaySound(Sound sound); // Play a sound void PauseSound(Sound sound); // Pause a sound +void ResumeSound(Sound sound); // Resume a paused sound void StopSound(Sound sound); // Stop playing a sound bool IsSoundPlaying(Sound sound); // Check if a sound is currently playing 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) -MusicBuffer LoadMusicBufferStream(char *fileName, int index); -int PlayMusicStream(MusicBuffer buffer); // Start music playing (open stream) -void UpdateMusicStream(MusicBuffer buffer); // Updates buffers for music streaming -void StopMusicStream(MusicBuffer buffer); // Stop music playing (close stream) -void PauseMusicStream(MusicBuffer buffer); // Pause music playing -void ResumeMusicStream(MusicBuffer buffer); // Resume playing paused music -bool IsMusicPlaying(MusicBuffer buffer); // Check if music is playing -void SetMusicVolume(MusicBuffer buffer, float volume); // Set volume for music (1.0 is max level) -void SetMusicPitch(MusicBuffer buffer, float pitch); // Set pitch for a music (1.0 is base level) -float GetMusicTimeLength(MusicBuffer buffer); // Get music time length (in seconds) -float GetMusicTimePlayed(MusicBuffer buffer); // Get current music time played (in seconds) -int GetMusicStreamCount(void); // Get number of streams loaded +Music LoadMusicStream(char *fileName); // Load music stream from file +void UnloadMusicStream(Music music); // Unload music stream +void PlayMusicStream(Music music); // Start music playing (open stream) +void UpdateMusicStream(Music music); // Updates buffers for music streaming +void StopMusicStream(Music music); // Stop music playing (close stream) +void PauseMusicStream(Music music); // Pause music playing +void ResumeMusicStream(Music music); // Resume playing paused music +bool IsMusicPlaying(Music music); // Check if music is playing +void SetMusicVolume(Music music, float volume); // Set volume for music (1.0 is max level) +void SetMusicPitch(Music music, float pitch); // Set pitch for a music (1.0 is base level) +float GetMusicTimeLength(Music music); // Get music time length (in seconds) +float GetMusicTimePlayed(Music music); // Get current music time played (in seconds) #ifdef __cplusplus } |
