PROGRAMMER'S GUIDEStream system library
BackForward
Stream system library

7. Function specifications-3


7.3 Stream


 List
 Title

Function specifications

 Function

Opening a stream by file identifier

 Function Name

STM_OpenFid

 No

3.1 3.1

Form
StmHn STM_OpenFid (StmGrpHn grp, Sint32 fid, StmKey * key, Sint32 lpread)
input
 grp
 : Stream group handle
 fid
 : File identifier
 key
 : Stream key
 lpread
 : Reload specification during loop playback (StmLoopRead)
output
none
Function value
Stream handle (null on error)
function
Opens a stream with a file identifier and registers it in the specified stream group.
remarks
The file number of the stream key is not used.

 List
 Title

Function specifications

 Function

Opening a stream by playback range

 Function Name

STM_OpenFrange

 No

3.2

Form
StmHn STM_OpenFrange (StmGrpHn grp, StmFrange * flange, StmKey * key, Sint32 lpread)
input
 grp
 : Stream group handle
 frange
 : Playback range
 key
 : Stream key
 lpread
 : Reload specification during loop playback (StmLoopRead)
output
none
Function value
Stream handle (null on error)
function
Open the stream according to the playback range and register it in the stream group.

 List
 Title

Function specifications

 Function

Opening a resident stream

 Function Name

STM_OpenResi

 No

3.3

Form
StmHn STM_OpenResi (StmGrpHn grp, Sint32 fid, StmKey * key, Sint32 fad)
input
 grp
 : Stream handle
 fid
 : File identifier
 key
 : Stream key
 fad
 : Transfer start FAD
output
none
Function value
Stream handle (null on error)
function
Opens a resident stream.
remarks
Files on SIMM and SCSI can only be used as resident streams.

 List
 Title

Function specifications

 Function

Stream close

 Function Name

STM_Close

 No

3.4 3.4

Form
void STM_Close (StmHn stm)
input
stm: stream handle
output
none
Function value
none
function
Closes the specified stream.
remarks
If a transfer function is registered and the function value the last time it was called is (-1), the stream system will continue to call the transfer function until the transfer function returns a value greater than or equal to 0.

 List
 Title

Function specifications

 Function

Stream key settings

 Function Name

STM_SetKey

 No

3.5

Form
void STM_SetKey (StmHn stm, StmKey * stmkey)
input
 stm
 : Stream handle
 stmkey
 : Stream key
output
none
Function value
none
function
Sets the stream key for the specified stream.

 List
 Title

Function specifications

 Function

Get stream information

 Function Name

STM_GetInfo

 No

3.6

Form
StmGrpHn STM_GetInfo (StmHn stm, Sint32 * fid, StmFrange * flange, Sint32 * bn, StmKey * stmkey)
input
stm: stream handle
output
 fid
 : File identifier (when opened by playback range (-1))
 frange
 : Playback range
 bn
 : Buffer partition number
 stmkey
 : Stream key
Function value
Stream group to which you belong
function
Gets the information for the specified stream.

 List
 Title

Function specifications

 Function

Conversion from sector count to word count

 Function Name

STM_SctToWord

 No

3.7

Form
Sint32 STM_SctToWord (StmHn stm, Sint32 nsct)
input
 stm
 : Stream handle
 nsct
 : Number of sectors
output
none
Function value
The number of words corresponding to the specified number of sectors. In case of an error, the error code.
function
Acquires the number of words for the specified sector from the beginning of the data read in the CD buffer partition.
remarks

  1. If a value greater than the number of sectors being read is specified, the number of words in the data being read will be returned.

  2. It is also effective when forms 1 and 2 are mixed.


 List
 Title

Function specifications

 Function

Conversion from word count to sector count

 Function Name

STM_WordToSct

 No

3.8

Form
Sint32 STM_WordToSct (StmHn stm, Sint32 nword)
input
 stm
 : Stream handle
 nword
 : Number of words
output
none
Function value
The number of sectors corresponding to the specified number of words. In case of an error, the error code.
function
Acquires the number of sectors for the specified word from the beginning of the data read in the CD buffer partition.
remarks

  1. If a value greater than the number of words in the data being read is specified, the number of sectors being read will be returned.

  2. It is also effective when forms 1 and 2 are mixed.


 List
 Title

Function specifications

 Function

Stream handle alias settings

 Function Name

STM_SetAlias

 No

3.9

Form
Bool STM_SetAlias (StmHn alias, StmHn stm)
input
 alias
 : Alias stream handle
 stm
 : Stream handle to access
output
none
Function value
 TRUE
 : Alias can be set
 FALSE
 : The alias could not be set
function
Give the stream handle stm the alias alias.
remarks

  1. Use alias to allow you to work with the stream specified by stm.

  2. Specify an open stream for both alias and stm.

  3. Use STM_UnsetAlias to remove the alias.


 List
 Title

Function specifications

 Function

Stream handle dealiasing

 Function Name

STM_UnsetAlias

 No

3.10

Form
void STM_UnsetAlias (StmHn alias)
input
alias: Stream handle of the alias
output
none
Function value
None Clears the alias set for the stream.
remarks
It is a function to cancel the alias set by STM_SetAlias.

BackForward
PROGRAMMER'S GUIDEStream system library
Copyright SEGA ENTERPRISES, LTD., 1997