mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-13 07:57:51 +00:00
Merge pull request #27 from Gaerzi/master
Some DOSBox Raw OPL v2 indices were off by one.
This commit is contained in:
commit
3437b08c1a
1 changed files with 11 additions and 8 deletions
|
@ -104,16 +104,19 @@ fail: delete[] scoredata;
|
||||||
}
|
}
|
||||||
else if (((DWORD *)scoredata)[2] == MAKE_ID(2,0,0,0))
|
else if (((DWORD *)scoredata)[2] == MAKE_ID(2,0,0,0))
|
||||||
{
|
{
|
||||||
if (scoredata[20] != 0)
|
bool okay = true;
|
||||||
{
|
|
||||||
Printf("Unsupported DOSBox Raw OPL format %d\n", scoredata[20]);
|
|
||||||
goto fail;
|
|
||||||
}
|
|
||||||
if (scoredata[21] != 0)
|
if (scoredata[21] != 0)
|
||||||
{
|
{
|
||||||
Printf("Unsupported DOSBox Raw OPL compression %d\n", scoredata[21]);
|
Printf("Unsupported DOSBox Raw OPL format %d\n", scoredata[20]);
|
||||||
goto fail;
|
okay = false;
|
||||||
}
|
}
|
||||||
|
if (scoredata[22] != 0)
|
||||||
|
{
|
||||||
|
Printf("Unsupported DOSBox Raw OPL compression %d\n", scoredata[21]);
|
||||||
|
okay = false;
|
||||||
|
}
|
||||||
|
if (!okay)
|
||||||
|
goto fail;
|
||||||
RawPlayer = DosBox2;
|
RawPlayer = DosBox2;
|
||||||
SamplesPerTick = OPL_SAMPLE_RATE / 1000;
|
SamplesPerTick = OPL_SAMPLE_RATE / 1000;
|
||||||
int headersize = 0x1A + scoredata[0x19];
|
int headersize = 0x1A + scoredata[0x19];
|
||||||
|
@ -264,7 +267,7 @@ bool OPLmusicBlock::ServiceStream (void *buff, int numbytes)
|
||||||
{
|
{
|
||||||
for (i = 0; i < io->NumChips; ++i)
|
for (i = 0; i < io->NumChips; ++i)
|
||||||
{
|
{
|
||||||
io->chips[i]->Update(samples1, samplesleft);
|
io->chips[i]->Update(samples1, numsamples);
|
||||||
}
|
}
|
||||||
OffsetSamples(samples1, numsamples << stereoshift);
|
OffsetSamples(samples1, numsamples << stereoshift);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue