Japanese
PROGRAMMER'S GUIDEStream system library
BackForward
stream system library

7.Function specification-3


7.3 Stream


 one
View
table
 Title

function specification

 Function

Stream by file identifier
opening of

 Function name

STM_OpenFid

 No

3.1

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

 one
View
table
 Title

function specification

 Function

Opening a stream by playback range

 Function name

STM_OpenFrange

 No

3.2

Format
StmHn STM_OpenFrange(StmGrpHn grp, StmFrange *frange, StmKey *key, Sint32 lpread)
input
 grp
 :stream group handle
 frange
 : Playback range
 key
 :Stream key
 lpread
 : Rereading specification during loop playback (StmLoopRead)
output
none
function value
Stream handle (NULL in case of error)
function
Open a stream according to the playback range and register it to a stream group.

 one
View
table
 Title

function specification

 Function

Opening a resident stream

 Function name

STM_OpenResi

 No

3.3

Format
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 in case of error)
function
Open a resident stream.
remarks
Files on SIMM and SCSI are available only as resident streams.

 one
View
table
 Title

function specification

 Function

Closing the stream

 Function name

STM_Close

 No

3.4

Format
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 was (-1), the stream system will continue to call the transfer function until the transfer function returns a value greater than or equal to 0.

 one
View
table
 Title

function specification

 Function

Stream key settings

 Function name

STM_SetKey

 No

3.5

Format
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.

 one
View
table
 Title

function specification

 Function

Get stream information

 Function name

STM_GetInfo

 No

3.6

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

 one
View
table
 Title

function specification

 Function

Conversion from number of sectors to number of words

 Function name

STM_SctToWord

 No

3.7

Format
Sint32 STM_SctToWord(StmHn stm, Sint32 nsct)
input
 stm
 :Stream handle
 nsct
 : Number of sectors
output
none
function value
Number of words corresponding to the specified number of sectors. In case of an error, the error code.
function
Gets the number of words in the specified sector from the beginning of the data being read into the CD buffer section.
remarks

  1. If a value larger than the number of sectors being read is specified, the number of words of data being read is returned.

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


 one
View
table
 Title

function specification

 Function

Conversion from number of words to number of sectors

 Function name

STM_WordToSct

 No

3.8

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

  1. If a value larger than the number of words of data being read is specified, the number of sectors being read is returned.

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


 one
View
table
 Title

function specification

 Function

Stream handle alias settings

 Function name

STM_SetAlias

 No

3.9

Format
Bool STM_SetAlias(StmHn alias, StmHn stm)
input
 alias
 : alias stream handle
 stm
 :stream handle to access
output
none
function value
 TRUE
 : Alias was set.
 FALSE
 : Alias could not be set
function
Add an alias to the stream handle stm.
remarks

  1. Use alias to be able to manipulate the stream specified by stm.

  2. Please specify an open stream for both alias and stm.

  3. To remove an alias, use STM_UnsetAlias.


 one
View
table
 Title

function specification

 Function

Unaliasing a stream handle

 Function name

STM_UnsetAlias

 No

3.10

Format
void STM_UnsetAlias(StmHn alias)
input
alias: alias stream handle
output
none
function value
none
Cancels the alias set for the stream.
remarks
This is a function to cancel the alias set with STM_SetAlias.

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