Simple Sound for Small Devices
libsssd
last updated: 24 JUN 2003 (v0.8)

Function Name:  sssd_initAudio

   Initialize the sssdaudio struct used by libsssd.  Also set main sssd subsystem parameters.

C Prototype:

struct sssdaudio* sssd_initAudio(int channels, int freq, int bits, int max_voices, int max_samples, int buffersize, int numBuffers, int flags)

  Other Prototypes:



Arguments:


int channels

    Number of channels for subsystem.  Only 1 (mono) and 2 (stereo) are currently supported.

int freq

    Sample frequency for sssd subsystem. (see usage notes)

int bits


    Bits per sample datum.  Only 8 (8-bit) and 16 (16-bit) are currently supported.  (see usage notes)

int max_voices


    The number of voices, excluding background music, to allocate.  All will be software mixed.

int max_samples


    The number of sample registrations to allocate.

int buffersize

    The size in bytes prefered for the mixing buffer.  0 indicates sssd should allow the drivers to suggest a size.  There is no guarantee that the buffer will indeed be this number of bytes.   The OS may override it.  (see usage notes)

int numBuffers

    The number of audio buffers to allocate for playing (1=single buffering, 2=double buffering, 4=quad buffering, etc...)

int flags

    Any of the following flags ORed (|) together:

SSSDSYS_CONSTRATE
   Provide the audio device with a constant data rate.  By default, if there is nothing to play, libsssd does not bother sending sending data to the audio device.  Using the flag SSSDSYS_CONSTRATE will send a constant stream of audio data to the device, even if the audio buffer contains silence.


Returns:


>0
Pointer to a sssdaudio structure.

0/NULL
Error allocating memory for the sssdaudio structure.



libsssd (c)2003 Patrick Roberts created from libgaudio (c) 1999-2000 A. Schiffler.  Release as open source under MPL 1.1.  Documentation (c)2003 Patrick Roberts.