Fixed Delay. Added triangle code. Misc. fixes.

- Fixed delay by not allowing writes after Write Buffer is full.  Will
need to have accurate timing to ensure as few writes are missed as
possible.  Still some popping on long frequencies, but barely noticable
during gameplay.
- Cleaned up code.  Deleted a bunch of unnecessary crap.
- Added triangle code. Not quite working, but triangle waves are coming
out.