Include mini_al directly, no separate module
This commit is contained in:
parent
e7466eb0c4
commit
944a388b1b
13 changed files with 103 additions and 41 deletions
23
src/raudio.c
23
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue