Firelight Technologies FMOD Studio API
System::getRecordPosition
Retrieves the current recording position of the record buffer in PCM samples.
C++ Syntax
FMOD_RESULT System::getRecordPosition(
int id,
unsigned int *position
);
C Syntax
FMOD_RESULT FMOD_System_GetRecordPosition(
FMOD_SYSTEM *system,
int id,
unsigned int *position
);
C# Syntax
RESULT System.getRecordPosition(
int id,
out uint position
);
JavaScript Syntax
System.getRecordPosition(
id,
position // writes value to position.val
);
Parameters
- id
- Enumerated driver ID. This must be in a valid range delimited by System::getRecordNumDrivers.
- position
- Address of a variable to receieve the current recording position in PCM samples.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the FMOD_RESULT enumeration.
Remarks
Will return FMOD_ERR_RECORD_DISCONNECTED if the driver is unplugged.
The position will return to 0 when System::recordStop is called or when a non-looping recording reaches the end.
PS4 specific note: Record devices are virtual so 'position' will continue to update if the device is unplugged (the OS is generating silence). This function will still report FMOD_ERR_RECORD_DISCONNECTED for your information though.
See Also
Version 1.10.03 Built on Feb 1, 2018