Browse Source

Use stb_vorbis.h as header only

pull/708/head
Ray 6 years ago
parent
commit
4ec4dc691f
12 changed files with 5120 additions and 5122 deletions
  1. +1
    -1
      examples/others/audio_standalone.c
  2. +2
    -2
      projects/Geany/raylib_compile_sources.bat
  3. BIN
      projects/Notepad++/npes_saved_mingw.txt
  4. BIN
      projects/Notepad++/npes_saved_tcc.txt
  5. +0
    -1
      projects/VS2015.UWP/raylib/raylib.vcxproj
  6. +0
    -1
      projects/VS2015/raylib/raylib.vcxproj
  7. +0
    -1
      projects/VS2017/raylib/raylib.vcxproj
  8. +1
    -2
      src/CMakeLists.txt
  9. +2
    -7
      src/Makefile
  10. +1
    -1
      src/audio.c
  11. +0
    -5074
      src/external/stb_vorbis.c
  12. +5113
    -32
      src/external/stb_vorbis.h

+ 1
- 1
examples/others/audio_standalone.c View File

@ -6,7 +6,7 @@
*
* DEPENDENCIES:
* mini_al.h - Audio device management lib (http://kcat.strangesoft.net/openal.html)
* stb_vorbis.c - Ogg audio files loading (http://www.nothings.org/stb_vorbis/)
* stb_vorbis.h - Ogg audio files loading (http://www.nothings.org/stb_vorbis/)
* jar_xm.h - XM module file loading
* jar_mod.h - MOD audio file loading
* dr_flac.h - FLAC audio file loading

+ 2
- 2
projects/Geany/raylib_compile_sources.bat View File

@ -24,13 +24,13 @@ gcc -O2 -c textures.c -std=c99 -Wall -DPLATFORM_DESKTOP
gcc -O2 -c text.c -std=c99 -Wall -DPLATFORM_DESKTOP
gcc -O2 -c models.c -std=c99 -Wall -DPLATFORM_DESKTOP
gcc -O2 -c audio.c -std=c99 -Wall -DPLATFORM_DESKTOP
gcc -O2 -c external/stb_vorbis.c -Wall -I.
gcc -O2 -c external/mini_al.c -Wall -I.
gcc -O2 -c utils.c -std=c99 -Wall -DPLATFORM_DESKTOP
:: .
:: . > Generate raylib library
:: ------------------------------
ar rcs libraylib.a core.o rglfw.o shapes.o textures.o text.o models.o audio.o mini_al.o stb_vorbis.o utils.o
ar rcs libraylib.a core.o rglfw.o shapes.o textures.o text.o models.o audio.o mini_al.o utils.o
:: .
:: > Installing raylib library
:: -----------------------------

BIN
projects/Notepad++/npes_saved_mingw.txt View File


BIN
projects/Notepad++/npes_saved_tcc.txt View File


+ 0
- 1
projects/VS2015.UWP/raylib/raylib.vcxproj View File

@ -153,7 +153,6 @@
<ItemGroup>
<ClCompile Include="..\..\..\src\audio.c" />
<ClCompile Include="..\..\..\src\core.c" />
<ClCompile Include="..\..\..\src\external\stb_vorbis.c" />
<ClCompile Include="..\..\..\src\models.c" />
<ClCompile Include="..\..\..\src\shapes.c" />
<ClCompile Include="..\..\..\src\text.c" />

+ 0
- 1
projects/VS2015/raylib/raylib.vcxproj View File

@ -235,7 +235,6 @@
<ClCompile Include="..\..\..\src\audio.c" />
<ClCompile Include="..\..\..\src\core.c" />
<ClCompile Include="..\..\..\src\external\mini_al.c" />
<ClCompile Include="..\..\..\src\external\stb_vorbis.c" />
<ClCompile Include="..\..\..\src\models.c" />
<ClCompile Include="..\..\..\src\rglfw.c" />
<ClCompile Include="..\..\..\src\shapes.c" />

+ 0
- 1
projects/VS2017/raylib/raylib.vcxproj View File

@ -162,7 +162,6 @@
<ClCompile Include="..\..\..\src\audio.c" />
<ClCompile Include="..\..\..\src\core.c" />
<ClCompile Include="..\..\..\src\external\mini_al.c" />
<ClCompile Include="..\..\..\src\external\stb_vorbis.c" />
<ClCompile Include="..\..\..\src\models.c" />
<ClCompile Include="..\..\..\src\rglfw.c" />
<ClCompile Include="..\..\..\src\shapes.c" />

+ 1
- 2
src/CMakeLists.txt View File

@ -47,8 +47,7 @@ add_definitions("-DRAYLIB_CMAKE=1")
if(USE_AUDIO)
file(GLOB mini_al external/mini_al.c)
MESSAGE(STATUS "Audio Backend: mini_al")
file(GLOB stb_vorbis external/stb_vorbis.c)
set(sources ${raylib_sources} ${mini_al} ${stb_vorbis})
set(sources ${raylib_sources} ${mini_al})
else()
MESSAGE(STATUS "Audio Backend: None (-DUSE_AUDIO=OFF)")
set(INCLUDE_AUDIO_MODULE 0)

+ 2
- 7
src/Makefile View File

@ -404,7 +404,6 @@ endif
ifeq ($(INCLUDE_AUDIO_MODULE),TRUE)
OBJS += audio.o
OBJS += stb_vorbis.o
OBJS += mini_al.o
endif
@ -537,10 +536,6 @@ audio.o : audio.c raylib.h
mini_al.o : external/mini_al.c external/mini_al.h
$(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS) -D$(PLATFORM)
# Compile stb_vorbis library
stb_vorbis.o: external/stb_vorbis.c external/stb_vorbis.h
$(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS) -D$(PLATFORM)
# Compile utils module
utils.o : utils.c utils.h
$(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS) -D$(PLATFORM)
@ -628,9 +623,9 @@ endif
# Clean everything
clean:
ifeq ($(PLATFORM_OS),WINDOWS)
del *.o $(RAYLIB_RELEASE_PATH)/libraylib.a $(RAYLIB_RELEASE_PATH)/libraylib.bc $(RAYLIB_RELEASE_PATH)/libraylib.so external/stb_vorbis.o
del *.o $(RAYLIB_RELEASE_PATH)/libraylib.a $(RAYLIB_RELEASE_PATH)/libraylib.bc $(RAYLIB_RELEASE_PATH)/libraylib.so
else
rm -fv *.o $(RAYLIB_RELEASE_PATH)/libraylib.a $(RAYLIB_RELEASE_PATH)/libraylib.bc $(RAYLIB_RELEASE_PATH)/libraylib.so* external/stb_vorbis.o
rm -fv *.o $(RAYLIB_RELEASE_PATH)/libraylib.a $(RAYLIB_RELEASE_PATH)/libraylib.bc $(RAYLIB_RELEASE_PATH)/libraylib.so*
endif
ifeq ($(PLATFORM),PLATFORM_ANDROID)
rm -rf $(ANDROID_TOOLCHAIN)

+ 1
- 1
src/audio.c View File

@ -91,7 +91,7 @@
#include <stdio.h> // Required for: FILE, fopen(), fclose(), fread()
#if defined(SUPPORT_FILEFORMAT_OGG)
o">//#define STB_VORBIS_HEADER_ONLY
cp">#define STB_VORBIS_IMPLEMENTATION
#include "external/stb_vorbis.h" // OGG loading functions
#endif

+ 0
- 5074
src/external/stb_vorbis.c
File diff suppressed because it is too large
View File


+ 5113
- 32
src/external/stb_vorbis.h
File diff suppressed because it is too large
View File


Loading…
Cancel
Save