Wing Commander II
Reconstructed Win32 source (1996)
Loading...
Searching...
No Matches
sound.c File Reference

Wave playback, sound bookkeeping and volume settings. More...

#include "game.h"

Go to the source code of this file.

Functions

void InitializeAudioSystem (HWND window)
void ServiceAudioStream (void)
WaveTableEntry * AllocateWaveTableEntry (void)
WaveTableEntry * FindWaveTableEntryByName (const char *name)
int __fastcall ix_sound_is_playing (IxSound *sound)
void ix_system_delete_sound (IxSound *sound)
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 PlayRawSpeechBuffer (void *buffer, size_t size, int interrupt)
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)
IxSample *__fastcall ix_sound_get_sample (IxSound *sound)

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"

Detailed Description

Wave playback, sound bookkeeping and volume settings.

Definition in file sound.c.

Function Documentation

◆ AllocateActiveSoundEntry()

◆ AllocateWaveTableEntry()

◆ FindActiveSoundEntryBySample()

◆ FindWaveTableEntryByName()

WaveTableEntry * FindWaveTableEntryByName ( const char * name)

◆ FreeWaveTable()

◆ InitializeAudioSystem()

◆ ix_sound_get_sample()

IxSample *__fastcall ix_sound_get_sample ( IxSound * sound)
inline

◆ ix_sound_is_playing()

int __fastcall ix_sound_is_playing ( IxSound * sound)

Definition at line 361 of file sound.cpp.

◆ ix_system_delete_sound()

void ix_system_delete_sound ( IxSound * sound)

Definition at line 184 of file system.cpp.

◆ LoadVolumeSettingsFromRegistry()

◆ PlayRawSpeechBuffer()

◆ PlaySnowStaticSound()

◆ playWAVE()

◆ RegistryQueryValue()

LONG RegistryQueryValue ( HKEY key,
LPCSTR name,
DWORD type,
LPBYTE data,
DWORD size )

◆ RegistryStoreValue()

void RegistryStoreValue ( HKEY key,
LPCSTR name,
DWORD type,
const BYTE * data,
DWORD size )

◆ ReleaseFinishedSoundEntries()

◆ RemoveActiveSoundEntry()

◆ RemoveWaveTableEntry()

void RemoveWaveTableEntry ( WaveTableEntry * target)

◆ SaveVolumeSettingsToRegistry()

◆ ServiceAudioStream()

◆ ServiceSoundSystem()

◆ SetSoundEffectsVolume()

void SetSoundEffectsVolume ( int volume)

◆ stop_all_sounds()

◆ StopSoundsUsingWave()

Variable Documentation

◆ g_16_nSpeechCompletionDelay

int g_16_nSpeechCompletionDelay

Definition at line 19 of file sound.c.

Referenced by PlayRawSpeechBuffer(), and ServiceSoundSystem().

◆ g_1_pVoiceWav

WaveTableEntry* g_1_pVoiceWav

Definition at line 16 of file sound.c.

Referenced by PlayRawSpeechBuffer().

◆ g_9_nNextSfx16PlaybackFrame

int g_9_nNextSfx16PlaybackFrame

Definition at line 22 of file sound.c.

Referenced by playWAVE().

◆ g_9_pSnowStaticAudio

IxSound* g_9_pSnowStaticAudio

Definition at line 21 of file sound.c.

Referenced by PlaySnowStaticSound(), and stop_all_sounds().

◆ g_bAudioSystemInitialized

int g_bAudioSystemInitialized = 0

Definition at line 10 of file sound.c.

Referenced by InitializeAudioSystem(), and ServiceAudioStream().

◆ g_bSpeechPlaybackDone

int g_bSpeechPlaybackDone

Definition at line 23 of file sound.c.

Referenced by check_message(), ServiceSoundSystem(), and set_message_time().

◆ g_bSpeechSoundActive

int g_bSpeechSoundActive

Definition at line 20 of file sound.c.

Referenced by PlayRawSpeechBuffer(), and ServiceSoundSystem().

◆ g_pActiveSoundHead

◆ g_pActiveSoundTail

ActiveSoundEntry* g_pActiveSoundTail = 0

Definition at line 9 of file sound.c.

Referenced by AllocateActiveSoundEntry(), and RemoveActiveSoundEntry().

◆ g_pSnowStaticClip

WaveTableEntry* g_pSnowStaticClip

Definition at line 17 of file sound.c.

Referenced by PlaySnowStaticSound(), and stop_all_sounds().

◆ g_pSpeechSnd

IxSound* g_pSpeechSnd

Definition at line 18 of file sound.c.

Referenced by PlayRawSpeechBuffer(), and ServiceSoundSystem().

◆ g_pWaveTableHead

WaveTableEntry* g_pWaveTableHead = 0

◆ g_pWaveTableTail

WaveTableEntry* g_pWaveTableTail = 0

Definition at line 12 of file sound.c.

Referenced by AllocateWaveTableEntry(), FreeWaveTable(), and RemoveWaveTableEntry().

◆ g_szMusicVolumeValueName

char g_szMusicVolumeValueName[] = "MusicVolume"
static

Definition at line 436 of file sound.c.

Referenced by LoadVolumeSettingsFromRegistry(), and SaveVolumeSettingsToRegistry().

◆ g_szSfxVolumeValueName

char g_szSfxVolumeValueName[] = "SFXVolume"
static

Definition at line 437 of file sound.c.

Referenced by LoadVolumeSettingsFromRegistry(), and SaveVolumeSettingsToRegistry().