Name
SeekStream -- seek sound stream to new position (V5.0)
Synopsis
void SeekStream(APTR handle, ULONG pos);
Function
This function must seek the specified sound stream handle to the position passed as parameter 2. The new position is specified in PCM frames. You only need to implement direct PCM frame seeking if you have set the flag HWSNDFLAGS_CANSEEK in OpenStream(). However, seeking back to position 0 has to be implemented by all plugins - no matter whether HWSNDFLAGS_CANSEEK has been set or not. If SeekStream() is called with 0 as the new position, you need to rewind the stream so that the next call to StreamSamples() returns PCM frames right from the start of the stream.

Warning: Due to a bug in Hollywood 5.x this function is called with non-zero positions even if HWSNDFLAGS_CANSEEK has not been set. This has been fixed in Hollywood 6.0. In Hollywood 6.0 and up SeekStream() is only ever called with a zero position if HWSNDFLAGS_CANSEEK hasn't been set.

This function must be implemented in a thread-safe way.

Inputs
handle
handle returned by OpenStream()
pos
new stream position in PCM frames

Show TOC