ISpStreamFormatConverter::ScaleBaseToConvertedOffset (Microsoft Speech Platform)

Microsoft Speech Platform SDK 11

Microsoft Speech Platform

ISpStreamFormatConverter::ScaleBaseToConvertedOffset

ISpStreamFormatConverter::ScaleBaseToConvertedOffset converts an offset in the base stream into the equivalent offset in the converted stream. This method is primarily used internally to map event offsets.

HRESULT ScaleBaseToConvertedOffset(
   ULONGLONG   ullOffsetBaseStream,
   ULONGLONG  *pullOffsetConvertedStream
);

Parameters

ullOffsetBaseStream
The current offset in the base (unconverted) stream.
pullOffsetConvertedStream
The new offset in the output (converted) stream.

Return values

Value Description
S_OK Function completed successfully.
E_POINTER pullOffsetConvertedStream is bad or invalid.
SPERR_UNINITIALIZED The base stream is not initialized.
E_INVALIDARG ullOffsetBaseStream is less than the initial seek position of the current steam. 

Remarks

When performing a mapping with a compressed format, it is possible to introduce small rounding errors, since the content of the audio is not used to perform the conversion.