FSOUND_Stream_Create

##### [API function]

## FSOUND_Stream_Create

Creates a user definable stream file ready for playing. The stream is serviced through a callback.

DLL_API FSOUND_STREAM * F_API FSOUND_Stream_Create(
FSOUND_STREAMCALLBACK callback,
int lenbytes,
unsigned int mode,
int samplerate,
void *userdata
);

### Parameters

callback | A pointer to a user defined stream callback function.
lenbytes | Size of the data in BYTES the callback will require to be written to the buffer.
mode | Description of the raw sample data being opened. see FSOUND_MODES for a description of these modes.
samplerate | Rate of playback. Be careful you dont set the sample rate too high so that the stream servicer (ie the harddisk) may not keep up.
userdata | User data that is passed back into the stream callback when triggered.

### Return Value

On success, a pointer to an opened stream is returned.
On failure, NULL is returned.

### Remarks

This method only supports SIGNED RAW streams to be written to the buffer supplied by the callback.
They can be 8 or 16 bit, mono or stereo.
'lenbytes' may be rounded down to the nearest sample alignment in bytes. Ie if you specified 1001 bytes for a 16bit stereo sample stream, len would return 1000 in the callback. (250 samples * 4 bytes per sample)
PlayStation 2 IMPORTANT! : if FSOUND_SendData is NOT called from the stream callback the IOP will hang because it is waiting for this command to be executed before it can unlock its buffer.
___________________
Supported on the following platforms : Win32, WinCE, Linux, Macintosh, XBox, PlayStation 2, GameCube

### See Also

FSOUND_MODES , FSOUND_SendData , FSOUND_Stream_Close , FSOUND_Stream_Play , FSOUND_Stream_PlayEx , FSOUND_Stream_SetBufferSize , FSOUND_Stream_Stop , FSOUND_STREAMCALLBACK

This document copyright ©Firelight Technologies, Pty, Ltd, 1999-2002. All rights reserved.
Generated Thu Dec 15 17:31:35 2005 by SourceDoc v0.10, the automated source code documenter.