DefInt A-Z
Declare Function OpenSound Lib "Sound" () As Integer
Declare Sub CloseSound Lib "Sound" ()
Declare Function StartSound Lib "Sound" () As Integer
Declare Function StopSound Lib "Sound" () As Integer
Declare Function SetVoiceQueueSize Lib "Sound"
  (ByVal nVoice%, ByVal nBytes%) As Integer
Declare Function SetVoiceSound Lib "Sound"
  (ByVal nVoice%, ByVal lFrequency&, ByVal nDuration%) As Integer
Declare Function CountVoiceNotes Lib "Sound"
  (ByVal nVoice%) As Integer

' Accent Modes
Const S_NORMAL = 0
Const S_LEGATO = 1
Const S_STACCATO = 2

Const S_SERDVNA = -1        ' Device not available
Const S_SEROFM = -2         ' Out of memory
Const S_SERMACT = -3        ' Music active
Const S_SERQFUL = -4        ' Queue full
Const S_SERBDNT = -5        ' Invalid note
Const S_SERDLN = -6         ' Invalid note length
Const S_SERDCC = -7         ' Invalid note count
Const S_SERDTP = -8         ' Invalid tempo
Const S_SERDVL = -9         ' Invalid volume
Const S_SERDMD = -10        ' Invalid mode
Const S_SERDSH = -11        ' Invalid shape
Const S_SERDPT = -12        ' Invalid pitch
Const S_SERDFQ = -13        ' Invalid frequency
Const S_SERDDR = -14        ' Invalid duration
Const S_SERDSR = -15        ' Invalid source
Const S_SERDST = -16        ' Invalid state

Const Q_BUFF_SIZE = 1024    ' Voice Queue size
Const Q_THRESHHOLD = 20     ' Minimum notes before update

'
' Global Variables
'
Dim octave%
Dim tempo%
Dim mode%
Dim length%
