Age | Commit message (Collapse) | Author |
|
Actually, it was already impossible for the reported variables to be
used uninitialized, because they were all assigned a value by calling
ReadByte() and the function would return if that failed. However, the
compiler couldn't know about this fact, so we do him the favor and
initialized them to 0.
|
|
It turns out that the way that tempo has been calculated in OPL playback
has been broken for a long time. The mysterious "fudge factor" that I
had to apply to tempo calculations is actually completely unnecessary:
the byte-swapping in the MIDI_GetFileTimeDivision() function was being
done wrong, so the time division being used by the OPL MIDI code was
completely wrong. Presumably the multiply by 260 was close enough to an
8-bit bitshift that it worked okayish, but large enough time division
values would overflow a single byte and screw up.
This fixes long-running OPL playback problems in a number of WADs, most
notably Alien Vendetta. This *really* fixes #352.
|
|
A negative time division file indicates the MIDI file uses SMPTE time
rather than the normal time system. This is not supported yet, but for
the time being, return a sensible time division value that doesn't
cause the sound to stutter and the game to become unplayable.
This fixes #352, although the affected MIDIs do not yet play properly.
|
|
This change rewrites and simplifies the copyright headers at the top
of all source files:
* Remove "Emacs style mode select" line; this line was included in
the headers for the originally released source files and appears
to be to set the file type for old versions of Emacs. I'm not sure
entirely why it was required but I don't think it is any more.
* Remove "You should have received a copy of..." text from copyright
header. This refers to the old 59 Temple Place address where the
FSF headquarters used to be located and is no longer correct.
Rather than change to the new address, just remove the paragraph
as it is superfluous anyway. This fixes #311.
* Remove ---- separator lines so that the file headers are barer
and more simplified.
|
|
In the C standards, malloc(0) may return NULL without indicating a
failure to allocate. As values read from the MIDI file may be
arbitrary, add one to the allocated length so that we always allocated
a positive value. This fixes #165 (thanks nmain).
|
|
Subversion-branch: /branches/v2-branch
Subversion-revision: 2639
|
|
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2607
|
|
not use GNU C-isms such as inline keyword, declaration/statement mixing,
and strange calling convention syntax for import function pointers.
Fixed critical buffer overflow in M_BindChatControls - should be
back-merged immediately. Added autogenerated directories *back* to
ignore list.
Subversion-branch: /branches/strife-branch
Subversion-revision: 2052
|
|
Subversion-branch: /branches/raven-branch
Subversion-revision: 1924
|
|
Subversion-branch: /branches/opl-branch
Subversion-revision: 1654
|
|
Subversion-branch: /branches/opl-branch
Subversion-revision: 1643
|
|
Subversion-branch: /branches/opl-branch
Subversion-revision: 1639
|
|
packing.
Subversion-branch: /branches/opl-branch
Subversion-revision: 1636
|
|
Subversion-branch: /branches/opl-branch
Subversion-revision: 1499
|
|
Subversion-branch: /branches/opl-branch
Subversion-revision: 1498
|
|
Subversion-branch: /branches/opl-branch
Subversion-revision: 1495
|
|
Subversion-branch: /branches/opl-branch
Subversion-revision: 1494
|
|
Subversion-branch: /branches/opl-branch
Subversion-revision: 1492
|
|
Subversion-branch: /branches/opl-branch
Subversion-revision: 1490
|
|
Subversion-branch: /branches/opl-branch
Subversion-revision: 1489
|