|
Wing Commander II
Reconstructed Win32 source (1996)
|
Wave playback, sound bookkeeping and volume settings. More...
#include "game.h"Go to the source code of this file.
Variables | |
| ActiveSoundEntry * | g_pActiveSoundHead = 0 |
| ActiveSoundEntry * | g_pActiveSoundTail = 0 |
| int | g_bAudioSystemInitialized = 0 |
| WaveTableEntry * | g_pWaveTableHead = 0 |
| WaveTableEntry * | g_pWaveTableTail = 0 |
| WaveTableEntry * | g_1_pVoiceWav |
| WaveTableEntry * | g_pSnowStaticClip |
| IxSound * | g_pSpeechSnd |
| int | g_16_nSpeechCompletionDelay |
| int | g_bSpeechSoundActive |
| IxSound * | g_9_pSnowStaticAudio |
| int | g_9_nNextSfx16PlaybackFrame |
| int | g_bSpeechPlaybackDone |
| static char | g_szMusicVolumeValueName [] = "MusicVolume" |
| static char | g_szSfxVolumeValueName [] = "SFXVolume" |
Wave playback, sound bookkeeping and volume settings.
Definition in file sound.c.
| ActiveSoundEntry * AllocateActiveSoundEntry | ( | void | ) |
Definition at line 132 of file sound.c.
References AllocateActiveSoundEntry(), g_pActiveSoundHead, g_pActiveSoundTail, and ActiveSoundEntry::next.
Referenced by AllocateActiveSoundEntry(), playWAVE(), and UpdateShipTurretGuns().
| WaveTableEntry * AllocateWaveTableEntry | ( | void | ) |
Definition at line 55 of file sound.c.
References AllocateWaveTableEntry(), g_pWaveTableHead, g_pWaveTableTail, and WaveTableEntry::next.
Referenced by AllocateWaveTableEntry(), PlayRawSpeechBuffer(), PlaySnowStaticSound(), playWAVE(), and UpdateShipTurretGuns().
| ActiveSoundEntry * FindActiveSoundEntryBySample | ( | IxSample * | sample | ) |
Definition at line 169 of file sound.c.
References FindActiveSoundEntryBySample(), g_pActiveSoundHead, ix_sound_get_sample(), ActiveSoundEntry::next, and ActiveSoundEntry::sound.
Referenced by FindActiveSoundEntryBySample(), StopSoundsUsingWave(), and UpdateShipTurretGuns().
| WaveTableEntry * FindWaveTableEntryByName | ( | const char * | name | ) |
Definition at line 72 of file sound.c.
References FindWaveTableEntryByName(), g_pWaveTableHead, WaveTableEntry::name, and WaveTableEntry::next.
Referenced by FindWaveTableEntryByName(), playWAVE(), StopSoundsUsingWave(), and UpdateShipTurretGuns().
Definition at line 114 of file sound.c.
References FreeWaveTable(), g_pWaveTableHead, g_pWaveTableTail, WaveTableEntry::name, and WaveTableEntry::next.
Referenced by FreeWaveTable(), ServiceAudioStream(), stop_all_sounds(), and UpdateShipTurretGuns().
| void InitializeAudioSystem | ( | HWND | window | ) |
Definition at line 26 of file sound.c.
References g_bAudioSystemInitialized, g_nAudioEnabled, InitializeAudioSystem(), ix_system_configure(), ix_system_init(), and ix_system_set_voice_count().
Referenced by InitializeAudioSystem(), UpdateShipTurretGuns(), and WinMain().
Definition at line 501 of file sound.c.
References ix_sound_get_sample(), and IxSound::sample.
Referenced by FindActiveSoundEntryBySample(), ix_sound_get_sample(), and UpdateShipTurretGuns().
Definition at line 184 of file system.cpp.
Definition at line 440 of file sound.c.
References g_nMusicVolumeSetting, g_nSfxVolumeSetting, g_szMusicVolumeValueName, g_szSfxVolumeValueName, LoadVolumeSettingsFromRegistry(), RegistryQueryValue(), and RegistryStoreValue().
Referenced by LoadVolumeSettingsFromRegistry(), and UpdateShipTurretGuns().
Definition at line 292 of file sound.c.
References AllocateWaveTableEntry(), g_16_nSpeechCompletionDelay, g_1_bSpaceFlightActive, g_1_pVoiceWav, g_bSpeechSoundActive, g_pSpeechSnd, IxSample::ix_sample_load_raw(), ix_sound_release(), IxSound::ix_sound_set_delete_on_stop(), ix_sound_start(), ix_sound_stop(), ix_system_new_sample(), ix_system_new_sound(), IxSound::ix_system_sound_set_volume(), WaveTableEntry::name, PlayRawSpeechBuffer(), WaveTableEntry::sample, SetCinematicFrameTiming(), and SoundDebugPrintf().
Referenced by PlayRawSpeechBuffer(), PlaySpeechPacketBuffer(), and UpdateShipTurretGuns().
Definition at line 347 of file sound.c.
References AllocateWaveTableEntry(), g_9_pSnowStaticAudio, g_nAudioEnabled, g_pSnowStaticClip, 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(), ReleaseFinishedSoundEntries(), and WaveTableEntry::sample.
Referenced by malf_noise(), PlaySnowStaticSound(), and UpdateShipTurretGuns().
| void playWAVE | ( | const char * | filename, |
| int | looping, | ||
| int | volume ) |
Definition at line 217 of file sound.c.
References AllocateActiveSoundEntry(), AllocateWaveTableEntry(), FindWaveTableEntryByName(), g_9_nNextSfx16PlaybackFrame, g_nAudioEnabled, g_nSpaceFrame, IxSample::ix_sample_load_wav(), IxSample::ix_sample_set_looping(), 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, ActiveSoundEntry::sound, and SoundDebugPrintf().
Referenced by PlaySfxWaveFileByNumber(), playWAVE(), and UpdateShipTurretGuns().
| LONG RegistryQueryValue | ( | HKEY | key, |
| LPCSTR | name, | ||
| DWORD | type, | ||
| LPBYTE | data, | ||
| DWORD | size ) |
Definition at line 421 of file sound.c.
References RegistryQueryValue().
Referenced by LoadVolumeSettingsFromRegistry(), RegistryQueryValue(), and UpdateShipTurretGuns().
| void RegistryStoreValue | ( | HKEY | key, |
| LPCSTR | name, | ||
| DWORD | type, | ||
| const BYTE * | data, | ||
| DWORD | size ) |
Definition at line 428 of file sound.c.
References RegistryStoreValue().
Referenced by LoadVolumeSettingsFromRegistry(), RegistryStoreValue(), SaveVolumeSettingsToRegistry(), and UpdateShipTurretGuns().
Definition at line 183 of file sound.c.
References g_pActiveSoundHead, ix_sound_is_playing(), ix_system_delete_sound(), ActiveSoundEntry::next, ReleaseFinishedSoundEntries(), RemoveActiveSoundEntry(), and ActiveSoundEntry::sound.
Referenced by PlaySnowStaticSound(), playWAVE(), ReleaseFinishedSoundEntries(), and UpdateShipTurretGuns().
| void RemoveActiveSoundEntry | ( | ActiveSoundEntry * | target | ) |
Definition at line 148 of file sound.c.
References g_pActiveSoundHead, g_pActiveSoundTail, ActiveSoundEntry::next, and RemoveActiveSoundEntry().
Referenced by ReleaseFinishedSoundEntries(), RemoveActiveSoundEntry(), StopSoundsUsingWave(), and UpdateShipTurretGuns().
| void RemoveWaveTableEntry | ( | WaveTableEntry * | target | ) |
Definition at line 89 of file sound.c.
References g_pWaveTableHead, g_pWaveTableTail, WaveTableEntry::name, WaveTableEntry::next, and RemoveWaveTableEntry().
Referenced by RemoveWaveTableEntry(), and UpdateShipTurretGuns().
Definition at line 471 of file sound.c.
References g_nMusicVolumeSetting, g_nSfxVolumeSetting, g_szMusicVolumeValueName, g_szSfxVolumeValueName, RegistryStoreValue(), and SaveVolumeSettingsToRegistry().
Referenced by HandleSpaceFlightControls(), SaveVolumeSettingsToRegistry(), and UpdateShipTurretGuns().
Definition at line 40 of file sound.c.
References FreeWaveTable(), g_bAudioSystemInitialized, g_nAudioEnabled, ix_system_delete_all_samples(), ix_system_delete_all_sounds(), ix_system_shutdown(), and ServiceAudioStream().
Referenced by ServiceAudioStream(), UpdateShipTurretGuns(), and WinMain().
Definition at line 389 of file sound.c.
References g_16_nSpeechCompletionDelay, g_1_bSpaceFlightActive, g_bSpeechPlaybackDone, g_bSpeechSoundActive, g_nAudioEnabled, g_nInputPressCount, g_pSpeechSnd, ix_sound_is_playing(), ix_system_service_sounds(), ServiceSoundSystem(), and SetCinematicFrameTiming().
Referenced by DIBslamReal(), ReadTextInput(), RunPilotSaveLoadMenu(), ServiceSoundSystem(), ShowGamePausedBanner(), ShowOnScreenMessage(), UpdateShipTurretGuns(), WaitForJoystickButtonPress(), and WaitForJoystickButtonRelease().
| void SetSoundEffectsVolume | ( | int | volume | ) |
Definition at line 413 of file sound.c.
References g_nAudioEnabled, ix_system_set_master_volume(), and SetSoundEffectsVolume().
Referenced by HandleSpaceFlightControls(), SetSoundEffectsVolume(), and UpdateShipTurretGuns().
Definition at line 331 of file sound.c.
References FreeWaveTable(), g_9_pSnowStaticAudio, g_pSnowStaticClip, ix_sound_release(), ix_sound_stop(), ix_system_delete_all_samples(), ix_system_delete_all_sounds(), and stop_all_sounds().
Referenced by FlushSoundEffect(), FlushSoundEffects(), stop_all_sounds(), and UpdateShipTurretGuns().
| void StopSoundsUsingWave | ( | const char * | name | ) |
Definition at line 199 of file sound.c.
References FindActiveSoundEntryBySample(), FindWaveTableEntryByName(), g_nAudioEnabled, ix_system_delete_sound(), RemoveActiveSoundEntry(), WaveTableEntry::sample, ActiveSoundEntry::sound, and StopSoundsUsingWave().
Referenced by StopSoundsUsingWave(), and UpdateShipTurretGuns().
| int g_16_nSpeechCompletionDelay |
Definition at line 19 of file sound.c.
Referenced by PlayRawSpeechBuffer(), and ServiceSoundSystem().
| WaveTableEntry* g_1_pVoiceWav |
Definition at line 16 of file sound.c.
Referenced by PlayRawSpeechBuffer().
| int g_9_nNextSfx16PlaybackFrame |
Definition at line 22 of file sound.c.
Referenced by playWAVE().
| IxSound* g_9_pSnowStaticAudio |
Definition at line 21 of file sound.c.
Referenced by PlaySnowStaticSound(), and stop_all_sounds().
| int g_bAudioSystemInitialized = 0 |
Definition at line 10 of file sound.c.
Referenced by InitializeAudioSystem(), and ServiceAudioStream().
| int g_bSpeechPlaybackDone |
Definition at line 23 of file sound.c.
Referenced by check_message(), ServiceSoundSystem(), and set_message_time().
| int g_bSpeechSoundActive |
Definition at line 20 of file sound.c.
Referenced by PlayRawSpeechBuffer(), and ServiceSoundSystem().
| ActiveSoundEntry* g_pActiveSoundHead = 0 |
Definition at line 8 of file sound.c.
Referenced by AllocateActiveSoundEntry(), FindActiveSoundEntryBySample(), ReleaseFinishedSoundEntries(), and RemoveActiveSoundEntry().
| ActiveSoundEntry* g_pActiveSoundTail = 0 |
Definition at line 9 of file sound.c.
Referenced by AllocateActiveSoundEntry(), and RemoveActiveSoundEntry().
| WaveTableEntry* g_pSnowStaticClip |
Definition at line 17 of file sound.c.
Referenced by PlaySnowStaticSound(), and stop_all_sounds().
| IxSound* g_pSpeechSnd |
Definition at line 18 of file sound.c.
Referenced by PlayRawSpeechBuffer(), and ServiceSoundSystem().
| WaveTableEntry* g_pWaveTableHead = 0 |
Definition at line 11 of file sound.c.
Referenced by AllocateWaveTableEntry(), FindWaveTableEntryByName(), FreeWaveTable(), and RemoveWaveTableEntry().
| WaveTableEntry* g_pWaveTableTail = 0 |
Definition at line 12 of file sound.c.
Referenced by AllocateWaveTableEntry(), FreeWaveTable(), and RemoveWaveTableEntry().
|
static |
Definition at line 436 of file sound.c.
Referenced by LoadVolumeSettingsFromRegistry(), and SaveVolumeSettingsToRegistry().
|
static |
Definition at line 437 of file sound.c.
Referenced by LoadVolumeSettingsFromRegistry(), and SaveVolumeSettingsToRegistry().