fix 128 instrument song failing to read
This commit is contained in:
parent
cbc39909e4
commit
7ed1777bdc
|
@ -622,7 +622,7 @@ bool DivEngine::load(unsigned char* f, size_t slen) {
|
|||
}
|
||||
|
||||
if (ds.version>0x03) {
|
||||
ds.insLen=reader.readC();
|
||||
ds.insLen=(unsigned char)reader.readC();
|
||||
} else {
|
||||
ds.insLen=16;
|
||||
}
|
||||
|
@ -905,7 +905,7 @@ bool DivEngine::load(unsigned char* f, size_t slen) {
|
|||
}
|
||||
}
|
||||
|
||||
ds.sampleLen=reader.readC();
|
||||
ds.sampleLen=(unsigned char)reader.readC();
|
||||
logI("reading samples (%d)...\n",ds.sampleLen);
|
||||
if (ds.version<0x0b && ds.sampleLen>0) { // TODO what is this for?
|
||||
reader.readC();
|
||||
|
|
|
@ -9,6 +9,11 @@
|
|||
#include <map>
|
||||
#include <queue>
|
||||
|
||||
// TODO;
|
||||
// - prepare for multi-chip support
|
||||
// - implement the .fur format
|
||||
// - increase all 17 fields to 128 or more
|
||||
|
||||
#define DIV_VERSION "0.2.1"
|
||||
#define DIV_ENGINE_VERSION 13
|
||||
|
||||
|
@ -79,6 +84,15 @@ struct DivNoteEvent {
|
|||
on(o) {}
|
||||
};
|
||||
|
||||
struct DivDispatchContainer {
|
||||
DivDispatch* dispatch;
|
||||
blip_buffer_t* bb[2];
|
||||
size_t bbInLen;
|
||||
int temp[2], prevSample[2];
|
||||
short* bbIn[2];
|
||||
short* bbOut[2];
|
||||
};
|
||||
|
||||
class DivEngine {
|
||||
DivDispatch* dispatch;
|
||||
TAAudio* output;
|
||||
|
@ -192,6 +206,9 @@ class DivEngine {
|
|||
// get sys channel count
|
||||
int getChannelCount(DivSystem sys);
|
||||
|
||||
// TODO: get channel count
|
||||
int getTotalChannelCount();
|
||||
|
||||
// get channel type
|
||||
// - 0: FM
|
||||
// - 1: pulse
|
||||
|
|
|
@ -74,6 +74,7 @@ struct DivSong {
|
|||
unsigned char version;
|
||||
|
||||
// system
|
||||
// TODO: multi-chip support
|
||||
DivSystem system;
|
||||
|
||||
// song information
|
||||
|
|
Loading…
Reference in New Issue