geSound

Functions:

GENESISAPI  geSound_System *geSound_CreateSoundSystem(HWND hWnd);

This function creates a sound system for the given window handle.

Returns: The geSound_System *.

Notes:
    from GENESIS.H: this function is only available if Windows.h is loaded before GENESIS.H
GENESISAPI void   geSound_DestroySoundSystem(geSound_System *Sound);
This function shuts down the specified SoundSystem and frees up the resources.

Returns: nothing.


GENESISAPI void geSound_FreeSoundDef(geSound_System *SoundS, geSound_Def *SoundDef);

This function removes a sound definition from the sound system and frees up the resources.

Returns: nothing.


GENESISAPI geSound_Def *geSound_LoadSoundDef(geSound_System *SoundS, geVFile *File);

incomplete

This function loads a sound definition file for use in the sound system.  This call must be matched by a FreeSoundDef to avoid memory leaks.  I assume the sound definition must be a valid wave file.

Returns: The geSound_Def *.

Questions:
    Is there any required format for the wave file?  Are there any restrictions?


GENESISAPI geBoolean  geSound_ModifySound(geSound_System *SoundS, geSound *Sound, geFloat Volume, geFloat Pan, geFloat Frequency);

incomplete

This function provides a facility whereby a playing sound's volume, panning, and the frequency can be changed. The Sound* is that returned by geSound_PlaySoundDef.

Returns: GE_TRUE on success, GE_FALSE otherwise.

Questions:
    What does it mean to change a sounds frequency?  Does this also change the playback speed?


GENESISAPI geSound *geSound_PlaySoundDef(geSound_System *SoundS, geSound_Def *SoundDef, geFloat Volume, geFloat Pan, geFloat Frequency, geBoolean Loop);

This function plays the previously loaded geSound_Def with the specified volume, pan, frequency, and optional looping.  The returned geSound* can be used in calls requiring a reference to the active sound such as geSound_ModifySound.

Returns: The geSound*.


GENESISAPI geBoolean  geSound_SetMasterVolume( geSound_System *SoundS, geFloat Volume );

This function sets the overall SoundSystem volume level.

Returns: GE_TRUE if successful, GE_FALSE otherwise.


GENESISAPI geBoolean  geSound_SoundIsPlaying(geSound_System *SoundS, geSound *Sound);

This function tests whether the specified Sound is currently playing.

Return: GE_TRUE is the specified sound is playing, GE_FALSE otherwise.


GENESISAPI geBoolean  geSound_StopSound(geSound_System *SoundS, geSound *Sound);

incomplete

This function will halt the currently playing specified sound. This function may fail if the Sound is not currently playing.  I believe this would not only stop a looping sound but would stop a single loop sound at whatever point it is called.  I also suspect that replaying the sound would start at the beginning of the sound_def not at the stopped point.

Returns: GE_TRUE on success, GE_FALSE otherwise.


GENESISAPI void geSound3D_GetConfig(const geWorld *World, const geXForm3d *CameraTransform, const geVec3d *SoundPos, geFloat Min, geFloat Ds, geFloat *Volume, geFloat *Pan, geFloat *Frequency);

incomplete

I believe this function can be used to compute the volume, pan, frequency for a positional sound relative to the player's position to simulate 3D sound.  I'll have to get back to this after becoming more familiar with XForms, etc.  Maybe I can find an example of the usage of this also.

Returns: nothing.