Sound::seekData

FMOD Studio API

Firelight Technologies FMOD Studio API

Sound::seekData

Seeks a sound for use with data reading. This is not a function to 'seek a sound' for normal use. This is for use in conjunction with Sound::readData.

C++ Syntax

FMOD_RESULT Sound::seekData(
  unsigned int pcm
);

C Syntax

FMOD_RESULT FMOD_Sound_SeekData(
  FMOD_SOUND *sound,
  unsigned int pcm
);

C# Syntax

RESULT Sound.seekData(
  uint pcm
);

JavaScript Syntax

Sound.seekData(
  pcm                              
);

Parameters

pcm
Offset to seek to 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

Note. If a stream is opened and this function is called to read some data, then it will advance the internal file pointer, so data will be skipped if you play the stream. Also calling position / time information functions will lead to misleading results.
A stream can be reset before playing by setting the position of the channel (ie using Channel::setPosition), which will make it seek, reset and flush the stream buffer. This will make it sound correct again.
Remember if you are calling readData and seekData on a stream it is up to you to cope with the side effects that may occur.

See Also




Version 1.10.03 Built on Feb 1, 2018