home *** CD-ROM | disk | FTP | other *** search
- Stasis Version 1.10
- ===================
-
- SWI Documentation
- =================
-
- Stasis supports an SWI block based at &47D40.
-
- --------------------------------
-
- Stasis_Load
- ===========
-
- Loads a sample from a file.
-
- On Entry
-
- R0 = slot
- R1 = filename
- R2 = type
-
- On Exit
-
- R1,R2 preserved
-
- Interrupt status is unaltered. SWI is not re-entrant.
-
- Use
-
- This SWI will load a sample from a file into memory. If R2=3 the sample is
- loaded into the Amnesia area, otherwise it is loaded into the RMA.
-
- ----------------------------------
-
- Stasis_Save
- ===========
-
- Save a sample from a file.
-
- On Entry
-
- R0 = slot
- R1 = filename
- R2 = type string
-
- On Exit
-
- R1,R2 preserved
-
- Interrupt status is unaltered. SWI is not re-entrant.
-
- Use
-
- This SWI will save a sample to a file. R2 points to a type string such as
- "Stasis" or "DataVox". If R2=0 then stasis native format is assumed. The
- sample is then packaged into the specified format and saved.
-
- ----------------------------------
-
- Stasis_Link
- ===========
-
- Attaches a sound channel to sample.
-
- On Entry
-
- R0 = channel
- R1 = slot
-
- On Exit
-
- R1 preserved
-
- Interrupt status is unaltered. SWI is re-entrant.
-
- Use
-
- This SWI will update the Stasis link table so that any new sounds will use
- the sample in the specified slot. Samples currently playing will not be
- affected. Note that unlike the *StasisLink command this SWI will not attach
- the channel to the Stasis voice. You must either use a *StasisLink command
- at least once before using this SWI, or attach the voice yourself using the
- *ChannelVoice command or Stasis_Attach.
-
- ----------------------------------
-
- Stasis_Attach
- =============
-
- Attaches a sound channel to the Stasis module.
-
- On Entry
-
- R0 = channel
-
- On Exit
-
- R0 corrupted
-
- Interrupt status is unaltered. SWI is not re-entrant.
-
- Use
-
- This attaches a channel to the Stasis module, like *Channelvoice 1 Stasis
- would.
-
- ----------------------------------
-
- Stasis_Name
- ===========
-
- Changes the name of a sample
-
- On Entry
-
- R0 = slot
- R1 = pointer to name string
-
- On Exit
-
- R1 preserved
-
- Interrupt status is unaltered. SWI is not re-entrant.
-
- Use
-
- This changes the name of a sample - the name that is help in the sample
- header. If the sample format does not include space for a name, this SWI has
- no effect.
-
- ----------------------------------
-
- Stasis_VolSlide
- ===============
-
- Sets a volume slide
-
- On Entry
-
- R0 = channel
- R1 = target volume (0-&7F)
- R2 = time (in centiseconds)
-
- On Exit
-
- R1,R2 preserved
-
- Interrupt status is unaltered. SWI is re-entrant.
-
- Use
-
- This SWI sets up a volume slide on the specified channel. The volume will
- increase or decrease, as necessary, so that the target volume is reached in
- the specified time. R2=0 is valid, but R2=1 is a more sensible way of
- achieving the same thing. Both with adjust the volume to R1 immediately.
-
- ----------------------------------
-
- Stasis_PitchSlide
- =================
-
- Sets a pitch slide
-
- On Entry
-
- R0 = channel
- R1 = target pitch ( > &1000)
- R2 = time (in buffer fills)
-
- On Exit
-
- R1,R2 preserved
-
- Interrupt status is unaltered. SWI is re-entrant.
-
- Use
-
- This SWI sets up a pitch slide on the specified channel. Its action is
- similar to Stasis_VolSlide.
-
- ----------------------------------
-
- Stasis_Slide
- ============
-
- Sets a slide of the specified type
-
- On Entry
-
- R0 = channel
- R1 = type
- R2 = target volume or pitch
- R3 = time (in buffer fills)
-
- On Exit
-
- R1-R3 preserved
-
- Interrupt status is unaltered. SWI is re-entrant.
-
- Use
-
- This is the preferred way of setting slides. If R1=0 a volume slide is set.
- If R1=1, a pitch slide. The bits in R0 have the following effect:
-
- bit 31 : do not write the target pitch to the control block.
- bit 30 : do not write the rate.
- bit 29 : treat R3 as a rate, not a time. R3 will be added to the volume or
- pitch on each buffer fill.
- bit 28 : if this is a pitch slide R2 will not be passed through Sound_Pitch
- before writing.
-
- ----------------------------------
-
- Stasis_Control
- ==============
-
- Does nothing - retained for past compatibility
-
- ----------------------------------
-
- Stasis_FineTune
- =================
-
- Sets the finetune value for a sample
-
- On Entry
-
- R0 = slot
- R1 = finetune
-
- On Exit
-
- R1 preserved
-
- Interrupt status is unaltered. SWI is re-entrant.
-
- Use
-
- Sets the finetune value for a sample. The default value is &4000. A value
- of &8000 will play the sample an octave higher, and a value of &2000 will
- play it an octave lower.
-
- ----------------------------------
-
- Stasis_Sound
- ============
-
- Makes a sound
-
- On Entry
-
- R0 = channel
- R1 = slot
- R2 = volume
- R3 = pitch
- R4 = the ignore value
-
- On Exit
-
- R1-R3 preserved
-
- Interrupt status is unaltered. SWI is re-entrant.
-
- Use
-
- This command is analagous to Sound_Control. The difference is that you
- specify a sample slot to play, and the pitch must be specified in the > &1000
- form. The volume should be specified as 0-&7F.
-
- The bits in R4 have the following effect.
-
- bit 0 : ignore the slot
- bit 1 : ignore the volume
- bit 2 : ignore the pitch
- bit 3 : update - do not alter the channel flags
- bit 4 : do not pass the pitch through Sound_Pitch
- bit 5 : silence the sound - used internally when an escape is handled
-
- These bits may be set to provide updates. For example, Stasis_Volume calls
- this SWI with bit 0,2 and 3 set.
-
- ----------------------------------
-
- Stasis_GetSlotInfo
- ==================
-
- Return information on the sample in a slot
-
- On Entry
-
- R0 = slot
-
- On Exit
-
- R0 preserved
- R1 = pointer to name string
- R2 = sample length
- R2 = sample length
- R3 = finetune value
- R4 = repeat offset
- R5 = repeat length
- R6 = address of sample data
- R7 = sample volume entry
- R8 = 0 (for future expansion)
-
-
- Interrupt status is unaltered. SWI is re-entrant.
-
- Use
-
- This sample returns information on a sample. If items such as finetune or
- volume are missing from tha sample format then 0 will be returned in that
- register.
-
- ----------------------------------
-
- Stasis_PutSlotInfo
- ==================
-
- Updates various details of a sample in a slot
-
- On Entry
-
- R0 preserved
- R1 = pointer to name string
- R2 = sample length
- R2 = sample length
- R3 = finetune value
- R4 = repeat offset
- R5 = repeat length
- R6 = address of sample data
- R7 = sample volume entry
- R8 = flag field
-
-
- Interrupt status is unaltered. SWI is not re-entrant.
-
- Use
-
- This SWI updates the details of a sample. Values may or may not be written
- depending on the value of R8. If bit 1 is set, R1 will be written. If bit 2
- is set R2 will be written and so on. If the sample format does not support
- the details you are trying to write an error will be returned. The error
- returning method here is slightly flawed, as is calls OS_WriteS of its own
- accord.
-
- ------------------------------
-
- This file last updated 15/8/94 by A.Southgate.
-