diff options
| author | Ray <[email protected]> | 2016-11-24 17:26:07 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2016-11-24 17:26:07 +0100 |
| commit | 17f09cb03484a408cdd50a3d2e4d6604bb1f4c70 (patch) | |
| tree | 51e909c419de9625f1beaaca44696857a600e8d5 /src/audio.c | |
| parent | 05f68c22d5c8d8f7c4254ae47700318e21709887 (diff) | |
| parent | a81dfabf863c512044b246e23aaf43489d2fa1ac (diff) | |
| download | raylib-1.6.0.tar.gz raylib-1.6.0.zip | |
Merge pull request #198 from raysan5/develop1.6.0
Develop branch integration
Diffstat (limited to 'src/audio.c')
| -rw-r--r-- | src/audio.c | 31 |
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; |
