home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / UTILITIE / VOCSHO.ZIP / VOC_DATA.LIB < prev    next >
Text File  |  1991-01-07  |  2KB  |  46 lines

  1. package VOC_data is
  2.  
  3. type sound_bytes is range 0 .. 255;
  4.  for sound_bytes'size use 8;
  5. max_block_length:constant:=20000;
  6. subtype block_lengths is integer range 0 .. max_block_length;
  7. subtype sound_indices is integer range 1 .. max_block_length;
  8. type sounds is array(sound_indices range <>) of sound_bytes;
  9.  
  10. type block_types  is (terminator,voice_data,voice_continuation,
  11.                       silence,marker,text,start_repeat,end_repeat);
  12.  for block_types use (terminator=>0,voice_data=>1,voice_continuation=>2,
  13.                       silence=>3,marker=>4,text=>5,start_repeat=>6,
  14.                       end_repeat=>7);
  15.  for block_types'size use 8;
  16.  
  17. subtype sample_rates is natural range 3906 .. integer'last;
  18. type pack_types is (unpacked,halved,thirds,quartered);
  19.  for pack_types use (unpacked=>0,halved=>1,thirds=>2,quartered=>3);
  20. type markers is range 1 .. 16#FFFE#;
  21. type repeat_counts is range 1 .. 16#FFFF#;
  22.  
  23. type blocks(block_type   : block_types:=terminator) is record
  24.   block_length : block_lengths:=1;
  25.   case block_type is
  26.     when terminator =>
  27.       null;
  28.     when voice_data | voice_continuation =>
  29.       sample_rate  : sample_rates;
  30.       packing      : pack_types;
  31.       data         : sounds(1 .. max_block_length);
  32.     when silence =>
  33.       silence_interval : duration;
  34.     when marker =>
  35.       mark         : markers;
  36.     when text =>
  37.       text_string : string(1 .. max_block_length);
  38.     when start_repeat =>
  39.       count        : repeat_counts;
  40.     when end_repeat =>
  41.       null;
  42.   end case;
  43. end record;
  44.  
  45. end VOC_data;
  46.