summaryrefslogtreecommitdiffhomepage
path: root/src/audio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio.c')
-rw-r--r--src/audio.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/audio.c b/src/audio.c
index 3684e10a..49aca4b0 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -2,18 +2,22 @@
*
* raylib.audio
*
-* Basic functions to manage Audio:
+* This module provides basic functionality to work with audio:
* Manage audio device (init/close)
-* Load and Unload audio files
+* Load and Unload audio files (WAV, OGG, FLAC, XM, MOD)
* Play/Stop/Pause/Resume loaded audio
* Manage mixing channels
* Manage raw audio context
*
-* Uses external lib:
-* OpenAL Soft - Audio device management lib (http://kcat.strangesoft.net/openal.html)
-* stb_vorbis - Ogg audio files loading (http://www.nothings.org/stb_vorbis/)
-* jar_xm - XM module file loading
-* jar_mod - MOD audio file loading
+* External libs:
+* 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
+* jar_mod - MOD audio file loading
+* dr_flac - FLAC audio file loading
+*
+* Module Configuration Flags:
+* AUDIO_STANDALONE - Use this module as standalone library (independently of raylib)
*
* Many thanks to Joshua Reisenauer (github: @kd7tck) for the following additions:
* XM audio module support (jar_xm)
@@ -21,6 +25,7 @@
* Mixing channels support
* Raw audio context support
*
+*
* Copyright (c) 2014-2016 Ramon Santamaria (@raysan5)
*
* This software is provided "as-is", without any express or implied warranty. In no event
@@ -44,8 +49,11 @@
#if defined(AUDIO_STANDALONE)
#include "audio.h"
+ #include <stdarg.h> // Required for: va_list, va_start(), vfprintf(), va_end()
#else
#include "raylib.h"
+ #include "utils.h" // Required for: DecompressData()
+ // NOTE: Includes Android fopen() function map
#endif
#include "AL/al.h" // OpenAL basic header
@@ -63,13 +71,6 @@
#define AL_FORMAT_STEREO_FLOAT32 0x10011
#endif
-#if defined(AUDIO_STANDALONE)
- #include <stdarg.h> // Required for: va_list, va_start(), vfprintf(), va_end()
-#else
- #include "utils.h" // Required for: DecompressData()
- // NOTE: Includes Android fopen() function map
-#endif
-
//#define STB_VORBIS_HEADER_ONLY
#include "external/stb_vorbis.h" // OGG loading functions
@@ -117,7 +118,7 @@ typedef struct MusicData {
bool loop; // Repeat music after finish (loop)
unsigned int totalSamples; // Total number of samples
unsigned int samplesLeft; // Number of samples left to end
-} MusicData, *Music;
+} MusicData;
#if defined(AUDIO_STANDALONE)
typedef enum { INFO = 0, ERROR, WARNING, DEBUG, OTHER } TraceLogType;