home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / gamesuite_1 / GameSuite / !Stasis / MicroHelp / swidocs < prev   
Encoding:
Text File  |  1995-08-07  |  6.8 KB  |  320 lines

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