Audio: Replace SFML solution by using OpenAL directly
This is a major change in the Audio module that comes with many changes throughout the codebase and dependency list. The main gist is that we're finally nuking the last pieces of SFML from the project. sfml-audio brought with itself unneeded and big dependencies (libsndfile, libvorbisenc) while at the same time limiting the amount of audio formats mkxp can support (eg. we now get mp3 for free, and wma/midi can be implemented by extending SDL_sound directly). The increased control gained by interfacing with OpenAL directly will also allow for easy integration of a dedicated audio stretcher (librubberband), as well as enable us to implement looped ogg vorbis (via the 'LOOPSTART'/'LOOPLENGTH' tags), as required by RGSS2, in the future. The FileSystem class has had its SFML parts removed. Aditionally, audio file extensions to be supplemented are now automatically detected based on how SDL_sound was built (ie. if no mp3 support was built, mkxp won't try to look for *.mp3 files). The final used extension can be optionally returned by 'openRead' calls so SDL_sound and SDL2_image can immediately choose the right decoder. The OpenAL context is created and destroyed in main.cpp along side the GL context.
This commit is contained in:
parent
47db7165a6
commit
64f35071ab
6 changed files with 1655 additions and 634 deletions
11
mkxp.pro
11
mkxp.pro
|
@ -1,7 +1,7 @@
|
|||
|
||||
|
||||
TEMPLATE = app
|
||||
QT = core
|
||||
QT =
|
||||
TARGET = mkxp
|
||||
DEPENDPATH += src shader assets
|
||||
INCLUDEPATH += . src
|
||||
|
@ -14,9 +14,9 @@ isEmpty(BINDING) {
|
|||
CONFIG += $$BINDING
|
||||
|
||||
unix {
|
||||
CONFIG += link_pkgconfig
|
||||
PKGCONFIG += sigc++-2.0 glew pixman-1 zlib sdl2 SDL2_image SDL2_ttf sfml-audio
|
||||
LIBS += -lphysfs
|
||||
CONFIG += link_pkgconfig
|
||||
PKGCONFIG += QtCore sigc++-2.0 glew pixman-1 zlib \
|
||||
physfs sdl2 SDL2_image SDL2_ttf SDL_sound openal
|
||||
}
|
||||
|
||||
# 'slots' keyword fucks with libsigc++
|
||||
|
@ -62,7 +62,8 @@ HEADERS += \
|
|||
src/config.h \
|
||||
src/tileatlas.h \
|
||||
src/perftimer.h \
|
||||
src/sharedstate.h
|
||||
src/sharedstate.h \
|
||||
src/al-util.h
|
||||
|
||||
SOURCES += \
|
||||
src/main.cpp \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue