Previous Topic Index Next Topic
[API function]

FSOUND_Record_StartSample

Starts recording into a predefined sample using the sample's default playback rate as the recording rate.

signed char F_API FSOUND_Record_StartSample(
FSOUND_SAMPLE *sptr,
signed char loop
);

Parameters

sptr The sample to record into.
loop TRUE or FALSE flag whether the recorder should keep recording once it has hit the end,
and start from the start again, therefore creating a continuous recording session into that
sample buffer. Looping the recording buffer is good for realtime processing of recorded
information, as you can record and playback the sample at the same time.

Return Value

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

Remarks

Note: If you want to play back the sample at the same time is is recording, you will have to play the sound
and try and keep it just behind the recording cursor.
The recording/playback rate are slightly innacurate and are not identical, so one will be faster or slower
than the other. In this case the recording and the playback cursor could overlap, and the output will sound
corrupted. In the recording sample there is an example of trying to play back sound as it records, and
the mechanism to try and keep the 2 cursors a safe distance from each other is to call GetPosition for each,
and use FSOUND_SetFrequency on the playback, to slow it down if it is getting too close, or speed it up if it
is getting too far behind.
___________________
Supported on the following platforms : Win32, WinCE

See Also

FSOUND_GetCurrentPosition , FSOUND_Record_GetPosition , FSOUND_Record_Stop , FSOUND_SetFrequency

This document copyright ©Firelight Technologies, Pty, Ltd, 1999-2002. All rights reserved.
Generated Fri Dec 20 16:31:09 2002 by SourceDoc v0.10, the automated source code documenter.