game boy progress, part 1
noise and wave channels don't play correctly yet
This commit is contained in:
parent
c78cc8c676
commit
a1ab7c5d57
6 changed files with 66 additions and 10 deletions
|
|
@ -188,6 +188,11 @@ bool DivEngine::load(void* f, size_t slen) {
|
|||
try {
|
||||
DivSong ds;
|
||||
|
||||
ds.nullWave.len=32;
|
||||
for (int i=0; i<32; i++) {
|
||||
ds.nullWave.data[i]=15;
|
||||
}
|
||||
|
||||
if (!reader.seek(16,SEEK_SET)) {
|
||||
logE("premature end of file!");
|
||||
return false;
|
||||
|
|
@ -645,6 +650,11 @@ DivInstrument* DivEngine::getIns(int index) {
|
|||
return song.ins[index];
|
||||
}
|
||||
|
||||
DivWavetable* DivEngine::getWave(int index) {
|
||||
if (index<0 || index>=song.waveLen) return &song.nullWave;
|
||||
return song.wave[index];
|
||||
}
|
||||
|
||||
void DivEngine::play() {
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue