|
Wing Commander
Reconstructed Win32 source (1996)
|
Sound-effect samples, playback and saved volume settings. More...
Go to the source code of this file.
Functions | |
| void | InitializeAudioSystem (HWND window) |
| void | ServiceAudioStream (void) |
| WaveTableEntry * | AllocateWaveTableEntry (void) |
| WaveTableEntry * | FindWaveTableEntryByName (const char *name) |
| void | RemoveWaveTableEntry (WaveTableEntry *target) |
| void | FreeWaveTable (void) |
| ActiveSoundEntry * | AllocateActiveSoundEntry (void) |
| void | RemoveActiveSoundEntry (ActiveSoundEntry *target) |
| ActiveSoundEntry * | FindActiveSoundEntryBySample (IxSample *sample) |
| void | ReleaseFinishedSoundEntries (void) |
| void | StopSoundsUsingWave (const char *name) |
| void | playWAVE (const char *filename, int looping, int volume) |
| void | stop_all_sounds (void) |
| void | PlaySnowStaticSound (void) |
| void | ServiceSoundSystem (void) |
| void | SetSoundEffectsVolume (int volume) |
| LONG | RegistryQueryValue (HKEY key, LPCSTR name, DWORD type, LPBYTE data, DWORD size) |
| void | RegistryStoreValue (HKEY key, LPCSTR name, DWORD type, const BYTE *data, DWORD size) |
| void | LoadVolumeSettingsFromRegistry (void) |
| void | SaveVolumeSettingsToRegistry (void) |
Variables | |
| static ActiveSoundEntry * | pActiveSoundHead = 0 |
| static ActiveSoundEntry * | pActiveSoundTail = 0 |
| static int | bAudioSystemInitialized = 0 |
| static WaveTableEntry * | pWaveTableHead = 0 |
| static WaveTableEntry * | pWaveTableTail = 0 |
| static char | szMusicVolumeValueName [] = "MusicVolume" |
| static char | szSfxVolumeValueName [] = "SFXVolume" |
| static WaveTableEntry * | pSnowStaticWave |
| static IxSound * | pSnowStaticSound |
Sound-effect samples, playback and saved volume settings.
Address range 42b160-42b99f; the launch data that follows marks the unit boundary. Compiled as C++ (/TP), since it calls ix member functions directly.
Definition in file sound.c.
| ActiveSoundEntry * AllocateActiveSoundEntry | ( | void | ) |
Definition at line 122 of file sound.c.
References AllocateActiveSoundEntry(), ActiveSoundEntry::next, pActiveSoundHead, and pActiveSoundTail.
Referenced by AllocateActiveSoundEntry(), init_3Space_objects(), and playWAVE().
| WaveTableEntry * AllocateWaveTableEntry | ( | void | ) |
Definition at line 49 of file sound.c.
References AllocateWaveTableEntry(), WaveTableEntry::next, pWaveTableHead, and pWaveTableTail.
Referenced by AllocateWaveTableEntry(), init_3Space_objects(), PlaySnowStaticSound(), and playWAVE().
| ActiveSoundEntry * FindActiveSoundEntryBySample | ( | IxSample * | sample | ) |
Definition at line 165 of file sound.c.
References FindActiveSoundEntryBySample(), ActiveSoundEntry::next, pActiveSoundHead, IxSound::sample, and ActiveSoundEntry::sound.
Referenced by FindActiveSoundEntryBySample(), init_3Space_objects(), and StopSoundsUsingWave().
| WaveTableEntry * FindWaveTableEntryByName | ( | const char * | name | ) |
Definition at line 65 of file sound.c.
References FindWaveTableEntryByName(), WaveTableEntry::name, WaveTableEntry::next, and pWaveTableHead.
Referenced by FindWaveTableEntryByName(), init_3Space_objects(), playWAVE(), and StopSoundsUsingWave().
Definition at line 106 of file sound.c.
References FreeWaveTable(), WaveTableEntry::name, WaveTableEntry::next, pWaveTableHead, and pWaveTableTail.
Referenced by FreeWaveTable(), init_3Space_objects(), ServiceAudioStream(), and stop_all_sounds().
| void InitializeAudioSystem | ( | HWND | window | ) |
Definition at line 25 of file sound.c.
References bAudioSystemInitialized, bIxAudioEnabled, InitializeAudioSystem(), ix_system_configure(), ix_system_init(), and ix_system_set_voice_count().
Referenced by init_3Space_objects(), InitializeAudioSystem(), and WinMain().
Definition at line 362 of file sound.c.
References LoadVolumeSettingsFromRegistry(), nMusicVolumeSetting, nSfxVolumeSetting, RegistryQueryValue(), RegistryStoreValue(), szMusicVolumeValueName, and szSfxVolumeValueName.
Referenced by init_3Space_objects(), LoadVolumeSettingsFromRegistry(), and main().
Definition at line 292 of file sound.c.
References AllocateWaveTableEntry(), bIxAudioEnabled, IxSample::ix_sample_load_wav(), ix_sound_is_playing(), ix_sound_start(), ix_system_new_sample(), ix_system_new_sound(), IxSound::ix_system_sound_set_volume(), WaveTableEntry::name, PlaySnowStaticSound(), pSnowStaticSound, pSnowStaticWave, ReleaseFinishedSoundEntries(), and WaveTableEntry::sample.
Referenced by init_3Space_objects(), malf_noise(), and PlaySnowStaticSound().
| void playWAVE | ( | const char * | filename, |
| int | looping, | ||
| int | volume ) |
Definition at line 215 of file sound.c.
References AllocateActiveSoundEntry(), AllocateWaveTableEntry(), bIxAudioEnabled, FindWaveTableEntryByName(), IxSample::flags, IxSample::ix_sample_load_wav(), IxSound::ix_sound_set_delete_on_stop(), ix_sound_start(), ix_system_new_sample(), ix_system_new_sound(), IxSound::ix_system_sound_set_volume(), WaveTableEntry::name, playWAVE(), ReleaseFinishedSoundEntries(), WaveTableEntry::sample, and ActiveSoundEntry::sound.
Referenced by init_3Space_objects(), PlaySfxWaveFileByNumber(), and playWAVE().
| LONG RegistryQueryValue | ( | HKEY | key, |
| LPCSTR | name, | ||
| DWORD | type, | ||
| LPBYTE | data, | ||
| DWORD | size ) |
Definition at line 348 of file sound.c.
References RegistryQueryValue().
Referenced by init_3Space_objects(), LoadVolumeSettingsFromRegistry(), and RegistryQueryValue().
| void RegistryStoreValue | ( | HKEY | key, |
| LPCSTR | name, | ||
| DWORD | type, | ||
| const BYTE * | data, | ||
| DWORD | size ) |
Definition at line 355 of file sound.c.
References RegistryStoreValue().
Referenced by init_3Space_objects(), LoadVolumeSettingsFromRegistry(), RegistryStoreValue(), and SaveVolumeSettingsToRegistry().
Definition at line 179 of file sound.c.
References ix_sound_is_playing(), ix_system_delete_sound(), ActiveSoundEntry::next, pActiveSoundHead, ReleaseFinishedSoundEntries(), RemoveActiveSoundEntry(), and ActiveSoundEntry::sound.
Referenced by init_3Space_objects(), PlaySnowStaticSound(), playWAVE(), and ReleaseFinishedSoundEntries().
| void RemoveActiveSoundEntry | ( | ActiveSoundEntry * | target | ) |
Definition at line 138 of file sound.c.
References ActiveSoundEntry::next, pActiveSoundHead, pActiveSoundTail, and RemoveActiveSoundEntry().
Referenced by init_3Space_objects(), ReleaseFinishedSoundEntries(), RemoveActiveSoundEntry(), and StopSoundsUsingWave().
| void RemoveWaveTableEntry | ( | WaveTableEntry * | target | ) |
Definition at line 78 of file sound.c.
References WaveTableEntry::name, WaveTableEntry::next, pWaveTableHead, pWaveTableTail, and RemoveWaveTableEntry().
Referenced by init_3Space_objects(), and RemoveWaveTableEntry().
Definition at line 392 of file sound.c.
References nMusicVolumeSetting, nSfxVolumeSetting, RegistryStoreValue(), SaveVolumeSettingsToRegistry(), szMusicVolumeValueName, and szSfxVolumeValueName.
Referenced by init_3Space_objects(), process_player_input(), and SaveVolumeSettingsToRegistry().
Definition at line 37 of file sound.c.
References bAudioSystemInitialized, bIxAudioEnabled, FreeWaveTable(), ix_system_delete_all_samples(), ix_system_delete_all_sounds(), ix_system_shutdown(), and ServiceAudioStream().
Referenced by init_3Space_objects(), ServiceAudioStream(), and WinMain().
Definition at line 334 of file sound.c.
References ix_system_service_sounds(), and ServiceSoundSystem().
Referenced by DIBslamReal(), init_3Space_objects(), and ServiceSoundSystem().
| void SetSoundEffectsVolume | ( | int | volume | ) |
Definition at line 340 of file sound.c.
References ix_system_set_master_volume(), SetSoundEffectsVolume(), and SoundDebugPrintf().
Referenced by HandleSpaceFlightControls(), init_3Space_objects(), main(), process_player_input(), and SetSoundEffectsVolume().
Definition at line 276 of file sound.c.
References FreeWaveTable(), ix_sound_release(), ix_sound_stop(), ix_system_delete_all_samples(), ix_system_delete_all_sounds(), pSnowStaticSound, pSnowStaticWave, and stop_all_sounds().
Referenced by FlushSoundEffect(), FlushSoundEffects(), init_3Space_objects(), and stop_all_sounds().
| void StopSoundsUsingWave | ( | const char * | name | ) |
Definition at line 195 of file sound.c.
References bIxAudioEnabled, FindActiveSoundEntryBySample(), FindWaveTableEntryByName(), ix_system_delete_sound(), RemoveActiveSoundEntry(), WaveTableEntry::sample, ActiveSoundEntry::sound, and StopSoundsUsingWave().
Referenced by init_3Space_objects(), and StopSoundsUsingWave().
|
static |
Definition at line 15 of file sound.c.
Referenced by InitializeAudioSystem(), and ServiceAudioStream().
|
static |
Definition at line 13 of file sound.c.
Referenced by AllocateActiveSoundEntry(), FindActiveSoundEntryBySample(), ReleaseFinishedSoundEntries(), and RemoveActiveSoundEntry().
|
static |
Definition at line 14 of file sound.c.
Referenced by AllocateActiveSoundEntry(), and RemoveActiveSoundEntry().
|
static |
Definition at line 22 of file sound.c.
Referenced by PlaySnowStaticSound(), and stop_all_sounds().
|
static |
Definition at line 21 of file sound.c.
Referenced by PlaySnowStaticSound(), and stop_all_sounds().
|
static |
Definition at line 16 of file sound.c.
Referenced by AllocateWaveTableEntry(), FindWaveTableEntryByName(), FreeWaveTable(), and RemoveWaveTableEntry().
|
static |
Definition at line 17 of file sound.c.
Referenced by AllocateWaveTableEntry(), FreeWaveTable(), and RemoveWaveTableEntry().
|
static |
Definition at line 18 of file sound.c.
Referenced by LoadVolumeSettingsFromRegistry(), and SaveVolumeSettingsToRegistry().
|
static |
Definition at line 19 of file sound.c.
Referenced by LoadVolumeSettingsFromRegistry(), and SaveVolumeSettingsToRegistry().