70 if (strcmp(entry->
name, name) == 0)
87 while (target != 0 && target != searchTarget) {
89 target = target->
next;
147 while (target != 0 && target != searchTarget) {
149 target = target->
next;
215void playWAVE(
const char *filename,
int looping,
int volume)
217 unsigned char *fileData;
242 file = _open(filename, 0x8000);
244 MessageBoxA(0,
"playWAVE Unable to open file '%s'",
245 filename, MB_ICONHAND);
248 fileSize = filelength(file);
249 fileData = (
unsigned char *)malloc((
unsigned int)fileSize);
250 _read(file, fileData, (
unsigned int)fileSize);
269 wave->
name = (
char *)malloc(strlen(filename) + 1);
270 strcpy(wave->
name, filename);
294 unsigned char *fileData;
301 file = _open(
"sfx22.wav", 0x8000);
304 "playWAVE Unable to open file 'sfx23",
305 "Notice", MB_ICONHAND);
308 fileSize = filelength(file);
309 fileData = (
unsigned char *)malloc((
unsigned int)fileSize);
310 _read(file, fileData, (
unsigned int)fileSize);
323 (
char *)malloc(strlen(
"SNOW") + 1);
342 if (volume >= 0 && volume < 65000)
349 LPBYTE data, DWORD size)
351 return RegQueryValueExA(key, name, 0, &type, data, &size);
356 const BYTE *data, DWORD size)
358 RegSetValueExA(key, name, 0, type, data, size);
366 if (RegOpenKeyExA(HKEY_LOCAL_MACHINE,
367 "Software\\Origin Systems\\WC: Kilrathi Saga",
368 0, KEY_ALL_ACCESS, &key) == ERROR_SUCCESS) {
396 if (RegOpenKeyExA(HKEY_LOCAL_MACHINE,
397 "Software\\Origin Systems\\WC: Kilrathi Saga",
398 0, KEY_ALL_ACCESS, &key) == ERROR_SUCCESS) {
static WaveTableEntry * pWaveTableTail
static IxSound * pSnowStaticSound
static int bAudioSystemInitialized
static char szMusicVolumeValueName[]
static ActiveSoundEntry * pActiveSoundHead
static WaveTableEntry * pWaveTableHead
static ActiveSoundEntry * pActiveSoundTail
static char szSfxVolumeValueName[]
static WaveTableEntry * pSnowStaticWave
struct ActiveSoundEntry * next
int ix_sample_load_wav(void *data, int bytes)
void ix_system_sound_set_volume(unsigned short newVolume)
void ix_sound_set_delete_on_stop(int enabled)
struct WaveTableEntry * next
Umbrella header for the game core.
void SoundDebugPrintf(const char *fmt,...)
void ix_system_set_master_volume(unsigned short volume)
void ix_system_delete_all_samples(void)
void LoadVolumeSettingsFromRegistry(void)
void SaveVolumeSettingsToRegistry(void)
ActiveSoundEntry * AllocateActiveSoundEntry(void)
void __fastcall ix_sound_stop(IxSound *sound)
void ServiceAudioStream(void)
void RemoveWaveTableEntry(WaveTableEntry *entry)
void RemoveActiveSoundEntry(ActiveSoundEntry *entry)
void PlaySnowStaticSound(void)
void playWAVE(const char *filename, int looping, int volume)
int __fastcall ix_sound_is_playing(IxSound *sound)
WaveTableEntry * AllocateWaveTableEntry(void)
IxSound * ix_system_new_sound(IxSample *sample)
WaveTableEntry * FindWaveTableEntryByName(const char *name)
void ix_system_shutdown(void)
void stop_all_sounds(void)
void ix_system_configure(int option, void *value)
ActiveSoundEntry * FindActiveSoundEntryBySample(IxSample *sample)
void ServiceSoundSystem(void)
LONG RegistryQueryValue(HKEY key, LPCSTR name, DWORD type, LPBYTE data, DWORD size)
void InitializeAudioSystem(HWND window)
void ix_system_set_voice_count(int voiceCount)
void ix_system_delete_all_sounds(void)
void ReleaseFinishedSoundEntries(void)
IxSample * ix_system_new_sample(void)
void StopSoundsUsingWave(const char *name)
void __fastcall ix_sound_start(IxSound *sound)
void ix_system_delete_sound(IxSound *sound)
void __fastcall ix_sound_release(IxSound *sound)
void SetSoundEffectsVolume(int volume)
void ix_system_service_sounds(void)
void RegistryStoreValue(HKEY key, LPCSTR name, DWORD type, const BYTE *data, DWORD size)