mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-09-08 11:10:16 +00:00
This adds MIDI support to the language as a new unstable feature. There are two new metacommands that come with this: $Unstable: Midi $MidiSoundFont: [Default|"filename"] The $Unstable command is required to be able to use any of the other commands, and just signifies that this is not a full part of the language yet and may change in breaking ways before the API is finalized. The $MidiSoundFont command enables MIDI support in the compiled program, and also specifies what sound font to use to play MIDI files. "Default" will make use of the soundfont placed at './internal/support/default_soundfont.sf2', and otherwise a filename can be specified to use any soundfont wanted. In either case, the selected sound font is compiled into the executable and then loaded at runtime. Fixes: #115
31 lines
879 B
Makefile
31 lines
879 B
Makefile
|
|
MINIAUDIO_REAL_SRCS := \
|
|
audio.cpp \
|
|
miniaudio_impl.cpp
|
|
|
|
MINIAUDIO_STUB_SRCS := \
|
|
stub_audio.cpp
|
|
|
|
# We always produce both lists so that `make clean` will clean them up even
|
|
# when not passed a paticular DEP_* flag
|
|
MINIAUDIO_REAL_OBJS := $(patsubst %.cpp,$(PATH_INTERNAL_C)/parts/audio/%.o,$(MINIAUDIO_REAL_SRCS))
|
|
|
|
MINIAUDIO_STUB_OBJS := $(patsubst %.cpp,$(PATH_INTERNAL_C)/parts/audio/%.o,$(MINIAUDIO_STUB_SRCS))
|
|
|
|
ifdef DEP_AUDIO_MINIAUDIO
|
|
MINIAUDIO_OBJS := $(MINIAUDIO_REAL_OBJS) $(MA_VTABLES_OBJS) $(LIBXMP_LIB)
|
|
|
|
ifdef DEP_AUDIO_DECODE_MIDI
|
|
MINIAUDIO_OBJS += $(MIDI_MA_VTABLES_OBJS)
|
|
else
|
|
MINIAUDIO_OBJS += $(MIDI_MA_VTABLES_STUB_OBJS)
|
|
endif
|
|
|
|
else
|
|
MINIAUDIO_OBJS := $(MINIAUDIO_STUB_OBJS)
|
|
endif
|
|
|
|
$(PATH_INTERNAL_C)/parts/audio/%.o: $(PATH_INTERNAL_C)/parts/audio/%.cpp
|
|
$(CXX) $(CXXFLAGS) -Wall $< -c -o $@
|
|
|
|
CLEAN_LIST += $(MINIAUDIO_REAL_OBJS) $(MINIAUDIO_STUB_OBJS)
|