aboutsummaryrefslogtreecommitdiff
path: root/src/audio.h
diff options
context:
space:
mode:
authorTeodor Stoenescu <demonu.ro@gmail.com>2016-08-31 09:32:08 +0300
committerTeodor Stoenescu <demonu.ro@gmail.com>2016-08-31 09:32:08 +0300
commit384602e5b59bf67e2e7b5e6dd40bf78c32a5bb21 (patch)
tree149981ded9aa340fa208c8aa913351d3cb3f8067 /src/audio.h
parentd0cf19e03559eb5cd60035d54d4ca7b5991344b8 (diff)
parentbe97583f00997fa918a15d0164190ae6876d0571 (diff)
downloadraylib-384602e5b59bf67e2e7b5e6dd40bf78c32a5bb21.tar.gz
raylib-384602e5b59bf67e2e7b5e6dd40bf78c32a5bb21.zip
Merge remote-tracking branch 'upstream/develop' into develop
Diffstat (limited to 'src/audio.h')
-rw-r--r--src/audio.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/audio.h b/src/audio.h
index dbd88939..923492ca 100644
--- a/src/audio.h
+++ b/src/audio.h
@@ -68,11 +68,11 @@ typedef struct Sound {
// Wave type, defines audio wave data
typedef struct Wave {
+ unsigned int sampleCount; // Number of samples
+ unsigned int sampleRate; // Frequency (samples per second)
+ unsigned int sampleSize; // Bit depth (bits per sample): 8, 16, 32 (24 not supported)
+ unsigned int channels; // Number of channels (1-mono, 2-stereo)
void *data; // Buffer data pointer
- unsigned int dataSize; // Data size in bytes
- unsigned int sampleRate; // Samples per second to be played
- short bitsPerSample; // Sample size in bits
- short channels;
} Wave;
// Music type (file streaming from memory)
@@ -110,6 +110,7 @@ bool IsAudioDeviceReady(void); // Check if audi
Sound LoadSound(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
void UnloadSound(Sound sound); // Unload sound
void PlaySound(Sound sound); // Play a sound
void PauseSound(Sound sound); // Pause a sound