mirror of
https://github.com/tildearrow/furnace.git
synced 2025-01-07 08:01:20 +00:00
what is going on
This commit is contained in:
parent
bd92347950
commit
76746dcb28
3 changed files with 23 additions and 1 deletions
|
@ -15,7 +15,7 @@ fi
|
|||
cd win32build
|
||||
|
||||
# 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=OFF -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
|
||||
|
||||
cd ..
|
||||
|
|
|
@ -127,6 +127,7 @@ bool TAAudioSDL::init(TAAudioDesc& request, TAAudioDesc& response) {
|
|||
ac.callback=taSDLProcess;
|
||||
ac.userdata=this;
|
||||
|
||||
logV("opening audio device...");
|
||||
ai=SDL_OpenAudioDevice(request.deviceName.empty()?NULL:request.deviceName.c_str(),0,&ac,&ar,0);
|
||||
if (ai==0) {
|
||||
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.fragments=1;
|
||||
|
||||
logV("got info: %d channels, %d bufsize",desc.outChans,desc.bufsize);
|
||||
|
||||
if (desc.outChans>0) {
|
||||
outBufs=new float*[desc.outChans];
|
||||
for (int i=0; i<desc.outChans; i++) {
|
||||
|
|
|
@ -3216,6 +3216,7 @@ void DivEngine::rescanAudioDevices() {
|
|||
|
||||
void DivEngine::initDispatch(bool isRender) {
|
||||
BUSY_BEGIN;
|
||||
logV("initializing dispatch...");
|
||||
if (isRender) logI("render cores set");
|
||||
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);
|
||||
|
@ -3233,6 +3234,7 @@ void DivEngine::initDispatch(bool isRender) {
|
|||
|
||||
void DivEngine::quitDispatch() {
|
||||
BUSY_BEGIN;
|
||||
logV("terminating dispatch...");
|
||||
for (int i=0; i<song.systemLen; i++) {
|
||||
disCont[i].quit();
|
||||
}
|
||||
|
@ -3338,6 +3340,7 @@ bool DivEngine::initAudioBackend() {
|
|||
return false;
|
||||
}
|
||||
|
||||
logV("listing audio devices");
|
||||
audioDevs=output->listAudioDevices();
|
||||
|
||||
want.deviceName=getConfString("audioDevice","");
|
||||
|
@ -3352,8 +3355,10 @@ bool DivEngine::initAudioBackend() {
|
|||
if (want.outChans<1) want.outChans=1;
|
||||
if (want.outChans>16) want.outChans=16;
|
||||
|
||||
logV("setting callback");
|
||||
output->setCallback(process,this);
|
||||
|
||||
logV("calling init");
|
||||
if (!output->init(want,got)) {
|
||||
logE("error while initializing audio!");
|
||||
delete output;
|
||||
|
@ -3362,6 +3367,7 @@ bool DivEngine::initAudioBackend() {
|
|||
return false;
|
||||
}
|
||||
|
||||
logV("allocating oscBuf...");
|
||||
for (int i=0; i<got.outChans; i++) {
|
||||
if (oscBuf[i]==NULL) {
|
||||
oscBuf[i]=new float[32768];
|
||||
|
@ -3369,6 +3375,7 @@ bool DivEngine::initAudioBackend() {
|
|||
memset(oscBuf[i],0,32768*sizeof(float));
|
||||
}
|
||||
|
||||
logI("initializing MIDI.");
|
||||
if (output->initMidi(false)) {
|
||||
midiIns=output->midiIn->listDevices();
|
||||
midiOuts=output->midiOut->listDevices();
|
||||
|
@ -3400,6 +3407,7 @@ bool DivEngine::initAudioBackend() {
|
|||
}
|
||||
}
|
||||
|
||||
logV("initAudioBackend done");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -3443,6 +3451,13 @@ void DivEngine::preInit() {
|
|||
logI("Furnace version " DIV_VERSION ".");
|
||||
|
||||
loadConf();
|
||||
|
||||
#ifdef HAVE_SDL2
|
||||
String audioDriver=getConfString("sdlAudioDriver","");
|
||||
if (!audioDriver.empty()) {
|
||||
SDL_SetHint("SDL_HINT_AUDIODRIVER",audioDriver.c_str());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool DivEngine::init() {
|
||||
|
@ -3480,6 +3495,8 @@ bool DivEngine::init() {
|
|||
haveAudio=true;
|
||||
}
|
||||
|
||||
logV("creating blip_buf");
|
||||
|
||||
samp_bb=blip_new(32768);
|
||||
if (samp_bb==NULL) {
|
||||
logE("not enough memory!");
|
||||
|
@ -3493,6 +3510,8 @@ bool DivEngine::init() {
|
|||
|
||||
metroBuf=new float[8192];
|
||||
metroBufLen=8192;
|
||||
|
||||
logV("setting blip rate of samp_bb (%f)",got.rate);
|
||||
|
||||
blip_set_rates(samp_bb,44100,got.rate);
|
||||
|
||||
|
|
Loading…
Reference in a new issue