diff options
author | Jamieson Christian | 2003-05-23 04:47:47 +0000 |
---|---|---|
committer | Jamieson Christian | 2003-05-23 04:47:47 +0000 |
commit | c9e5988e43913e347a5fe800b460161d0ec865ec (patch) | |
tree | bec6e2364bf0fe5e96698797c5a6b2aac0528e47 | |
parent | 0be2b4673c27910fd1bbb0e25bf6179b4f0a9a10 (diff) | |
download | scummvm-rg350-c9e5988e43913e347a5fe800b460161d0ec865ec.tar.gz scummvm-rg350-c9e5988e43913e347a5fe800b460161d0ec865ec.tar.bz2 scummvm-rg350-c9e5988e43913e347a5fe800b460161d0ec865ec.zip |
Fixed PPQN for old 'AD' music resources
svn-id: r7852
-rw-r--r-- | scumm/resource.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scumm/resource.cpp b/scumm/resource.cpp index bb179324e3..167a74a166 100644 --- a/scumm/resource.cpp +++ b/scumm/resource.cpp @@ -1092,9 +1092,11 @@ int Scumm::readSoundResourceSmallHeader(int type, int idx) { ptr[0] = 0; ptr[1] = 0; ptr[2] = 0; ptr[3] = 1; // MIDI format 0 with 1 track ptr += 4; - // FIXME: should we convert ticks here? I.e. BE vs LE, or maybe another scale is - // needed? In fact does anything *read* this value, ever? - memcpy(ptr, &ticks, 2); ptr += 2; + // We will ignore the PPQN in the original resource, because + // it's invalid anyway. We use a constant PPQN of 480. + // memcpy(ptr, &ticks, 2); ptr += 2; + *ptr++ = 480 >> 8; + *ptr++ = 480 & 0xFF; memcpy(ptr, "MTrk", 4); ptr += 4; *ptr++ = ((sizeof(OLD256_MIDI_HACK) + size + 7) >> 24) & 0xFF; |