Back to legacygamers.net
WARPGATE

Sound

CSoundManager, CSoundRes, BGM, CBinkPlayer, CMilesSound

Functions 53Code 10 KBAddresses 0x00401080 to 0x00DE1830
53 functions
AddressSizeNameDescription
0x0040108016register_ail_shutdown_atexitRegisters Miles Sound System shutdown handler with atexit for audio cleanup at program termination.
0x005FF0D0429CMilesSound__InitSoundSystemInitializes CMilesSound object with default audio parameters, volume levels, and calls CMilesSound__InitBuffers to setup audio subsystem.
0x005FF280269CSoundMgr__destructorDestructs CSoundMgr instance, releasing 3D/2D audio samples, listeners, providers, digital driver via Miles Sound System (AIL).
0x005FF390290CSoundMgr__scalar_destructorDestructor for CSoundMgr that releases 3D/2D audio samples, closes digital driver, and cleans up Miles Sound System resources.
0x005FF5A0265CSoundMgr__stop_all_streamsStops all active audio streams by closing BGM and effect stream handles, clears associated string data.
0x005FF6B0726CMilesSound__InitBuffersInitializes Miles Sound System audio buffers, configures sample rates/channels based on quality settings, and allocates digital driver handles.
0x005FFBB0308CSoundMgr__crossfade_bgmCrossfades background music by pausing current stream, spawning fade thread, and starting queued BGM track with volume control.
0x005FFCF0455CSoundMgr__ShutdownReleases 3D/2D audio samples, closes streams and digital driver, then shuts down Miles Sound System (AIL).
0x005FFEE0104CSoundMgr__stop_all_samplesStops all active 2D and 3D audio samples in the sound manager by iterating through sample handle arrays and calling Miles Sound System end functions.
0x005FFF50318CSoundMgr__FadeStreamVolumeGradually fades audio stream volume up (param=1) or down (param≠1) over ~10 seconds with 10ms steps.
0x006000A014CSoundStream__GetVolumeRetrieves volume level (0-127) from CSoundStream object at offset 0xe4, returns 0 if null.
0x006000B071CSoundStream__IsPlayingChecks if either primary or secondary audio stream is actively playing (status==2) when audio system initialized.
0x0060010025CSoundStream__CheckIfDoneReturns 1 if AIL stream finished playing (status==8), else returns masked status value.
0x0060013081CSoundStream__PauseResumePauses/resumes audio stream playback and restores filename from backup on resume if modified.
0x00600190476CSoundManager__Play3DSamplePlays a 3D audio sample at specified coordinates with volume/distance falloff, using AIL 3D provider or 2D fallback.
0x00600370181CSoundManager__SetBGMTrackSets BGM track filename, triggers playback if sound type 7 enabled, configures 3D audio room type via AIL provider.
0x00600430272CSoundManager__Play2DSoundWithDistancePlays 2D sound with distance-based volume attenuation using 3D coordinates and AIL audio library.
0x00600540292CSoundManager__PlayBGMManages BGM playback by comparing track names and spawning/stopping audio threads via _beginthreadex with fade volume handling.
0x00600770631CSoundManager__Play3DSoundPlays a 3D sound effect at specified position using Miles Sound System, with fallback to 2D audio based on configuration mode.
0x006009F0135CSoundManager__StartBGMStreamOpens/restarts BGM audio stream with volume and loop settings; closes previous stream if flag 0x415 is set.
0x00600A8042CSoundManager__SetSFXVolumeClamps SFX volume parameter to [0, 127] range and stores at CSoundManager offset 0xe8 for 2D sound effects.
0x00600AB042CSoundManager__Set3DSoundVolumeClamps 3D sound volume parameter to valid range [0, 127] and stores at offset 0x134 in CSoundManager instance.
0x00600AE042CSoundManager__SetBGMVolumeClamps BGM volume parameter to valid MIDI range [0, 127] and stores in CSoundManager instance at offset 0xe0.
0x00600B10134CSoundMgr__Set3DOrientationSets 3D audio listener orientation by converting angle to sin/cos and calling AIL_set_3D_orientation.
0x00600BA059CSoundMgr__SetRoomTypeSets 3D audio reverb environment type via AIL provider, stores capability flag at offset 0x404.
0x00600BE081CSoundStream__SetVolumeClamps volume parameter to 0-127 range and applies it to primary and secondary AIL stream handles.
0x00603BF075CSoundMgr__scalar_dtor_ADestructor for CSoundMgr that deallocates a 0x4c-byte sound resource at offset +4 with stack canary validation.
0x00603C4075CSoundMgr__scalar_dtor_BDestructor for CSoundMgr that deallocates a 32-byte heap block at offset +4 with stack guard validation.
0x00603C9067CSoundMgr__SetVtableSets vtable pointer for C3dActorPC layer with SEH frame setup/teardown
0x00603CE067CSoundMgr__vtable_stub_BSets vtable pointer for C3dActorPC layer, likely initializing sound manager object with destructor reference.
0x007292E0124CSoundMixer__ConstructorConstructs CSoundMixer object, initializes vtable, creates 2 sub-objects (0xC bytes each), zeroes data at offset 0x14A
0x00729760156CSoundRes__NewSimpleAllocates and initializes a CSoundRes object (0x118 bytes) with vtable, zeroing data/flags fields.
0x00729800569CSoundRes__LoadFromFileLoads sound files (WAV/MP3/PCM) via Miles Sound System, decompresses ADPCM/ASI formats, stores in CSoundRes object.
0x00729BC061CSoundRes__FreeSoundDataFrees sound data buffer using AIL_mem_free_lock if AIL-allocated, otherwise standard free()
0x00729C0091CSoundRes__ScalarDestructorScalar deleting destructor for CSoundRes that conditionally frees memory based on param_2 flag
0x00729C60104CSoundRes__ConstructorInitializes CSoundRes object by calling parent CResourceHandle constructor and zeroing sound resource state fields at offsets 0x44-0x45.
0x0077550030BinkPlayer__InitInitializes BinkPlayer structure by zeroing binkHandle, width, height, fileHandle, and loopMode fields.
0x00775520104BinkPlayer__CloseCloses Bink video player handle and releases associated CFile resource object.
0x0077559056BinkPlayer__CloseNoSEHCloses Bink video handle and releases associated CFile object without SEH exception handling
0x007755D0145BinkPlayer__CopyFrameToSurfaceLocks render surface, copies current Bink video frame data to buffer, unlocks surface, and marks dirty rectangle for redraw.
0x00775670335BinkPlayer__OpenFileOpens a Bink video file with optional CFile wrapper, supporting loop mode and displaying errors on failure.
0x007757C0146BinkPlayer__UpdateFrameUpdates Bink video playback frame, handling frame skipping, looping, and completion detection for RO cinematics.
0x00A86BF088CBinkPlayer__OnKeyInputHandles keyboard input for Bink video player; skips on 'g' key, stops on 'R' key, pauses on other keys.
0x00A86C5029CBinkPlayer__CloseCloses a Bink video player instance by calling _BinkClose_4 and nullifying the pointer.
0x00A86CA0560CBinkPlayer__PlayOpeningPlays opening.bik video using Bink SDK with DirectSound, manages frame timing via performance counters, processes Windows messages.
0x00A86ED018CBinkPlayer__PauseWrapper that pauses Bink video playback by delegating to the underlying _BinkPause_8 API function.
0x00A86EF099CBinkPlayer__ReadBinkModeRegistryReads BINKMODE value from Windows registry HKEY_LOCAL_MACHINE into CBinkPlayer instance at offset 0xc.
0x00A86F60101CBinkPlayer__WriteBinkModeRegistryWrites BINKMODE value to Windows registry under HKEY_LOCAL_MACHINE for Bink video player configuration persistence.
0x00B6C630216CEffect__FindActiveChannelAndCopyWavFilenameIterates through effect channels to find active one with alpha>0, then copies its WAV filename string from UIWindowMgr.
0x00CAD2D0274setup_bgm_fadeout_timerDisables existing fadeout timers, calculates fade duration from elapsed/total time, allocates CBgmFade object, registers with event manager.
0x00CAD3F0274create_bgm_fadein_timerInitializes a timed BGM fade-in event by disabling previous type-6 events and registering new CBgmFade fade-in timer with CTimedEventMgr.
0x00DE17F056CSound__DestroyTimerAndCleanupDestroys multimedia timer, deallocates critical section, and clears red-black tree for CSound class cleanup.
0x00DE183055CSound__FreeBufferAndCleanupFrees virtual memory buffer and deletes critical section for CSound object cleanup during destruction.