/**
* SoundSystem written by Justin Klein, 2003
* based on BASS 1.8a, copyright (c) 1999-2003
Ian Luck.
* FOR THIS TO WORK, the project MUST link to
bass.lib.
**/
/**
* Startup and initialize the digital
soundsystem.
* HWND: A
handle to the window that will own the soundsystem
* Return FALSE for failure, TRUE for success.
**/
BOOL startupSoundSystem(
HWND hWnd );
/**
* Shuts down the soundsystem, freeing any
memory associated with it.
**/
void shutdownSoundSystem();
/**
* Returns TRUE if the soundsystem is
currently started up, FALSE if not.
**/
BOOL isSystemStarted();
/**
* Loads a sound or music, returning it as an SSsound.
* type must be either S_SOUND (pre-loaded) or S_MUSIC (streamed
off the drive).
**/
SSsound loadSound(char *filename, int
type);
/**
* Frees the memory associated with a sound
* TRUE = success, FALSE = failure
**/
BOOL freeSound(SSsound
*sound);
/**
* Begins playback on the a sound;
* if loop is true, the sound will play until stopped.
* return TRUE for success, FALSE for fail.
**/
BOOL playSound(SSsound
*sound, BOOL loop);
/**
* Pauses a sound if it’s currently playing.
* Note that only S_MUSIC’s may be paused and resumed;
* If the sound is an S_SOUND, this is equivalent to calling stopSound().
**/
BOOL pauseSound(SSsound
*sound);
/**
* Stops a sound if it’s currently playing;
* The sound will begin playback at the beginning the next time
playSound is called.
* If fadeTime = 0, the sound will stop immediately;
* If fadeTime > 0, the sound will fade to a stop over fadeTime
ms.
**/
BOOL stopSound(SSsound
*sound, int fadeTime);
/**
* Returns the total number of elapsed seconds
in the sound;
* This function ONLY works for streams
(musics)
* An error is indicated by a negative return
value
**/
float getSoundElapsedSecs(SSsound
*sound);
/**
* Returns the total number of seconds in the
sound;
* This function ONLY works for streams
(musics)
* An error is indicated by a negative return
value
**/
float getSoundTotalSecs(SSsound
*sound);
/**
* Seeks the specified sound to the specified
location.
* This ONLY works for streams (musics)
* Returns TRUE for success, FALSE for failure
**/
BOOL seekSound(SSsound
*sound, float secs);
/**
* Sets the volume for all sounds OR all
musics, depending on the param
*
-type can be S_MUSIC or S_SOUND
*
-level can be an integer from 0 to 100
**/
BOOL setVolume(int type, int level);
/**
* Retrieves the volume for all sounds OR all musics
**/
int getVolume(int type);
/**
* Sets the balance of the sound, from fully left (-100) to fully
right (100)
**/
BOOL setSoundBalance(SSsound
*sound, int pos);
/**
* Retreives the balance of the sound, from fully left (-100) to
fully right (100)
* -101 is returned to indicate an error.
**/
int getSoundBalance(SSsound
*sound);