diff options
| author | Ray <[email protected]> | 2019-02-12 12:18:01 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2019-02-12 12:18:01 +0100 |
| commit | 944a388b1bfee6048528c29719c5a78d4888bfa5 (patch) | |
| tree | 950e70cdb956484807b8221bddeabc51200858c5 /src/raudio.c | |
| parent | e7466eb0c4d2337d939cc7149e4e0eb8d5effd68 (diff) | |
| download | raylib-944a388b1bfee6048528c29719c5a78d4888bfa5.tar.gz raylib-944a388b1bfee6048528c29719c5a78d4888bfa5.zip | |
Include mini_al directly, no separate module
Diffstat (limited to 'src/raudio.c')
| -rw-r--r-- | src/raudio.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/raudio.c b/src/raudio.c index 1194e76a..53f3f25f 100644 --- a/src/raudio.c +++ b/src/raudio.c @@ -26,12 +26,12 @@ * supported by default, to remove support, just comment unrequired #define in this module * * DEPENDENCIES: -* mini_al - Audio device/context management (https://github.com/dr-soft/mini_al) -* 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 -* dr_mp3 - MP3 audio file loading +* mini_al.h - Audio device management lib (https://github.com/dr-soft/mini_al) +* stb_vorbis.h - Ogg audio files loading (http://www.nothings.org/stb_vorbis/) +* dr_mp3.h - MP3 audio file loading (https://github.com/mackron/dr_libs) +* dr_flac.h - FLAC audio file loading (https://github.com/mackron/dr_libs) +* jar_xm.h - XM module file loading +* jar_mod.h - MOD audio file loading * * CONTRIBUTORS: * David Reid (github: @mackron) (Nov. 2017): @@ -77,9 +77,12 @@ #include "utils.h" // Required for: fopen() Android mapping #endif +#define MAL_NO_SDL +#define MAL_NO_JACK +#define MAL_NO_OPENAL +#define MINI_AL_IMPLEMENTATION #include "external/mini_al.h" // mini_al audio library - // NOTE: Cannot be implement here because it conflicts with - // Win32 APIs: Rectangle, CloseWindow(), ShowCursor(), PlaySoundA() +#undef PlaySound // Win32 API: windows.h > mmsystem.h defines PlaySound macro #include <stdlib.h> // Required for: malloc(), free() #include <string.h> // Required for: strcmp(), strncmp() @@ -915,9 +918,13 @@ void ExportWaveAsCode(Wave wave, const char *fileName) fprintf(txtFile, "// //\n"); fprintf(txtFile, "//////////////////////////////////////////////////////////////////////////////////\n\n"); +#if !defined(RAUDIO_STANDALONE) // Get file name from path and convert variable name to uppercase strcpy(varFileName, GetFileNameWithoutExt(fileName)); for (int i = 0; varFileName[i] != '\0'; i++) if (varFileName[i] >= 'a' && varFileName[i] <= 'z') { varFileName[i] = varFileName[i] - 32; } +#else + strcpy(varFileName, fileName); +#endif fprintf(txtFile, "// Wave data information\n"); fprintf(txtFile, "#define %s_SAMPLE_COUNT %i\n", varFileName, wave.sampleCount); |
