Simple Sound for Small Devices
libsssd
last updated: 05 JUN 2003 (v0.6)

Function Name:  sssd_playSamplePP

  Asks the mixer to play a sample.  A simplified marco for this command is called sssd_playSample().


C Prototype:

int sssd_playSample( struct sssdaudio* ga, int sample_id, int flags, int repeat_count,
int volume, int pan, int playStart, int playEnd, int loopStart, int loopEnd, int priorityQueue )

  Other Prototypes:



Arguments:


struct gameaudio *ga

    Pointer to an initialized sssdaudio structure (returned by sssd_initAudio)

int sample_id

    Sample ID number returned by loadSample..., copySample..., or registerSample.

int flags

    Reserved for future flags.

int repeat count

    Number of times to repeat sample.  1 plays the sample once, 0 plays loops the sample indefinately.  Numbers greater than 1 will play the sample n number of times.

int volume

    Volume to play the sample at.  0 is silent, 256 is full volume.

int pan

    Pan location to play sample at.  -128 is left speaker, 0 is center, and 128 is right speaker.  This argument is ignored if the mixed is set to mono (channels=1)

int playStart

    The sample playing should begin with, or SAMPLE_DEFAULTPOS for the default position (0)

int playEnd

    The sample playing should stop on, or SAMPLE_DEFAULTPOS for the default position (end)

int loopStart

    The sample looping should begin with, or SAMPLE_DEFAULTPOS for the default position (0)

int loopEnd

    The sample at which point playing should loop back to loopStart, or SAMPLE_DEFAULTPOS for the default position (end)

int priorityQueue

    Unsupported.  For future compatibility this should always be set to PRIQ_NONE.


Returns:


!=0
Playing_id to be used to control play instance of sample.

0
    Invalid sample_id.

Notes:

   The values playStart, playEnd, loopStart, and loopEnd are integers representing the sample to start with.  They are not bytes or pointers to data.


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.