mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-27 06:53:01 +00:00
fix several misc issues
This commit is contained in:
parent
8ff694eb13
commit
68445435f9
9 changed files with 32 additions and 11 deletions
|
@ -25,13 +25,13 @@
|
||||||
|
|
||||||
struct SampleRateChangeEvent {
|
struct SampleRateChangeEvent {
|
||||||
double rate;
|
double rate;
|
||||||
SampleRateChangeEvent(double r):
|
explicit SampleRateChangeEvent(double r):
|
||||||
rate(r) {}
|
rate(r) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BufferSizeChangeEvent {
|
struct BufferSizeChangeEvent {
|
||||||
unsigned int bufsize;
|
unsigned int bufsize;
|
||||||
BufferSizeChangeEvent(unsigned int bs):
|
explicit BufferSizeChangeEvent(unsigned int bs):
|
||||||
bufsize(bs) {}
|
bufsize(bs) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -183,6 +183,7 @@ class TAAudio {
|
||||||
inBufs(NULL),
|
inBufs(NULL),
|
||||||
outBufs(NULL),
|
outBufs(NULL),
|
||||||
audioProcCallback(NULL),
|
audioProcCallback(NULL),
|
||||||
|
audioProcCallbackUser(NULL),
|
||||||
sampleRateChanged(NULL),
|
sampleRateChanged(NULL),
|
||||||
bufferSizeChanged(NULL),
|
bufferSizeChanged(NULL),
|
||||||
midiIn(NULL),
|
midiIn(NULL),
|
||||||
|
|
|
@ -763,16 +763,21 @@ class DivEngine {
|
||||||
totalCmds(0),
|
totalCmds(0),
|
||||||
lastCmds(0),
|
lastCmds(0),
|
||||||
cmdsPerSecond(0),
|
cmdsPerSecond(0),
|
||||||
|
globalPitch(0),
|
||||||
extValue(0),
|
extValue(0),
|
||||||
speed1(3),
|
speed1(3),
|
||||||
speed2(3),
|
speed2(3),
|
||||||
view(DIV_STATUS_NOTHING),
|
view(DIV_STATUS_NOTHING),
|
||||||
haltOn(DIV_HALT_NONE),
|
haltOn(DIV_HALT_NONE),
|
||||||
audioEngine(DIV_AUDIO_NULL),
|
audioEngine(DIV_AUDIO_NULL),
|
||||||
|
exportMode(DIV_EXPORT_MODE_ONE),
|
||||||
midiBaseChan(0),
|
midiBaseChan(0),
|
||||||
|
samp_bb(NULL),
|
||||||
samp_bbInLen(0),
|
samp_bbInLen(0),
|
||||||
samp_temp(0),
|
samp_temp(0),
|
||||||
samp_prevSample(0),
|
samp_prevSample(0),
|
||||||
|
samp_bbIn(NULL),
|
||||||
|
samp_bbOut(NULL),
|
||||||
metroTick(NULL),
|
metroTick(NULL),
|
||||||
metroTickLen(0),
|
metroTickLen(0),
|
||||||
metroFreq(0),
|
metroFreq(0),
|
||||||
|
@ -793,6 +798,17 @@ class DivEngine {
|
||||||
qsoundAMem(NULL),
|
qsoundAMem(NULL),
|
||||||
qsoundAMemLen(0),
|
qsoundAMemLen(0),
|
||||||
dpcmMem(NULL),
|
dpcmMem(NULL),
|
||||||
dpcmMemLen(0) {}
|
dpcmMemLen(0),
|
||||||
|
x1_010Mem(NULL),
|
||||||
|
x1_010MemLen(0) {
|
||||||
|
memset(isMuted,0,DIV_MAX_CHANS*sizeof(bool));
|
||||||
|
memset(keyHit,0,DIV_MAX_CHANS*sizeof(bool));
|
||||||
|
memset(dispatchChanOfChan,0,DIV_MAX_CHANS*sizeof(int));
|
||||||
|
memset(dispatchOfChan,0,DIV_MAX_CHANS*sizeof(int));
|
||||||
|
memset(sysOfChan,0,DIV_MAX_CHANS*sizeof(int));
|
||||||
|
memset(vibTable,0,64*sizeof(short));
|
||||||
|
memset(reversePitchTable,0,4096*sizeof(int));
|
||||||
|
memset(pitchTable,0,4096*sizeof(int));
|
||||||
|
}
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -876,8 +876,8 @@ DivDataErrors DivInstrument::readInsData(SafeReader& reader, short version) {
|
||||||
reader.readC(); // reserved
|
reader.readC(); // reserved
|
||||||
}
|
}
|
||||||
|
|
||||||
// more macros
|
|
||||||
if (version>=76) {
|
if (version>=76) {
|
||||||
|
// more macros
|
||||||
std.panLMacro.len=reader.readI();
|
std.panLMacro.len=reader.readI();
|
||||||
std.panRMacro.len=reader.readI();
|
std.panRMacro.len=reader.readI();
|
||||||
std.phaseResetMacro.len=reader.readI();
|
std.phaseResetMacro.len=reader.readI();
|
||||||
|
@ -922,10 +922,8 @@ DivDataErrors DivInstrument::readInsData(SafeReader& reader, short version) {
|
||||||
reader.read(std.ex6Macro.val,4*std.ex6Macro.len);
|
reader.read(std.ex6Macro.val,4*std.ex6Macro.len);
|
||||||
reader.read(std.ex7Macro.val,4*std.ex7Macro.len);
|
reader.read(std.ex7Macro.val,4*std.ex7Macro.len);
|
||||||
reader.read(std.ex8Macro.val,4*std.ex8Macro.len);
|
reader.read(std.ex8Macro.val,4*std.ex8Macro.len);
|
||||||
}
|
|
||||||
|
|
||||||
// FDS
|
// FDS
|
||||||
if (version>=76) {
|
|
||||||
fds.modSpeed=reader.readI();
|
fds.modSpeed=reader.readI();
|
||||||
fds.modDepth=reader.readI();
|
fds.modDepth=reader.readI();
|
||||||
fds.initModTableWithFirstWave=reader.readC();
|
fds.initModTableWithFirstWave=reader.readC();
|
||||||
|
|
|
@ -161,7 +161,7 @@ struct DivInstrumentMacro {
|
||||||
unsigned char len;
|
unsigned char len;
|
||||||
signed char loop;
|
signed char loop;
|
||||||
signed char rel;
|
signed char rel;
|
||||||
DivInstrumentMacro(String n, bool initOpen=false):
|
explicit DivInstrumentMacro(const String& n, bool initOpen=false):
|
||||||
name(n),
|
name(n),
|
||||||
mode(0),
|
mode(0),
|
||||||
open(initOpen),
|
open(initOpen),
|
||||||
|
|
|
@ -246,6 +246,7 @@ struct DivSample {
|
||||||
offVOX(0),
|
offVOX(0),
|
||||||
offSegaPCM(0),
|
offSegaPCM(0),
|
||||||
offQSound(0),
|
offQSound(0),
|
||||||
|
offX1_010(0),
|
||||||
samples(0) {}
|
samples(0) {}
|
||||||
~DivSample();
|
~DivSample();
|
||||||
};
|
};
|
||||||
|
|
|
@ -23,7 +23,7 @@ class FurnaceGUIFileDialog {
|
||||||
bool render(const ImVec2& min, const ImVec2& max);
|
bool render(const ImVec2& min, const ImVec2& max);
|
||||||
String getPath();
|
String getPath();
|
||||||
String getFileName();
|
String getFileName();
|
||||||
FurnaceGUIFileDialog(bool system):
|
explicit FurnaceGUIFileDialog(bool system):
|
||||||
sysDialog(system),
|
sysDialog(system),
|
||||||
opened(false),
|
opened(false),
|
||||||
saving(false),
|
saving(false),
|
||||||
|
|
|
@ -644,6 +644,9 @@ struct MIDIMap {
|
||||||
midiClock(false),
|
midiClock(false),
|
||||||
midiTimeCode(false),
|
midiTimeCode(false),
|
||||||
valueInputStyle(1),
|
valueInputStyle(1),
|
||||||
|
valueInputControlMSB(0),
|
||||||
|
valueInputControlLSB(0),
|
||||||
|
valueInputControlSingle(0),
|
||||||
volExp(1.0f),
|
volExp(1.0f),
|
||||||
valueInputCurMSB(0),
|
valueInputCurMSB(0),
|
||||||
valueInputCurLSB(0),
|
valueInputCurLSB(0),
|
||||||
|
|
|
@ -46,7 +46,9 @@ struct LogEntry {
|
||||||
bool ready;
|
bool ready;
|
||||||
LogEntry():
|
LogEntry():
|
||||||
loglevel(0),
|
loglevel(0),
|
||||||
ready(false) {}
|
ready(false) {
|
||||||
|
memset(&time,0,sizeof(struct tm));
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
int writeLog(int level, const char* msg, fmt::printf_args args);
|
int writeLog(int level, const char* msg, fmt::printf_args args);
|
||||||
|
|
|
@ -50,7 +50,7 @@ struct TAParam {
|
||||||
String desc;
|
String desc;
|
||||||
bool value;
|
bool value;
|
||||||
bool (*func)(String);
|
bool (*func)(String);
|
||||||
TAParam(String sn, String n, bool v, bool (*f)(String), String vn, String d):
|
TAParam(const String& sn, const String& n, bool v, bool (*f)(String), const String& vn, const String& d):
|
||||||
shortName(sn),
|
shortName(sn),
|
||||||
name(n),
|
name(n),
|
||||||
valName(vn),
|
valName(vn),
|
||||||
|
|
Loading…
Reference in a new issue