hssSound Class Reference

#include <hssData.h>

List of all members.


Detailed Description

Sound class.

Use this class to load a Waves sound.
You can play n times this wave with hssEngine::playSound(), from one call to another you can vary the Sound's properties like volume or loop flag, this affects only the next hssEngine::playSound() call.

Don't deallocated or reloaded a Sound that are playing or your app will crash!

Supports 8bit/16bit uncompressed and Microsoft ADPCM compressed mono/stero WAVs.


Public Member Functions

HSS_API_H void volume (u32 v)
 Set sample volume.
HSS_API_H u32 volume ()
 Get sample volume.
HSS_API_H void frequency (u32 f)
 Set sample frequency.
HSS_API_H u32 frequency ()
 Get sample frequency.
HSS_API_H void speed (u32 s)
 Set sound speed.
HSS_API_H u32 speed ()
 Get sound speed.
HSS_API_H void loop (bool l)
 Set sample loop flag.
HSS_API_H bool loop ()
 Get sample loop flag.
HSS_API_H void pan (u32 p)
 Set sample pan value.
HSS_API_H u32 pan ()
 Get sample pan value.
HSS_API_H void maxplaybacks (s32 mpb)
 Sets the maximum number of times a sample can play back at once.
HSS_API_H s32 maxplaybacks ()
 Gets the maximum number of times a sample can play back at once.
HSS_API_H s32 load (const _TCHAR *wavname)
 Load a sample from file.
HSS_API_H s32 load (void *membuf, bool copytomem)
 Load a sample from memory.


Member Function Documentation

HSS_API_C void hssSound::volume ( u32  v  ) 

Set sample volume.

Parameters:
v new sample volume. Can vary from 0 to 64. 0 = silence, 64 = full volume.

HSS_API_C u32 hssSound::volume (  ) 

Get sample volume.

HSS_API_C void hssSound::frequency ( u32  f  ) 

Set sample frequency.

Parameters:
f new sample frequency.

HSS_API_C u32 hssSound::frequency (  ) 

Get sample frequency.

HSS_API_C void hssSound::speed ( u32  s  ) 

Set sound speed.

Parameters:
s new sound speed.

HSS_API_C u32 hssSound::speed (  ) 

Get sound speed.

HSS_API_C void hssSound::loop ( bool  l  ) 

Set sample loop flag.

Parameters:
l new saple loop properties. false = disable loop, true = enable loop.

HSS_API_C bool hssSound::loop (  ) 

Get sample loop flag.

Returns:
false = loop disabled, true = loop enabled.

HSS_API_C void hssSound::pan ( u32  p  ) 

Set sample pan value.

Value can vary between 0 (completely left output) and 255 (completely right output)
Value of 128 will result in no panning at all (same output on left and right channel).

HSS_API_C u32 hssSound::pan (  ) 

Get sample pan value.

Returns:
the pan value.

HSS_API_C void hssSound::maxplaybacks ( s32  mpb  ) 

Sets the maximum number of times a sample can play back at once.

HSS_API_C s32 hssSound::maxplaybacks (  ) 

Gets the maximum number of times a sample can play back at once.

HSS_API_C s32 hssSound::load ( const _TCHAR *  wavname  ) 

Load a sample from file.

Supports 8, 16 bit uncompressed and Microsoft ADPCM compressed mono/stereo WAVs

Parameters:
wavname filename of wave to load.
Returns:
HSS_OK on success, error code on failure.

HSS_API_C s32 hssSound::load ( void *  membuf,
bool  copytomem 
)

Load a sample from memory.

Supports 8, 16 bit uncompressed and Microsoft ADPCM compressed mono/stereo WAVs

Parameters:
membuf pointer to memory where wave was placed.
copytomem tell if the sample will be copied to a new memory block.
Returns:
HSS_OK on success, error code on failure.


Generated on Sun Nov 19 14:15:15 2006 for Hekkus Sound System by  doxygen 1.5.1-p1