|
resonance 1.0.1
|
The game's hardware synthesiser. More...
#include <ps2hardsynth.h>


Public Member Functions | |
| Ps2HardSynth () | |
| Select the sound-effect bank and bring the synthesiser driver up. | |
| virtual | ~Ps2HardSynth () |
| virtual void | LoadBankSet4 () |
| virtual void | LoadBankSet5 () |
| virtual void | LoadBankSet6 () |
| virtual void | UnloadBanks () |
| virtual void | PlayMidi (unsigned char nStatus, unsigned char nData1, unsigned char nData2) |
| virtual void | SelectBank (unsigned char nChannel, unsigned char nBank) |
| virtual void | SetStereo (int bStereo) |
| virtual void | SetRemixMode (int bRemix) |
| virtual void | SetPaused (int bPaused) |
| virtual void | AllNotesOff () |
| virtual void | LoadBankPair (const HxStr &bdName, const HxStr &hdName, int nTag, int nPlacement) |
| Compose both bank paths and load the pair. | |
| void | SelectSfxProgram () |
| Program the sound-effect channel. | |
| Public Member Functions inherited from Synth | |
| virtual | ~Synth () |
| virtual void | UnusedHook () |
| Do nothing. | |
| virtual void | OnPlayStarted () |
| Respond to the start of play. | |
| virtual void | AllNotesOffExceptSfxChannel () |
| Silence every channel but the sound-effect channel. | |
| void | SetChannelVolume (unsigned char nVolume) |
| Set the volume of every channel. | |
| void | Setup () |
| Put every channel into its starting state. | |
| void | FadeOut (int nDurationMs) |
| Fade every channel's volume to silence over a duration. | |
| Public Member Functions inherited from MsgSink | |
| void * | operator new (size_t nSize) |
| Allocate a sink from the tagged heap under the tag "MsgSink". | |
| void | operator delete (void *pBlock) |
| Release a sink to the tagged heap. | |
| virtual | ~MsgSink () |
| virtual void | Dispatch (Message *pMsg) |
| Accept a message. | |
Additional Inherited Members | |
| Protected Member Functions inherited from Synth | |
| void | OnStdMidi (StdMidiMsg *pMsg) |
| Sends the message's three bytes through PlayMidi(). | |
| virtual void | DispatchPriv (Message *pMsg) |
| Act on a message. | |
The game's hardware synthesiser.
Its RTTI descriptor is at 0x009021d0. It has Synth as its one base. The inherited MsgSink vptr sits at offset 0 and the class is 0xc bytes. Its vtable is at 0x00814fc0 and has eighteen slots, one more than the seventeen Synth declares. The class adds a single virtual at slot 17.
It answers ten of Synth's slots and inherits slots 7, 10, and 16 unchanged. The class is thin. Every override reaches the driver at 0x00461a88 through 0x00465200, which owns the voices and the sound banks, and the constructor brings that driver up through its initialiser at 0x004647a8.
Slot 17 is the one member the class adds, and the three bank loaders are its only callers. It prefixes both bank names with the device the host mode selects and hands the pair to LoadSoundBank().
Globals owns the single instance, created in Globals::CreateSynth() and destroyed in Globals::Shutdown().
| Ps2HardSynth::Ps2HardSynth | ( | ) |
Select the sound-effect bank and bring the synthesiser driver up.
Sets mUseSfxBank and clears mAlternateBanksResident, then runs InitSynthDriver(). CreatePs2HardSynth() expands the same body in place, and the image lists no caller for this out-of-line copy.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Compose both bank paths and load the pair.
Table slot 17, the one virtual this class adds. Prefixes each name with host0: when GetHostMode() reports kHostModeHostOnly and with cdrom0: otherwise, then calls LoadSoundBank() with the two composed paths. An empty composed path is passed as the shared empty string rather than as a null pointer.
| bdName | The BD bank name, without a device prefix. |
| hdName | The HD bank name, without a device prefix. |
| nTag | The tag both banks are recorded with. |
| nPlacement | Where the pair goes in sound memory. |
| void Ps2HardSynth::SelectSfxProgram | ( | ) |
Program the sound-effect channel.
Sends bank select 0 and then bank 15, or bank 0 when mUseSfxBank is clear, on channel 15, followed by program 16. LoadBankSet4(), LoadBankSet5(), and AllNotesOff() expand the same three messages in place, and the image lists no caller for this out-of-line copy. The title is inferred.