summaryrefslogtreecommitdiffhomepage
path: root/src/audio.h
diff options
context:
space:
mode:
authorvictorfisac <[email protected]>2017-03-06 09:40:04 +0100
committervictorfisac <[email protected]>2017-03-06 09:40:04 +0100
commit9261c3b8dc03d093bff5246a18ad9310ae8eaeb3 (patch)
treeaf87165723ac563ee1a7e1c605c7a4df821d74ea /src/audio.h
parente8630c78d069a1cba50b1a78108663ebc19e5b9b (diff)
parentb734802743f2089c8d649b27aea48ab71fa653b3 (diff)
downloadraylib-9261c3b8dc03d093bff5246a18ad9310ae8eaeb3.tar.gz
raylib-9261c3b8dc03d093bff5246a18ad9310ae8eaeb3.zip
Merge remote-tracking branch 'refs/remotes/raysan5/develop' into develop
Diffstat (limited to 'src/audio.h')
-rw-r--r--src/audio.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/audio.h b/src/audio.h
index 2b3c5933..01ed9f72 100644
--- a/src/audio.h
+++ b/src/audio.h
@@ -9,7 +9,7 @@
* Manage mixing channels
* Manage raw audio context
*
-* External libs:
+* DEPENDENCIES:
* OpenAL Soft - Audio device management (http://kcat.strangesoft.net/openal.html)
* stb_vorbis - OGG audio files loading (http://www.nothings.org/stb_vorbis/)
* jar_xm - XM module file loading
@@ -23,6 +23,8 @@
* Raw audio context support
*
*
+* LICENSE: zlib/libpng
+*
* Copyright (c) 2014-2016 Ramon Santamaria (@raysan5)
*
* This software is provided "as-is", without any express or implied warranty. In no event
@@ -109,13 +111,13 @@ extern "C" { // Prevents name mangling of functions
void InitAudioDevice(void); // Initialize audio device and context
void CloseAudioDevice(void); // Close the audio device and context
bool IsAudioDeviceReady(void); // Check if audio device has been initialized successfully
+void SetMasterVolume(float volume); // Set master volume (listener)
-Wave LoadWave(const char *fileName); // Load wave data from file into RAM
-Wave LoadWaveEx(float *data, int sampleCount, int sampleRate, int sampleSize, int channels); // Load wave data from float array data (32bit)
-Sound LoadSound(const char *fileName); // Load sound to memory
-Sound LoadSoundFromWave(Wave wave); // Load sound to memory from wave data
-Sound LoadSoundFromRES(const char *rresName, int resId); // Load sound to memory from rRES file (raylib Resource)
-void UpdateSound(Sound sound, void *data, int numSamples); // Update sound buffer with new data
+Wave LoadWave(const char *fileName); // Load wave data from file
+Wave LoadWaveEx(void *data, int sampleCount, int sampleRate, int sampleSize, int channels); // Load wave data from raw array data
+Sound LoadSound(const char *fileName); // Load sound from file
+Sound LoadSoundFromWave(Wave wave); // Load sound from wave data
+void UpdateSound(Sound sound, const void *data, int samplesCount); // Update sound buffer with new data
void UnloadWave(Wave wave); // Unload wave data
void UnloadSound(Sound sound); // Unload sound
void PlaySound(Sound sound); // Play a sound
@@ -139,13 +141,14 @@ void ResumeMusicStream(Music music); // Resume playin
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)
+void SetMusicLoopCount(Music music, float count); // Set music loop count (loop repeats)
float GetMusicTimeLength(Music music); // Get music time length (in seconds)
float GetMusicTimePlayed(Music music); // Get current music time played (in seconds)
AudioStream InitAudioStream(unsigned int sampleRate,
unsigned int sampleSize,
unsigned int channels); // Init audio stream (to stream raw audio pcm data)
-void UpdateAudioStream(AudioStream stream, void *data, int numSamples); // Update audio stream buffers with data
+void UpdateAudioStream(AudioStream stream, void *data, int samplesCount); // Update audio stream buffers with data
void CloseAudioStream(AudioStream stream); // Close audio stream and free memory
bool IsAudioBufferProcessed(AudioStream stream); // Check if any audio stream buffers requires refill
void PlayAudioStream(AudioStream stream); // Play audio stream