After a stream is created, and before it is possible to start the stream, it is necessary to make sure that a data resource (or stream object) is identified for use with the stream. The following example shows an example of a stream being associated with an MMIO file handle. The file system stream handler (FSSH) will always be the stream handler that we want to associate the data object with, therefore, if we have created a playback stream then FSSH is the source, so associate with the source. On a record stream, FSSH is the target, so associate with the target.
if (Operation == PLAY_STREAM) { ulrc = SpiAssociate ( (HSTREAM)*hStream, hidSrc, (PVOID) &pInstance->StreamInfo.acbmmio); } /* Associating play stream */