Sim68K Sound

TRAP #15 is used for I/O. Put the task number in D0.

Task

70 | Play the WAV file using the standard player. Only one sound may be played at a time. Pre: (A1) null terminated path address. Invalid file names are ignored. Post: D0.W = 0 if player is busy, sound is not played. D0.W = non zero if sound played.
71 | Load a WAV file into sound memory (not 68000 memory). Pre: (A1) null terminated path address. Invalid file names are ignored. D1.B reference number to use for sound 0-255. A maximum of 256 sounds may be loaded at any one time. Reusing a reference number will replace the current sound.
72 | Play sound from sound memory loaded with task 71 using standard player. Only one sound may be played at a time. Pre: D1.B must contain sound reference number used in task 71. Post: D0.W = 0 if player is busy, sound is not played. D0.W = non zero if sound played.
73 | Play the WAV file using DirectX player, if available. Multiple sounds may be played at the same time. Pre: (A1) null terminated path address. Invalid file names are ignored. Post: D0.W = 0 if DirectX player not available, sound is not played. D0.W = non zero if sound played.
74 | Load a WAV file into DirectX sound memory (not 68000 memory). A maximum of 256 sounds may be loaded at any one time. Reusing a reference number will replace the current sound. Pre: (A1) null terminated path address. Invalid file names are ignored. D1.B reference number to use for sound 0-255. Post: D0.W = 0 if DirectX player not available. D0.W = non zero if sound loaded.
75 | Play sound from DirectX sound memory loaded with task 74. Pre: D1.B must contain sound reference number used in task 74. Post: D0.W = 0 if DirectX player not available, sound is not played. D0.W = non zero if sound played.
76 | Control Standard player Sounds must be in memory loaded with task 71. Only one sound may be played at a time. Pre: D1.B contains sound reference number used in task 71. D2.L = 0, play sound once (this is the same as task 72) D2.L = 1, play sound in loop, returns error if sound currently playing. D2.L = 2, stop D1.B referenced sound, returns error on bad reference number D2.L = 3, stop all sounds, returns success (D1.B ignored) D2.L = other values reserved Post: D0.W = 0 on error. D0.W = non zero on success.
77 | Control DirectX player, if available Sounds must be in DirectX memory loaded with task 74. Multiple sounds may be played at the same time. Pre: D1.B contains sound reference number used in task 74. D2.L = 0, play sound once (this is the same as task 75) D2.L = 1, play sound in loop. The same sound may be played multiple times. D2.L = 2, stop D1.B referenced sound, returns error on bad reference number D2.L = 3, stop all sounds (D1.B ignored) D2.L = other values reserved Post: D0.W = 0 if DirectX player not available. D0.W = non zero on success.