home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD v1.2 / amidev_cd_12.iso / cd32 / cd32-tools / cdxl-1 / doc / audiocdxl.doc next >
Text File  |  1993-04-08  |  4KB  |  254 lines

  1. TABLE OF CONTENTS
  2.  
  3. AudioCDXL/AddAudioInterrupt
  4. AudioCDXL/AllocAudio
  5. AudioCDXL/AUD0Handler
  6. AudioCDXL/FreeAudio
  7. AudioCDXL/InitAudio
  8. AudioCDXL/QuitAudio
  9. AudioCDXL/StartAudio
  10. AudioCDXL/StopAudio
  11.  
  12. AudioCDXL/AddAudioInterrupt                          AudioCDXL/AddAudioInterrupt
  13.  
  14.    NAME
  15.     AddAudioInterrupt -- Install an AUD0 interrupt
  16.  
  17.    SYNOPSIS
  18.     AddAudioInterrupt();
  19.  
  20.     VOID AddAudioInterrupt( VOID );
  21.  
  22.  
  23.    FUNCTION
  24.     Initialize an AUD0 interrupt node and install it.
  25.     Saves out the Prior AUD0 interrupt to be restored on termination.
  26.  
  27.    INPUTS
  28.     VOID
  29.  
  30.    RESULTS
  31.     VOID
  32.  
  33.    NOTES
  34.  
  35.    SEE ALSO
  36.     AUD0Handler()
  37.  
  38.    BUGS
  39.     None?
  40.  
  41. AudioCDXL/AllocAudio                                       AudioCDXL/AllocAudio
  42.  
  43.    NAME
  44.     AllocAudio -- Allocate audio channels.
  45.  
  46.    SYNOPSIS
  47.     error = AllocAudio();
  48.  
  49.     int AllocAudio( VOID );
  50.  
  51.    FUNCTION
  52.     Opens the audio device and allocates ports/channels.
  53.  
  54.    INPUTS
  55.     VOID
  56.  
  57.    RESULTS
  58.     0 if successful. An error code if not. Errors defined in
  59.     runcdxl.h
  60.  
  61.    NOTES
  62.  
  63.    SEE ALSO
  64.     runcdxl.h, FreeAudio().
  65.  
  66.    BUGS
  67.     None?
  68.  
  69. AudioCDXL/AUD0Handler                                     AudioCDXL/AUD0Handler
  70.  
  71.    NAME
  72.     AUD0Handler -- The AUD0 interrupt code.
  73.  
  74.    SYNOPSIS
  75.     VOID __interrupt __saveds AUD0Handler( VOID );
  76.  
  77.     AUD0Interrupt.is_Code = AUD0Handler;
  78.  
  79.    FUNCTION
  80.     The AUD0 interrupt code. This routine gets called immediately after
  81.     the audio DMA channel has read the location and length registers and
  82.     stored their values in the back up registers.
  83.  
  84.  
  85.    INPUTS
  86.  
  87.  
  88.    RESULTS
  89.  
  90.  
  91.    NOTES
  92.     The philospy here is to rewrite the location registers to point to 
  93.     the other audio buffer in preparation for the next time the audio 
  94.     DMA reads them.  This is the buffer that is currently being filled
  95.     by the CDXL. If we are timed right, when the CDXL is done reading, 
  96.     the audio DMA should be ready to reread these location registers. 
  97.     It seems that the audio period that was specified is sometimes off 
  98.     by less than 1.  For long CDXL files, this will result in the audio 
  99.     getting out of sync with the video. What I do here is add or 
  100.     subtract one from the period to compensate for this. A better way 
  101.     to do this could probably be figured out.
  102.  
  103.    SEE ALSO
  104.     AddAudioInterrupt()
  105.  
  106.    BUGS
  107.     None?
  108.  
  109. AudioCDXL/FreeAudio                                          AudioCDXL/FreeAudio
  110.  
  111.    NAME
  112.     FreeAudio -- Free the audio channels allocted by AllocAudio.
  113.  
  114.    SYNOPSIS
  115.     FreeAudio();
  116.  
  117.     VOID FreeAudio( VOID );
  118.  
  119.    FUNCTION
  120.     Free the audio channels allocted by AllocAudio.  Close audio device
  121.     and delete the message ports.
  122.  
  123.    INPUTS
  124.     VOID
  125.  
  126.    RESULTS
  127.  
  128.  
  129.    NOTES
  130.  
  131.  
  132.    SEE ALSO
  133.     InitAudio()
  134.  
  135.    BUGS
  136.     None?
  137.  
  138. AudioCDXL/InitAudio                                          AudioCDXL/InitAudio
  139.  
  140.    NAME
  141.     InitAudio -- Initialize the CDXL audio system.
  142.  
  143.    SYNOPSIS
  144.     error = InitAudio( CDXL_ob )
  145.  
  146.     int InitAudio( CDXLOB * );
  147.  
  148.    FUNCTION
  149.     Initialize the CDXL audio system.  Calls AllocAudio(), AddAudioInterrupt(),
  150.     calculates audio period.
  151.  
  152.    INPUTS
  153.     CDXL_ob = pointer to defining CDXLOB control structure.
  154.  
  155.  
  156.    RESULTS
  157.     0 if successful. An error code if not. Errors defined in
  158.     runcdxl.h
  159.  
  160.    NOTES
  161.  
  162.  
  163.    SEE ALSO
  164.     runcdxl.h, cdxlob.h, AllocAudio(), AddAudioInterrupt(), AUD0Handler()
  165.  
  166.    BUGS
  167.     None?
  168.  
  169. AudioCDXL/QuitAudio                                        AudioCDXL/QuitAudio
  170.  
  171.    NAME
  172.     QuitAudio -- Restore the audio system back to how we found it.
  173.  
  174.    SYNOPSIS
  175.     QuitAudio();
  176.  
  177.     VOID QuitAudio( VOID );
  178.  
  179.    FUNCTION
  180.     Calls StopAudio(), removes the AUD0 interrupt and replaces the
  181.     prior one. Calls FreeAudio().
  182.  
  183.    INPUTS
  184.     VOID
  185.  
  186.    RESULTS
  187.  
  188.  
  189.    NOTES
  190.  
  191.  
  192.    SEE ALSO
  193.     AllocAudio(), FreeAudio(), StopAudio().
  194.  
  195.    BUGS
  196.     None?
  197.  
  198. AudioCDXL/StartAudio                                      AudioCDXL/StartAudio
  199.  
  200.    NAME
  201.     StartAudio -- Enable AUD0 & AUD1 DMA as well as the AUD0 interrupt.
  202.  
  203.    SYNOPSIS
  204.     StartAudio();
  205.  
  206.     VOID StartAudio( VOID );
  207.  
  208.    FUNCTION
  209.     Clears AUD0 interrupt, enables AUD0 DMA, enables AUD1 DMA, 
  210.     enables AUD0 interrupt.
  211.  
  212.    INPUTS
  213.     VOID
  214.  
  215.    RESULTS
  216.  
  217.    NOTES
  218.  
  219.    SEE ALSO
  220.     StopAudio()
  221.  
  222.    BUGS
  223.     None?
  224.  
  225. AudioCDXL/StopAudio                                        AudioCDXL/StopAudio
  226.  
  227.    NAME
  228.     StopAudio -- Disable AUD0 & AUD1 DMA as well as the AUD0 interrupt.
  229.  
  230.    SYNOPSIS
  231.     StopAudio();
  232.  
  233.     VOID StopAudio( VOID );
  234.  
  235.    FUNCTION
  236.     Disables AUD0 DMA, disables AUD1 DMA, disables AUD0 interrupt,
  237.     clears AUD0 interrupt.
  238.  
  239.    INPUTS
  240.     VOID
  241.  
  242.  
  243.    RESULTS
  244.  
  245.  
  246.    NOTES
  247.  
  248.  
  249.    SEE ALSO
  250.     StartAudio()
  251.  
  252.    BUGS
  253.     None?
  254.