Merge branch 'tildearrow:master' into guimprove
This commit is contained in:
commit
8192a8e0f6
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -6,6 +6,7 @@ release/
|
||||||
t/
|
t/
|
||||||
winbuild/
|
winbuild/
|
||||||
win32build/
|
win32build/
|
||||||
|
xpbuild/
|
||||||
macbuild/
|
macbuild/
|
||||||
linuxbuild/
|
linuxbuild/
|
||||||
*.swp
|
*.swp
|
||||||
|
|
|
||||||
|
|
@ -760,11 +760,15 @@ endif()
|
||||||
|
|
||||||
if (WITH_RENDER_DX11)
|
if (WITH_RENDER_DX11)
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
list(APPEND GUI_SOURCES src/gui/render/renderDX11.cpp)
|
if (SUPPORT_XP)
|
||||||
list(APPEND GUI_SOURCES extern/imgui_patched/backends/imgui_impl_dx11.cpp)
|
message(FATAL_ERROR "SUPPORT_XP is on. cannot enable DirectX 11 backend.")
|
||||||
list(APPEND DEPENDENCIES_DEFINES HAVE_RENDER_DX11)
|
else()
|
||||||
list(APPEND DEPENDENCIES_LIBRARIES d3d11)
|
list(APPEND GUI_SOURCES src/gui/render/renderDX11.cpp)
|
||||||
message(STATUS "UI render backend: DirectX 11")
|
list(APPEND GUI_SOURCES extern/imgui_patched/backends/imgui_impl_dx11.cpp)
|
||||||
|
list(APPEND DEPENDENCIES_DEFINES HAVE_RENDER_DX11)
|
||||||
|
list(APPEND DEPENDENCIES_LIBRARIES d3d11)
|
||||||
|
message(STATUS "UI render backend: DirectX 11")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "DirectX 11 render backend only for Windows!")
|
message(FATAL_ERROR "DirectX 11 render backend only for Windows!")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ fi
|
||||||
cd win32build
|
cd win32build
|
||||||
|
|
||||||
# TODO: potential Arch-ism?
|
# TODO: potential Arch-ism?
|
||||||
i686-w64-mingw32-cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_FLAGS="-O2" -DCMAKE_CXX_FLAGS="-O2 -Wall -Wextra -Wno-unused-parameter -Wno-cast-function-type -Werror" -DBUILD_SHARED_LIBS=OFF -DSUPPORT_XP=ON -DWITH_RENDER_DX11=ON .. || exit 1
|
i686-w64-mingw32-cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_FLAGS="-O2 -march=i686" -DCMAKE_CXX_FLAGS="-O2 -Wall -Wextra -Wno-unused-parameter -Wno-cast-function-type -march=i686" -DBUILD_SHARED_LIBS=OFF -DSUPPORT_XP=OFF -DWITH_RENDER_DX11=ON .. || exit 1
|
||||||
make -j8 || exit 1
|
make -j8 || exit 1
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
|
|
@ -34,11 +34,6 @@ cp -r ../../wavetables wavetables || exit 1
|
||||||
|
|
||||||
i686-w64-mingw32-strip -s furnace.exe || exit 1
|
i686-w64-mingw32-strip -s furnace.exe || exit 1
|
||||||
|
|
||||||
# patch to remove GetTickCount64
|
|
||||||
xxd -c 256 -ps furnace.exe | sed "s/4765745469636b436f756e743634/4765745469636b436f756e740000/g" | xxd -ps -r > furnace-patched.exe
|
|
||||||
rm furnace.exe
|
|
||||||
mv furnace-patched.exe furnace.exe
|
|
||||||
|
|
||||||
zip -r furnace.zip LICENSE.txt furnace.exe README.txt papers doc demos instruments wavetables
|
zip -r furnace.zip LICENSE.txt furnace.exe README.txt papers doc demos instruments wavetables
|
||||||
|
|
||||||
furName=$(git describe --tags | sed "s/v0/0/")
|
furName=$(git describe --tags | sed "s/v0/0/")
|
||||||
|
|
|
||||||
46
scripts/release-winxp.sh
Executable file
46
scripts/release-winxp.sh
Executable file
|
|
@ -0,0 +1,46 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# make Windows release
|
||||||
|
# this script shall be run from Arch Linux with MinGW installed!
|
||||||
|
|
||||||
|
if [ ! -e /tmp/furnace ]; then
|
||||||
|
ln -s "$PWD" /tmp/furnace || exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd /tmp/furnace
|
||||||
|
|
||||||
|
if [ ! -e xpbuild ]; then
|
||||||
|
mkdir xpbuild || exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd xpbuild
|
||||||
|
|
||||||
|
# TODO: potential Arch-ism?
|
||||||
|
i686-w64-mingw32-cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_FLAGS="-O2" -DCMAKE_CXX_FLAGS="-O2 -Wall -Wextra -Wno-unused-parameter -Wno-cast-function-type" -DBUILD_SHARED_LIBS=OFF -DSUPPORT_XP=ON -DWITH_RENDER_DX11=OFF .. || exit 1
|
||||||
|
make -j8 || exit 1
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
mkdir -p release/winxp || exit 1
|
||||||
|
cd release/winxp
|
||||||
|
|
||||||
|
cp ../../LICENSE LICENSE.txt || exit 1
|
||||||
|
cp ../../xpbuild/furnace.exe . || exit 1
|
||||||
|
cp ../../README.md README.txt || exit 1
|
||||||
|
cp -r ../../papers papers || exit 1
|
||||||
|
cp -r ../../doc doc || exit 1
|
||||||
|
cp -r ../../demos demos || exit 1
|
||||||
|
cp -r ../../instruments instruments || exit 1
|
||||||
|
cp -r ../../wavetables wavetables || exit 1
|
||||||
|
|
||||||
|
i686-w64-mingw32-strip -s furnace.exe || exit 1
|
||||||
|
|
||||||
|
# patch to remove GetTickCount64
|
||||||
|
xxd -c 256 -ps furnace.exe | sed "s/4765745469636b436f756e743634/4765745469636b436f756e740000/g" | xxd -ps -r > furnace-patched.exe
|
||||||
|
rm furnace.exe
|
||||||
|
mv furnace-patched.exe furnace.exe
|
||||||
|
|
||||||
|
zip -r furnace.zip LICENSE.txt furnace.exe README.txt papers doc demos instruments wavetables
|
||||||
|
|
||||||
|
furName=$(git describe --tags | sed "s/v0/0/")
|
||||||
|
|
||||||
|
mv furnace.zip furnace-"$furName"-win32-XP-ONLY.zip
|
||||||
|
|
@ -127,6 +127,7 @@ bool TAAudioSDL::init(TAAudioDesc& request, TAAudioDesc& response) {
|
||||||
ac.callback=taSDLProcess;
|
ac.callback=taSDLProcess;
|
||||||
ac.userdata=this;
|
ac.userdata=this;
|
||||||
|
|
||||||
|
logV("opening audio device...");
|
||||||
ai=SDL_OpenAudioDevice(request.deviceName.empty()?NULL:request.deviceName.c_str(),0,&ac,&ar,0);
|
ai=SDL_OpenAudioDevice(request.deviceName.empty()?NULL:request.deviceName.c_str(),0,&ac,&ar,0);
|
||||||
if (ai==0) {
|
if (ai==0) {
|
||||||
logE("could not open audio device: %s",SDL_GetError());
|
logE("could not open audio device: %s",SDL_GetError());
|
||||||
|
|
@ -147,6 +148,8 @@ bool TAAudioSDL::init(TAAudioDesc& request, TAAudioDesc& response) {
|
||||||
desc.bufsize=ar.samples;
|
desc.bufsize=ar.samples;
|
||||||
desc.fragments=1;
|
desc.fragments=1;
|
||||||
|
|
||||||
|
logV("got info: %d channels, %d bufsize",desc.outChans,desc.bufsize);
|
||||||
|
|
||||||
if (desc.outChans>0) {
|
if (desc.outChans>0) {
|
||||||
outBufs=new float*[desc.outChans];
|
outBufs=new float*[desc.outChans];
|
||||||
for (int i=0; i<desc.outChans; i++) {
|
for (int i=0; i<desc.outChans; i++) {
|
||||||
|
|
|
||||||
|
|
@ -3216,6 +3216,7 @@ void DivEngine::rescanAudioDevices() {
|
||||||
|
|
||||||
void DivEngine::initDispatch(bool isRender) {
|
void DivEngine::initDispatch(bool isRender) {
|
||||||
BUSY_BEGIN;
|
BUSY_BEGIN;
|
||||||
|
logV("initializing dispatch...");
|
||||||
if (isRender) logI("render cores set");
|
if (isRender) logI("render cores set");
|
||||||
for (int i=0; i<song.systemLen; i++) {
|
for (int i=0; i<song.systemLen; i++) {
|
||||||
disCont[i].init(song.system[i],this,getChannelCount(song.system[i]),got.rate,song.systemFlags[i],isRender);
|
disCont[i].init(song.system[i],this,getChannelCount(song.system[i]),got.rate,song.systemFlags[i],isRender);
|
||||||
|
|
@ -3233,6 +3234,7 @@ void DivEngine::initDispatch(bool isRender) {
|
||||||
|
|
||||||
void DivEngine::quitDispatch() {
|
void DivEngine::quitDispatch() {
|
||||||
BUSY_BEGIN;
|
BUSY_BEGIN;
|
||||||
|
logV("terminating dispatch...");
|
||||||
for (int i=0; i<song.systemLen; i++) {
|
for (int i=0; i<song.systemLen; i++) {
|
||||||
disCont[i].quit();
|
disCont[i].quit();
|
||||||
}
|
}
|
||||||
|
|
@ -3338,6 +3340,7 @@ bool DivEngine::initAudioBackend() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logV("listing audio devices");
|
||||||
audioDevs=output->listAudioDevices();
|
audioDevs=output->listAudioDevices();
|
||||||
|
|
||||||
want.deviceName=getConfString("audioDevice","");
|
want.deviceName=getConfString("audioDevice","");
|
||||||
|
|
@ -3352,8 +3355,10 @@ bool DivEngine::initAudioBackend() {
|
||||||
if (want.outChans<1) want.outChans=1;
|
if (want.outChans<1) want.outChans=1;
|
||||||
if (want.outChans>16) want.outChans=16;
|
if (want.outChans>16) want.outChans=16;
|
||||||
|
|
||||||
|
logV("setting callback");
|
||||||
output->setCallback(process,this);
|
output->setCallback(process,this);
|
||||||
|
|
||||||
|
logV("calling init");
|
||||||
if (!output->init(want,got)) {
|
if (!output->init(want,got)) {
|
||||||
logE("error while initializing audio!");
|
logE("error while initializing audio!");
|
||||||
delete output;
|
delete output;
|
||||||
|
|
@ -3362,6 +3367,7 @@ bool DivEngine::initAudioBackend() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logV("allocating oscBuf...");
|
||||||
for (int i=0; i<got.outChans; i++) {
|
for (int i=0; i<got.outChans; i++) {
|
||||||
if (oscBuf[i]==NULL) {
|
if (oscBuf[i]==NULL) {
|
||||||
oscBuf[i]=new float[32768];
|
oscBuf[i]=new float[32768];
|
||||||
|
|
@ -3369,6 +3375,7 @@ bool DivEngine::initAudioBackend() {
|
||||||
memset(oscBuf[i],0,32768*sizeof(float));
|
memset(oscBuf[i],0,32768*sizeof(float));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logI("initializing MIDI.");
|
||||||
if (output->initMidi(false)) {
|
if (output->initMidi(false)) {
|
||||||
midiIns=output->midiIn->listDevices();
|
midiIns=output->midiIn->listDevices();
|
||||||
midiOuts=output->midiOut->listDevices();
|
midiOuts=output->midiOut->listDevices();
|
||||||
|
|
@ -3400,6 +3407,7 @@ bool DivEngine::initAudioBackend() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logV("initAudioBackend done");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3443,6 +3451,13 @@ void DivEngine::preInit() {
|
||||||
logI("Furnace version " DIV_VERSION ".");
|
logI("Furnace version " DIV_VERSION ".");
|
||||||
|
|
||||||
loadConf();
|
loadConf();
|
||||||
|
|
||||||
|
#ifdef HAVE_SDL2
|
||||||
|
String audioDriver=getConfString("sdlAudioDriver","");
|
||||||
|
if (!audioDriver.empty()) {
|
||||||
|
SDL_SetHint("SDL_HINT_AUDIODRIVER",audioDriver.c_str());
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DivEngine::init() {
|
bool DivEngine::init() {
|
||||||
|
|
@ -3480,6 +3495,8 @@ bool DivEngine::init() {
|
||||||
haveAudio=true;
|
haveAudio=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logV("creating blip_buf");
|
||||||
|
|
||||||
samp_bb=blip_new(32768);
|
samp_bb=blip_new(32768);
|
||||||
if (samp_bb==NULL) {
|
if (samp_bb==NULL) {
|
||||||
logE("not enough memory!");
|
logE("not enough memory!");
|
||||||
|
|
@ -3493,6 +3510,8 @@ bool DivEngine::init() {
|
||||||
|
|
||||||
metroBuf=new float[8192];
|
metroBuf=new float[8192];
|
||||||
metroBufLen=8192;
|
metroBufLen=8192;
|
||||||
|
|
||||||
|
logV("setting blip rate of samp_bb (%f)",got.rate);
|
||||||
|
|
||||||
blip_set_rates(samp_bb,44100,got.rate);
|
blip_set_rates(samp_bb,44100,got.rate);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -206,7 +206,7 @@ void DivPlatformTX81Z::tick(bool sysTick) {
|
||||||
|
|
||||||
if (chan[i].std.alg.had) {
|
if (chan[i].std.alg.had) {
|
||||||
chan[i].state.alg=chan[i].std.alg.val;
|
chan[i].state.alg=chan[i].std.alg.val;
|
||||||
immWrite(chanOffs[i]+ADDR_LR_FB_ALG,(chan[i].state.alg&7)|(chan[i].state.fb<<3)|(chan[i].active?0:0x40)|(chan[i].chVolR<<7));
|
immWrite(chanOffs[i]+ADDR_LR_FB_ALG,(chan[i].state.alg&7)|(chan[i].state.fb<<3)|(chan[i].active?0x40:0)|(chan[i].chVolR<<7));
|
||||||
if (!parent->song.algMacroBehavior) for (int j=0; j<4; j++) {
|
if (!parent->song.algMacroBehavior) for (int j=0; j<4; j++) {
|
||||||
unsigned short baseAddr=chanOffs[i]|opOffs[j];
|
unsigned short baseAddr=chanOffs[i]|opOffs[j];
|
||||||
DivInstrumentFM::Operator& op=chan[i].state.op[j];
|
DivInstrumentFM::Operator& op=chan[i].state.op[j];
|
||||||
|
|
@ -223,7 +223,7 @@ void DivPlatformTX81Z::tick(bool sysTick) {
|
||||||
}
|
}
|
||||||
if (chan[i].std.fb.had) {
|
if (chan[i].std.fb.had) {
|
||||||
chan[i].state.fb=chan[i].std.fb.val;
|
chan[i].state.fb=chan[i].std.fb.val;
|
||||||
immWrite(chanOffs[i]+ADDR_LR_FB_ALG,(chan[i].state.alg&7)|(chan[i].state.fb<<3)|(chan[i].active?0:0x40)|(chan[i].chVolR<<7));
|
immWrite(chanOffs[i]+ADDR_LR_FB_ALG,(chan[i].state.alg&7)|(chan[i].state.fb<<3)|(chan[i].active?0x40:0)|(chan[i].chVolR<<7));
|
||||||
}
|
}
|
||||||
if (chan[i].std.fms.had) {
|
if (chan[i].std.fms.had) {
|
||||||
chan[i].state.fms=chan[i].std.fms.val;
|
chan[i].state.fms=chan[i].std.fms.val;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue