Previous Topic Index Next Topic
[API function]

FSOUND_Sample_Upload

This function uploads new sound data from memory to a preallocated/existing sample and does conversion based on the specified source mode.
If sample data already exists at this handle then it is replaced with the new data being uploaded.

signed char F_API FSOUND_Sample_Upload(
FSOUND_SAMPLE *sptr,
void *srcdata,
unsigned int mode_in
);

Parameters

sptr Pointer to the destination sample
srcdata Pointer to the source data to be uploaded. On PlayStation 2 this is an IOP address not an EE address.
mode Description of the source data format. Bitwise OR in these bits to describe the data being passed in.
See FSOUND_MODES for valid parameters and descriptions.
FSOUND_HW3D, FSOUND_HW2D and FSOUND_LOOP modes are ignored, the mode describes the source format, not the destination format.

Return Value

On success, TRUE is returned.
On failure, FALSE is returned.

Remarks

Note that on PlayStation 2 the source data address is an IOP address not an EE address.
To get data from EE RAM to the sample you must allocate some IOP memory, dma it to IOP memory then call upload. There are helper functions in fmodps2.h to achieve this.
___________________
Supported on the following platforms : Win32, WinCE, Linux, Macintosh, XBox, PlayStation 2, GameCube

See Also

FSOUND_MODES , FSOUND_Sample_Alloc , FSOUND_Sample_Lock , FSOUND_Sample_Unlock

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