home *** CD-ROM | disk | FTP | other *** search
/ World of Sound / World of Sound.iso / utils / modplayers / tracker / docs / amiga.tech < prev    next >
Encoding:
Text File  |  1993-11-11  |  2.4 KB  |  46 lines

  1. This soundtracker player has some very interesting features, probably unique.
  2. - it's written entirely in C.
  3. - it's portable.
  4. - it goes through the OS for everything (except the audio filter toggling,
  5. but that's not provided for right now).
  6. - it reads archive files (like lha or zoo).
  7.  
  8. Right now, it uses the timer WAIT_EBLANK unit for all its timings and assumes
  9. everything is done fast enough that the new audio commands will fall on the
  10. right beat. Since nothing is buffered, it might not work quite as intended
  11. if you switch `verbose' mode on (you need at least an accelerated amiga and
  12. probably a two-color screen for it to work... there's a good reason I turn
  13. off the cursor), but I had no time to do better. 
  14. One amusing feature: since it waits for the system time to reach a certain
  15. value, it you pause tracker (by hitting the space bar or locking the console
  16. by another mean), it will speed up afterwards until it catches up with lost
  17. time.
  18.  
  19. Ideally I intend to implement a two-tasks model: task 1
  20. will fill messages telling what to do at a given time until it has no messages
  21. left, and send them to task 2.
  22. task 2 will peek at the messages it received, wait for the next thing to do,
  23. do it, and send the message back to task 1.
  24.  
  25. This has got lots of advantages.
  26. - put everything that is time-critical in one very simple routine that
  27. basically only has to wait for the right time and send very simple events
  28. to the audio device. You can up the priority of this task to 127 if need be
  29. since it waits most of the time. 
  30. - tracker modules do not always need the same amount of processing power,
  31. the load might even vary (and does vary) during one given module. Using
  32. buffering means you equalize the load and you can then play very complex
  33. modules on a small amiga even with unoptimized code.
  34.  
  35. One stupid problem I got in while programming the amiga_support was using
  36. the standard WAIT unit of the timer.device, the one based on VBLANK.
  37. This was very stupid: using a timer unit of the same resolution (or about so)
  38. as the events I was wanting to measure. Since I got unlucky, it appeared to
  39. work correctly for quite some time... I'm usually looking at a rock-solid
  40. NTSC 60Hz display. 
  41.  
  42. The other small thing to do would be to use feedback in the timer.device
  43. handling: since ReadEClock() is a very low cost call, I can use it to check
  44. what time it actually is when my task awakens and adjust the next interval
  45. to get back that small delay dynamically, according to the load of my machine.
  46.