int ok = SaveSample(STRPTR filename, struct SaveSampleCtrl *ctrl);
struct SaveSampleCtrl
to this function. This structure looks like this:
struct SaveSampleCtrl { APTR Data; // [in] int DataSize; // [in] int Samples; // [in] int Channels; // [in] int Bits; // [in] int Frequency; // [in] ULONG Flags; // [in] ULONG FormatID; // [in] -- V5.3 }; |
In this structure Hollywood passes the following information to your SaveSample()
function:
Data:
DataSize:
Data
buffer in bytes.
Samples:
Channels:
Bits:
Frequency:
Flags:
HWSNDFLAGS_BIGENDIAN
HWSNDFLAGS_SIGNEDINT
FormatID:
This function has to return True
if the sample has been successfully saved or False
in case of an error.
struct SaveSampleCtrl
containing the sample to be savedTrue
or False
indicating success or failure