Age | Commit message (Collapse) | Author |
|
- adds kyra3 dummies
svn-id: r22425
|
|
subclasses to namespace Audio
svn-id: r22231
|
|
svn-id: r21827
|
|
Fix a lot of debug/error statements that were using %d/%x
for the result of pointer arithmetic.
As C++ apparently has no format string for ptrdiff_t use
%lu/%lx as appropriate.
svn-id: r21824
|
|
it's intended to do now.
Renamed _unkOutputByte2 to _vibratoAndAMDepthBits. It's a pretty terrible name,
but that's what it is: the two most significant bits of the Adlib BD register.
Renamed _rhythmSection to _rhythmSectionBits for consistency: It's the five
least significant bits of the Adlib BD register.
(The remaining bit is the rhythm on/off bit. I don't think we store that one in
any variable.)
svn-id: r21463
|
|
channel's unsigned tempo. Rewrote the function to make this clearer, and
renamed it update_changeChannelTempo().
svn-id: r21448
|
|
unk11 -> durationRandomness
updateCallback12() -> update_setupNoteAndDuration()
updateCallback26() -> update_setupDuration()
updateCallback44() -> update_setDurationRandomness()
svn-id: r21447
|
|
entering the castle. I hope this is a fair approximation of how the original
worked. Of course, this led to a couple of more renamings:
_unk5 -> _soundTrigger
updateCallback54() -> update_setSoundTrigger()
snd_setUnk5() -> snd_getSoundTrigger() (yes, "get")
At the moment, the only known sound triggers are the ones in the castle. If an
unknown trigger is set, the debugging messages will be really, really noisy. I
don't know if I should consider this a bug or an extremely annoying feature.
svn-id: r21396
|
|
flute sound, and probably other regressions as well.)
svn-id: r21345
|
|
directly. If they want a new data pointer, they have to use the dataptr
parameter. This fixes a subtle bug that would cause the wrong music to play
when getting the quill in Kyra 1.
svn-id: r21344
|
|
Added some comments on the strange but probably harmless things going on in
playSoundEffect()
svn-id: r21340
|
|
disassembly. I think they're correct now, and a bit easier to read. My old
comments were wrong, too.
I think they are for manipulating the Adlib rhythm section volumes. I'm not
sure the Kyra music ever uses the Adlib rhythm section.
svn-id: r21339
|
|
instrument. These are found using the lookup tables in _soundData on offsets 0
and 500 respectively. Added helper functions for that, which makes the code a
lot tidier. Particularly in update_setupRhythmSection(), where it's now much
clearer where it's getting all those "unk" values from.
Use the checkValue() function (which limits the "total level" to its valid
range) for the calculateOpLevel1() and 2() functions as well.
Renamed updateCallback16() to update_waitForEndOfProgram().
svn-id: r21337
|
|
callbackOutput() -> setupPrograms()
callbackProcess() -> executePrograms()
updateCallback3() -> update_setupProgram()
_unk4 -> _rhythmSection
updateCallback48() -> update_setupRhythmSection()
updateCallback49() -> update_playRhythmSection()
updateCallback50() -> update_removeRhythmSection()
svn-id: r21336
|
|
updateCallback3() would call unkOutput2(9) in at least one case. This is
obviously wrong because it a) reads outside _regOffsets[], and b) writes to
invalid Adlib registers.
Now unkOutput2() has the same safeguards as noteOff() already had, making
callbackOutput() and updateCallback3() even more similar.
svn-id: r21335
|
|
just how similar callbackOutput() and updateCallback3() are.
svn-id: r21333
|
|
svn-id: r21304
|
|
while still at the very beginning of the "attack" phase. This is the very
lowest point on the attack curve, yet it would continue from the beginning of
the release curve, i.e. its very highest point. This is what caused Kyra to
often play low-frequency notes at the very beginning of a new song. (That, and
a truly bizarre function for initialising the channels.)
The proper fix would be to locate the correct point on the release curve and
continue from there. For now, though, only handle the trivial case.
svn-id: r21302
|
|
svn-id: r21298
|
|
brandons home is fixed with this)
- Changes _tempo, tempo, position, unk41, unk32, unk18, unk19, _unkValue3 to unsigned (should be correct this time)
svn-id: r21293
|
|
svn-id: r21287
|
|
bug is a bug in our fmopl.cpp. Ken Silverman's Adlib emulator doesn't seem to
exhibit the bug either. (But is apparently less feature complete than MAME's.)
svn-id: r21275
|
|
beginning of music" bugs. As an experiment, I tried hooking up ScummVM with the
most recent version of the FMOPL code, and the bug went away.
Unfortunately, I believe we are stuck with the ancient version for license (and
performance?) reasons.
svn-id: r21267
|
|
where low-frequent noises are playing at the beginning of some new sounds.
svn-id: r21265
|
|
platforms
svn-id: r21264
|
|
unk3 -> spacing1
unk7 -> spacing2
unk12 -> fractionalSpacing
updateCallback4() -> update_setNoteSpacing()
updateCallback9() -> update_stopChannel()
updateCallback15() -> update_stopOtherChannel()
updateCallback17() -> update_setupInstrument()
updateCallback28() -> update_setFractionalNoteSpacing()
updateCallback43() -> update_nop1()
updateCallback47() -> update_nop2()
svn-id: r21261
|
|
but it seems that it drifts out of sync after a few repeats even with the
original interpreter. It's a feature!
This cleanup clears up some of the more confusing break/continues in the
callbackProcess() function, and gets rid of _continueFlag.
svn-id: r21259
|
|
really mean "channel". Fixed that:
OutputState -> Channel
_curTable -> _curChannel
_outputTables[] -> _channels[]
The biggest change was modifying all the "state" and "table" local variables
and function parameters.
Ahd, at no extra charge:
_outputTable[] -> _regOffset[]
svn-id: r21247
|
|
svn-id: r21246
|
|
unk4 -> position (measured on a very short ruler :-)
unk5 -> duration
svn-id: r21245
|
|
updateCallback31 -> update_setChannelTempo
updateCallback42 -> update_resetToGlobalTempo
updateCallback55 -> update_setTempoReset
- Renames some vars:
unk1 -> tempo
unk6 -> tempoReset
- Fixes tempo bugs
svn-id: r21244
|
|
introduced when renaming).
- Changes unk41 and unk32 to signed.
- Fixes wrong sound when dropping items (that was also a little bug in primaryEffect2)
svn-id: r21240
|
|
generate "leap samples". I doubt this will make any noticeable difference, but
at least now we can probably rule out timer inaccuracies from the list of
possible suspects for the remaining bugs.
Also removed unnecessary mutex locking/unlocking from readBuffer(), spotted by
LordHoto.
svn-id: r21239
|
|
malcolm and kallak.
Also corrects callback50() which seem to improve the sound a bit in the kallak writing scene.
svn-id: r21238
|
|
timer inaccuracies can cause that kind of problems, or we'd have noticed it in
the other game engines as well", guess what? The other game engines do not
necessary use a timer for their Adlib music. So now Kyra doesn't either.
Fortunately for my dignity, the music is still a bit uneven at times, but the
situation does seem to have improved a bit, and the sound effects sound better
to me now.
svn-id: r21237
|
|
Cleaned up the sound code a bit (removed some unneeded functions).
svn-id: r21234
|
|
svn-id: r21233
|
|
update1() -> setupDuration()
updateAndOutput1() -> setupNote()
setInstrument() -> setupInstrument() (just for the symmetry)
updateAndOutput3() -> noteOn()
That made the following two renamings seem natural:
updateCallback10() -> update_playRest()
updateCallback27() -> update_playNote()
I decided to number the secondary effects, even though there's only one:
update_setupSecondaryEffect() -> update_setupSecondaryEffect1()
update_removeSecondaryEffect() -> update_removeSecondaryEffect1()
And finally, I renamed the effects callbacks:
stateCallback1_1() -> primaryEffect1()
stateCallback1_2() -> primaryEffect2()
stateCallback2_1() -> secondaryEffect1()
svn-id: r21232
|
|
of use in tracking down the tempo bugs.
svn-id: r21230
|
|
updateCallback18() -> update_setupPrimaryEffect1()
updateCallback19() -> update_removePrimaryEffect1()
updateCallback21() -> update_setupPrimaryEffect2()
updateCallback40() -> update_removePrimaryEffect2()
updateCallback14() -> update_setupSecondaryEffect()
updateCallback30() -> update_removeSecondaryEffect()
updateCallback37() -> update_changeExtraLevel1()
updateCallback34() -> update_changeExtraLevel2()
svn-id: r21217
|
|
svn-id: r21208
|
|
variables in OutputState.
svn-id: r21207
|
|
callbackOutput() and updateCallback3() functions won't change the channel data
pointer unless the new sound has a higher unk2 and the current one.
Since it's set to 0 when the data pointer is nulled, I've changed the priority
to be unsigned.
The updateCallback22() function is now update_setPriority().
svn-id: r21206
|
|
svn-id: r21205
|
|
_curTable channel, but it probably does so whenever both of them are used
together.
svn-id: r21204
|
|
variables, and cleaned it up slightly. (Some of its variables are now signed.)
svn-id: r21203
|
|
variables.
svn-id: r21202
|
|
svn-id: r21201
|
|
and variables.
svn-id: r21200
|
|
level", which I believe is the individual channel volume. (The functions also
return the "scaling level" bits, but they are preserved, not calculated.) I
have renamed these functions calculateOpLevel1() and 2().
The unk25 and unk26 variables have been renamed opLevel1 and opLevel2. These
are called oplvl_1 and oplvl_2 in our MidiDriver_ADLIB class.
The unk26, unk27 and unk28 variables are potentially added to both operator
levels, and have been renamed opExtraLevel1, opExtralevel2 and opExtraLevel3.
The updateCallback25() function has been remamed update_setExtraLevel1().
The updateCallback33() function has been renamed update_setExtraLevel2().
The updateCallback32() function has been renamed update_setExtraLevel3().
Note that these callbacks aren't quite as similar as their names would seem to
indicate: They differ in whether or not the volume is updated and/or how the
parameters are passed.
svn-id: r21199
|