home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / code / oslib / Hdr / Sound < prev    next >
Encoding:
Text File  |  1994-07-01  |  8.1 KB  |  304 lines

  1. ;AAsm header file for Sound
  2. ;written by DefMod (Jul  1 1994) on Fri Jul  1 16:18:27 1994
  3.  
  4.         [       :LNOT: :DEF: Get_Types
  5.         GBLS    Get_Types
  6. Get_Types                       SETS    "GET OS:Hdr.Types"
  7.         |
  8. Get_Types                       SETS    ""
  9.         ]
  10.         $Get_Types
  11.  
  12.         [       :LNOT: :DEF: Get_OS
  13.         GBLS    Get_OS
  14. Get_OS                          SETS    "GET OS:Hdr.OS"
  15.         |
  16. Get_OS                          SETS    ""
  17.         ]
  18.         $Get_OS
  19.  
  20.         [       :LNOT: :DEF: Sound_Hdr
  21.         GBLS    Sound_Hdr
  22.  
  23. ;Symbols for constants
  24. Sound_InstallCode               *       -390234112
  25. Sound_StateRead                 *       0
  26. Sound_StateOff                  *       1
  27. Sound_StateOn                   *       2
  28.  
  29. ;Symbols for structure offsets and sizes
  30.                                 ^       0
  31. Sound_LogTable_log              #       8192*Byte
  32. Sound_LogTable                  *       @
  33.  
  34.                                 ^       0
  35. Sound_LogScaleTable_log_scale   #       256*Byte
  36. Sound_LogScaleTable             *       @
  37.  
  38.                                 ^       0
  39. Sound_ChannelHandler_fill_code  #       Ptr
  40. Sound_ChannelHandler_overrun_fixup_code #       Ptr
  41. Sound_ChannelHandler_log_table  #       Ptr
  42. Sound_ChannelHandler_log_scale_table #       Ptr
  43. Sound_ChannelHandler            *       @
  44.  
  45.                                 ^       0
  46. Sound_SCCB_amplitude            #       Byte
  47. Sound_SCCB_voice_no             #       Byte
  48. Sound_SCCB_voice_instance       #       Byte
  49. Sound_SCCB_flags                #       Byte
  50. Sound_SCCB_pitch                #       Int
  51. Sound_SCCB_timbre               #       Int
  52. Sound_SCCB_buffer_fill_count    #       Int
  53. Sound_SCCB_r4                   #       Int
  54. Sound_SCCB_r5                   #       Int
  55. Sound_SCCB_r6                   #       Int
  56. Sound_SCCB_r7                   #       Int
  57. Sound_SCCB_r8                   #       Int
  58. Sound_SCCB_reserved             #       7*Int
  59. Sound_SCCB_available            #       48*Int
  60. Sound_SCCB                      *       @
  61.  
  62.                                 ^       0
  63. Sound_Scheduler_scheduler       #       Ptr
  64. Sound_Scheduler                 *       @
  65.  
  66.                                 ^       0
  67. Sound_VoiceGenerator_fill_code  #       Int
  68. Sound_VoiceGenerator_update_code #       Int
  69. Sound_VoiceGenerator_gate_on_code #       Int
  70. Sound_VoiceGenerator_gate_off_code #       Int
  71. Sound_VoiceGenerator_instantiate_code #       Int
  72. Sound_VoiceGenerator_free_code  #       Int
  73. Sound_VoiceGenerator_install_code #       Int
  74. Sound_VoiceGenerator_voice_name_offset #       Int
  75. Sound_VoiceGenerator            *       @
  76.  
  77.  
  78. ;Symbols for SWI's and SWI reason codes
  79. XSound_Configure                *       &60140
  80. Sound_Configure                 *       &40140
  81.    ;Entry
  82.    ;  R0 = channel_count (Int)
  83.    ;  R1 = sample_size (Int)
  84.    ;  R2 = sample_period (Int)
  85.    ;  R3 -> channel_handler (Sound_ChannelHandler)
  86.    ;  R4 -> scheduler (Sound_Scheduler)
  87.    ;Exit
  88.    ;  R0 = channel_count_out (Int)
  89.    ;  R1 = sample_size_out (Int)
  90.    ;  R2 = sample_period_out (Int)
  91.    ;  R3 -> channel_handler_out (Sound_ChannelHandler)
  92.    ;  R4 -> scheduler_out (Sound_Scheduler)
  93.  
  94. XSound_Enable                   *       &60141
  95. Sound_Enable                    *       &40141
  96.    ;Entry
  97.    ;  R0 = state (Int)
  98.    ;Exit
  99.    ;  R0 = state_out (Int)
  100.  
  101. XSound_Stereo                   *       &60142
  102. Sound_Stereo                    *       &40142
  103.    ;Entry
  104.    ;  R0 = channel_no (Int)
  105.    ;  R1 = position (Int)
  106.    ;Exit
  107.    ;  R1 = position_out (Int)
  108.  
  109. XSound_Speaker                  *       &60143
  110. Sound_Speaker                   *       &40143
  111.    ;Entry
  112.    ;  R0 = state (Int)
  113.    ;Exit
  114.    ;  R0 = state_out (Int)
  115.  
  116. XSound_Volume                   *       &60180
  117. Sound_Volume                    *       &40180
  118.    ;Entry
  119.    ;  R0 = volume (Int)
  120.    ;Exit
  121.    ;  R0 = volume_out (Int)
  122.  
  123. XSound_SoundLog                 *       &60181
  124. Sound_SoundLog                  *       &40181
  125.    ;Entry
  126.    ;  R0 = linear (Int)
  127.    ;Exit
  128.    ;  R0 = log (Int)
  129.  
  130. XSound_LogScale                 *       &60182
  131. Sound_LogScale                  *       &40182
  132.    ;Entry
  133.    ;  R0 = log (Int)
  134.    ;Exit
  135.    ;  R0 = linear (Int)
  136.  
  137. XSound_InstallVoice             *       &60183
  138. Sound_InstallVoice              *       &40183
  139.    ;Entry
  140.    ;  R0 -> voice_generator (Sound_VoiceGenerator)
  141.    ;  R1 = voice_no (Int)
  142.    ;Exit
  143.    ;  R0 -> voice_name_out (String)
  144.    ;  R1 = voice_no_out (Int)
  145.  
  146. SoundInstallVoice_ReadName      *       &0
  147.    ;Entry
  148.    ;  R0 = &0
  149.    ;  R1 = voice_no (Int)
  150.    ;Exit
  151.    ;  R0 -> voice_name (String)
  152.  
  153. SoundInstallVoice_AddNamedVoice *       &1
  154.    ;Entry
  155.    ;  R0 = &1
  156.    ;  R1 = voice_no (Int)
  157.    ;  R2 -> voice_generator (Sound_VoiceGenerator)
  158.    ;  R3 -> voice_name (String)
  159.    ;Exit
  160.    ;  R1 = voice_no_out (Int)
  161.    ;  R2 -> voice_name_out (String)
  162.  
  163. SoundInstallVoice_ReadLocalName *       &2
  164.    ;Entry
  165.    ;  R0 = &2
  166.    ;  R1 = voice_no (Int)
  167.    ;Exit
  168.    ;  R2 -> voice_name_out (String)
  169.    ;  R3 -> voice_local_name_out (String)
  170.  
  171. SoundInstallVoice_ChangeLocalName *       &3
  172.    ;Entry
  173.    ;  R0 = &3
  174.    ;  R1 = voice_no (Int)
  175.    ;  R2 = &0
  176.    ;  R3 -> voice_local_name (String)
  177.  
  178. XSound_RemoveVoice              *       &60184
  179. Sound_RemoveVoice               *       &40184
  180.    ;Entry
  181.    ;  R1 = voice_no (Int)
  182.    ;Exit
  183.    ;  R0 -> voice_name_out (String)
  184.    ;  R1 = voice_no_out (Int)
  185.  
  186. XSound_AttachVoice              *       &60185
  187. Sound_AttachVoice               *       &40185
  188.    ;Entry
  189.    ;  R0 = channel_no (Int)
  190.    ;  R1 = voice_no (Int)
  191.    ;Exit
  192.    ;  R0 = channel_no_out (Int)
  193.    ;  R1 = voice_no_out (Int)
  194.  
  195. XSound_ControlPacked            *       &60186
  196. Sound_ControlPacked             *       &40186
  197.    ;Entry
  198.    ;  R0 = amp_and_channel (Bits)
  199.    ;  R1 = duration_and_pitch (Bits)
  200.  
  201. XSound_Tuning                   *       &60187
  202. Sound_Tuning                    *       &40187
  203.    ;Entry
  204.    ;  R0 = tuning (Int)
  205.    ;Exit
  206.    ;  R0 = tuning_out (Int)
  207.  
  208. XSound_Pitch                    *       &60188
  209. Sound_Pitch                     *       &40188
  210.    ;Entry
  211.    ;  R0 = pitch (Int)
  212.    ;Exit
  213.    ;  R0 = accumulator (Int)
  214.  
  215. XSound_Control                  *       &60189
  216. Sound_Control                   *       &40189
  217.    ;Entry
  218.    ;  R0 = channel_no (Int)
  219.    ;  R1 = amplitude (Int)
  220.    ;  R2 = pitch (Int)
  221.    ;  R3 = duration (Int)
  222.  
  223. XSound_AttachNamedVoice         *       &6018A
  224. Sound_AttachNamedVoice          *       &4018A
  225.    ;Entry
  226.    ;  R0 = channel_no (Int)
  227.    ;  R1 -> voice_name (String)
  228.  
  229. XSound_ReadControlBlock         *       &6018B
  230. Sound_ReadControlBlock          *       &4018B
  231.    ;Entry
  232.    ;  R0 = channel_no (Int)
  233.    ;  R1 = offset (Int)
  234.    ;Exit
  235.    ;  R0 = channel_no_out (Int)
  236.    ;  R2 = word (Int)
  237.  
  238. XSound_WriteControlBlock        *       &6018C
  239. Sound_WriteControlBlock         *       &4018C
  240.    ;Entry
  241.    ;  R0 = channel_no (Int)
  242.    ;  R1 = offset (Int)
  243.    ;  R2 = word (Int)
  244.    ;Exit
  245.    ;  R0 = channel_no_out (Int)
  246.    ;  R2 = word_out (Int)
  247.  
  248. XSound_QInit                    *       &601C0
  249. Sound_QInit                     *       &401C0
  250.    ;Exit
  251.    ;  R0 corrupted
  252.  
  253. XSound_QSchedule                *       &601C1
  254. Sound_QSchedule                 *       &401C1
  255.    ;Entry
  256.    ;  R0 = period (Int)
  257.    ;  R1 = swi_no (Int)
  258.    ;  R2 = swi_r0 (Int)
  259.    ;  R3 = swi_r1 (Int)
  260.    ;Exit
  261.    ;  R0 = failed (Bool)
  262.  
  263. XSound_QRemove                  *       &601C2
  264. Sound_QRemove                   *       &401C2
  265.  
  266. XSound_QFree                    *       &601C3
  267. Sound_QFree                     *       &401C3
  268.    ;Exit
  269.    ;  R0 = free_count (Int)
  270.  
  271. XSound_QSDispatch               *       &601C4
  272. Sound_QSDispatch                *       &401C4
  273.  
  274. XSound_QTempo                   *       &601C5
  275. Sound_QTempo                    *       &401C5
  276.    ;Entry
  277.    ;  R0 = tempo (Int)
  278.    ;Exit
  279.    ;  R0 = tempo_out (Int)
  280.  
  281. XSound_QBeat                    *       &601C6
  282. Sound_QBeat                     *       &401C6
  283.    ;Entry
  284.    ;  R0 = bar_length (Int)
  285.    ;Exit
  286.    ;  R0 = bar_length_out (Int)
  287.  
  288. XSound_QInterface               *       &601C7
  289. Sound_QInterface                *       &401C7
  290.  
  291. Service_Sound                   *       &54
  292.    ;Entry
  293.    ;  R0 = part (Int)
  294.    ;  R1 = &54
  295.  
  296. Event_StartOfBar                *       &C
  297.    ;Entry
  298.    ;  R0 = &C
  299.    ;  R1 = &2
  300.    ;  R2 = &0
  301.  
  302.         ]
  303.         END
  304.