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 >
Wrap
Text File
|
1993-04-08
|
4KB
|
254 lines
TABLE OF CONTENTS
AudioCDXL/AddAudioInterrupt
AudioCDXL/AllocAudio
AudioCDXL/AUD0Handler
AudioCDXL/FreeAudio
AudioCDXL/InitAudio
AudioCDXL/QuitAudio
AudioCDXL/StartAudio
AudioCDXL/StopAudio
AudioCDXL/AddAudioInterrupt AudioCDXL/AddAudioInterrupt
NAME
AddAudioInterrupt -- Install an AUD0 interrupt
SYNOPSIS
AddAudioInterrupt();
VOID AddAudioInterrupt( VOID );
FUNCTION
Initialize an AUD0 interrupt node and install it.
Saves out the Prior AUD0 interrupt to be restored on termination.
INPUTS
VOID
RESULTS
VOID
NOTES
SEE ALSO
AUD0Handler()
BUGS
None?
AudioCDXL/AllocAudio AudioCDXL/AllocAudio
NAME
AllocAudio -- Allocate audio channels.
SYNOPSIS
error = AllocAudio();
int AllocAudio( VOID );
FUNCTION
Opens the audio device and allocates ports/channels.
INPUTS
VOID
RESULTS
0 if successful. An error code if not. Errors defined in
runcdxl.h
NOTES
SEE ALSO
runcdxl.h, FreeAudio().
BUGS
None?
AudioCDXL/AUD0Handler AudioCDXL/AUD0Handler
NAME
AUD0Handler -- The AUD0 interrupt code.
SYNOPSIS
VOID __interrupt __saveds AUD0Handler( VOID );
AUD0Interrupt.is_Code = AUD0Handler;
FUNCTION
The AUD0 interrupt code. This routine gets called immediately after
the audio DMA channel has read the location and length registers and
stored their values in the back up registers.
INPUTS
RESULTS
NOTES
The philospy here is to rewrite the location registers to point to
the other audio buffer in preparation for the next time the audio
DMA reads them. This is the buffer that is currently being filled
by the CDXL. If we are timed right, when the CDXL is done reading,
the audio DMA should be ready to reread these location registers.
It seems that the audio period that was specified is sometimes off
by less than 1. For long CDXL files, this will result in the audio
getting out of sync with the video. What I do here is add or
subtract one from the period to compensate for this. A better way
to do this could probably be figured out.
SEE ALSO
AddAudioInterrupt()
BUGS
None?
AudioCDXL/FreeAudio AudioCDXL/FreeAudio
NAME
FreeAudio -- Free the audio channels allocted by AllocAudio.
SYNOPSIS
FreeAudio();
VOID FreeAudio( VOID );
FUNCTION
Free the audio channels allocted by AllocAudio. Close audio device
and delete the message ports.
INPUTS
VOID
RESULTS
NOTES
SEE ALSO
InitAudio()
BUGS
None?
AudioCDXL/InitAudio AudioCDXL/InitAudio
NAME
InitAudio -- Initialize the CDXL audio system.
SYNOPSIS
error = InitAudio( CDXL_ob )
int InitAudio( CDXLOB * );
FUNCTION
Initialize the CDXL audio system. Calls AllocAudio(), AddAudioInterrupt(),
calculates audio period.
INPUTS
CDXL_ob = pointer to defining CDXLOB control structure.
RESULTS
0 if successful. An error code if not. Errors defined in
runcdxl.h
NOTES
SEE ALSO
runcdxl.h, cdxlob.h, AllocAudio(), AddAudioInterrupt(), AUD0Handler()
BUGS
None?
AudioCDXL/QuitAudio AudioCDXL/QuitAudio
NAME
QuitAudio -- Restore the audio system back to how we found it.
SYNOPSIS
QuitAudio();
VOID QuitAudio( VOID );
FUNCTION
Calls StopAudio(), removes the AUD0 interrupt and replaces the
prior one. Calls FreeAudio().
INPUTS
VOID
RESULTS
NOTES
SEE ALSO
AllocAudio(), FreeAudio(), StopAudio().
BUGS
None?
AudioCDXL/StartAudio AudioCDXL/StartAudio
NAME
StartAudio -- Enable AUD0 & AUD1 DMA as well as the AUD0 interrupt.
SYNOPSIS
StartAudio();
VOID StartAudio( VOID );
FUNCTION
Clears AUD0 interrupt, enables AUD0 DMA, enables AUD1 DMA,
enables AUD0 interrupt.
INPUTS
VOID
RESULTS
NOTES
SEE ALSO
StopAudio()
BUGS
None?
AudioCDXL/StopAudio AudioCDXL/StopAudio
NAME
StopAudio -- Disable AUD0 & AUD1 DMA as well as the AUD0 interrupt.
SYNOPSIS
StopAudio();
VOID StopAudio( VOID );
FUNCTION
Disables AUD0 DMA, disables AUD1 DMA, disables AUD0 interrupt,
clears AUD0 interrupt.
INPUTS
VOID
RESULTS
NOTES
SEE ALSO
StartAudio()
BUGS
None?