home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 2 / RISC_DISC_2.iso / pd_share / program / gamesuite / !Stasis / StasisHelp / SWIDocs < prev   
Encoding:
Text File  |  1995-01-29  |  6.5 KB  |  351 lines

  1. Stasis Version 1.10
  2. ===================
  3.  
  4. SWI Documentation
  5. =================
  6.  
  7. Stasis supports an SWI block based at &47D40.
  8.  
  9. --------------------------------
  10.  
  11. Stasis_Load
  12. ===========
  13.  
  14. Loads a sample from a file.
  15.  
  16. On Entry
  17.  
  18. R0 = slot
  19. R1 = filename
  20. R2 = type
  21.  
  22. On Exit
  23.  
  24. R1,R2 preserved
  25.  
  26. Interrupt status is unaltered.  SWI is not re-entrant.
  27.  
  28. Use
  29.  
  30. This SWI will load a sample from a file into memory.  If R2=3 the sample is
  31. loaded into the Amnesia area, otherwise it is loaded into the RMA.
  32.  
  33. ----------------------------------
  34.  
  35. Stasis_Save
  36. ===========
  37.  
  38. Save a sample from a file.
  39.  
  40. On Entry
  41.  
  42. R0 = slot
  43. R1 = filename
  44. R2 = type string
  45.  
  46. On Exit
  47.  
  48. R1,R2 preserved
  49.  
  50. Interrupt status is unaltered.  SWI is not re-entrant.
  51.  
  52. Use
  53.  
  54. This SWI will save a sample to a file.  R2 points to a type string such as
  55. "Stasis" or "DataVox".  If R2=0 then stasis native format is assumed.  The
  56. sample is then packaged into the specified format and saved.
  57.  
  58. ----------------------------------
  59.  
  60. Stasis_Link
  61. ===========
  62.  
  63. Attaches a sound channel to sample.
  64.  
  65. On Entry
  66.  
  67. R0 = channel
  68. R1 = slot
  69.  
  70. On Exit
  71.  
  72. R1 preserved
  73.  
  74. Interrupt status is unaltered.  SWI is re-entrant.
  75.  
  76. Use
  77.  
  78. This SWI will update the Stasis link table so that any new sounds will use
  79. the sample in the specified slot.  Samples currently playing will not be
  80. affected.  Note that unlike the *StasisLink command this SWI will not attach
  81. the channel to the Stasis voice.  You must either use a *StasisLink command
  82. at least once before using this SWI, or attach the voice yourself using the
  83. *ChannelVoice command or Stasis_Attach.
  84.  
  85. ----------------------------------
  86.  
  87. Stasis_Attach
  88. =============
  89.  
  90. Attaches a sound channel to the Stasis module.
  91.  
  92. On Entry
  93.  
  94. R0 = channel
  95.  
  96. On Exit
  97.  
  98. R0 corrupted
  99.  
  100. Interrupt status is unaltered.  SWI is not re-entrant.
  101.  
  102. Use
  103.  
  104. This attaches a channel to the Stasis module, like *Channelvoice 1 Stasis
  105. would.
  106.  
  107. ----------------------------------
  108.  
  109. Stasis_Name
  110. ===========
  111.  
  112. Changes the name of a sample
  113.  
  114. On Entry
  115.  
  116. R0 = slot
  117. R1 = pointer to name string
  118.  
  119. On Exit
  120.  
  121. R1 preserved
  122.  
  123. Interrupt status is unaltered.  SWI is not re-entrant.
  124.  
  125. Use
  126.  
  127. This changes the name of a sample - the name that is help in the sample
  128. header.  If the sample format does not include space for a name, this SWI has
  129. no effect.
  130.  
  131. ----------------------------------
  132.  
  133. Stasis_VolSlide
  134. ===============
  135.  
  136. Sets a volume slide
  137.  
  138. On Entry
  139.  
  140. R0 = channel
  141. R1 = target volume (0-&7F)
  142. R2 = time (in centiseconds)
  143.  
  144. On Exit
  145.  
  146. R1,R2 preserved
  147.  
  148. Interrupt status is unaltered.  SWI is re-entrant.
  149.  
  150. Use
  151.  
  152. This SWI sets up a volume slide on the specified channel.  The volume will
  153. increase or decrease, as necessary, so that the target volume is reached in
  154. the specified time.  R2=0 is valid, but R2=1 is a more sensible way of
  155. achieving the same thing.  Both with adjust the volume to R1 immediately.
  156.  
  157. ----------------------------------
  158.  
  159. Stasis_PitchSlide
  160. =================
  161.  
  162. Sets a pitch slide
  163.  
  164. On Entry
  165.  
  166. R0 = channel
  167. R1 = target pitch ( > &1000)
  168. R2 = time (in buffer fills)
  169.  
  170. On Exit
  171.  
  172. R1,R2 preserved
  173.  
  174. Interrupt status is unaltered.  SWI is re-entrant.
  175.  
  176. Use
  177.  
  178. This SWI sets up a pitch slide on the specified channel.  Its action is
  179. similar to Stasis_VolSlide.
  180.  
  181. ----------------------------------
  182.  
  183. Stasis_Slide
  184. ============
  185.  
  186. Sets a slide of the specified type
  187.  
  188. On Entry
  189.  
  190. R0 = channel
  191. R1 = type
  192. R2 = target volume or pitch
  193. R3 = time (in buffer fills)
  194.  
  195. On Exit
  196.  
  197. R1-R3 preserved
  198.  
  199. Interrupt status is unaltered.  SWI is re-entrant.
  200.  
  201. Use
  202.  
  203. This is the preferred way of setting slides.  If R1=0 a volume slide is set. 
  204. If R1=1, a pitch slide.  The bits in R0 have the following effect:
  205.  
  206. bit 31  : do not write the target pitch to the control block.
  207. bit 30  : do not write the rate.
  208. bit 29  : treat R3 as a rate, not a time.  R3 will be added to the volume or
  209. pitch on each buffer fill.
  210. bit 28  : if this is a pitch slide R2 will not be passed through Sound_Pitch
  211. before writing.
  212.  
  213. ----------------------------------
  214.  
  215. Stasis_Control
  216. ==============
  217.  
  218. Does nothing - retained for past compatibility
  219.  
  220. ----------------------------------
  221.  
  222. Stasis_FineTune
  223. =================
  224.  
  225. Sets the finetune value for a sample
  226.  
  227. On Entry
  228.  
  229. R0 = slot
  230. R1 = finetune
  231.  
  232. On Exit
  233.  
  234. R1 preserved
  235.  
  236. Interrupt status is unaltered.  SWI is re-entrant.
  237.  
  238. Use
  239.  
  240. Sets the finetune value for a sample.  The default value is &4000.  A value
  241. of &8000 will play the sample an octave higher, and a value of &2000 will
  242. play it an octave lower.
  243.  
  244. ----------------------------------
  245.  
  246. Stasis_Sound
  247. ============
  248.  
  249. Makes a sound
  250.  
  251. On Entry
  252.  
  253. R0 = channel
  254. R1 = slot
  255. R2 = volume
  256. R3 = pitch
  257. R4 = the ignore value
  258.  
  259. On Exit
  260.  
  261. R1-R3 preserved
  262.  
  263. Interrupt status is unaltered.  SWI is re-entrant.
  264.  
  265. Use
  266.  
  267. This command is analagous to Sound_Control.  The difference is that you
  268. specify a sample slot to play, and the pitch must be specified in the > &1000
  269. form.  The volume should be specified as 0-&7F.
  270.  
  271. The bits in R4 have the following effect.
  272.  
  273. bit 0  : ignore the slot
  274. bit 1  : ignore the volume
  275. bit 2  : ignore the pitch
  276. bit 3  : update - do not alter the channel flags
  277. bit 4  : do not pass the pitch through Sound_Pitch
  278. bit 5  : silence the sound - used internally when an escape is handled
  279.  
  280. These bits may be set to provide updates.  For example, Stasis_Volume calls
  281. this SWI with bit 0,2 and 3 set.
  282.  
  283. ----------------------------------
  284.  
  285. Stasis_GetSlotInfo
  286. ==================
  287.  
  288. Return information on the sample in a slot
  289.  
  290. On Entry
  291.  
  292. R0 = slot
  293.  
  294. On Exit
  295.  
  296. R0 preserved
  297. R1 = pointer to name string
  298. R2 = sample length
  299. R2 = sample length
  300. R3 = finetune value
  301. R4 = repeat offset
  302. R5 = repeat length
  303. R6 = address of sample data
  304. R7 = sample volume entry
  305. R8 = 0 (for future expansion)
  306.  
  307.  
  308. Interrupt status is unaltered.  SWI is re-entrant.
  309.  
  310. Use
  311.  
  312. This sample returns information on a sample.  If items such as finetune or
  313. volume are missing from tha sample format then 0 will be returned in that
  314. register.  
  315.  
  316. ----------------------------------
  317.  
  318. Stasis_PutSlotInfo
  319. ==================
  320.  
  321. Updates various details of a sample in a slot
  322.  
  323. On Entry
  324.  
  325. R0 preserved
  326. R1 = pointer to name string
  327. R2 = sample length
  328. R2 = sample length
  329. R3 = finetune value
  330. R4 = repeat offset
  331. R5 = repeat length
  332. R6 = address of sample data
  333. R7 = sample volume entry
  334. R8 = flag field
  335.  
  336.  
  337. Interrupt status is unaltered.  SWI is not re-entrant.
  338.  
  339. Use
  340.  
  341. This SWI updates the details of a sample.  Values may or may not be written
  342. depending on the value of R8.  If bit 1 is set, R1 will be written. If bit 2
  343. is set R2 will be written and so on.  If the sample format does not support
  344. the details you are trying to write an error will be returned.  The error
  345. returning method here is slightly flawed, as is calls OS_WriteS of its own
  346. accord.
  347.  
  348. ------------------------------
  349.  
  350. This file last updated 15/8/94 by A.Southgate.
  351.