It's really simple. If I tell you to check return values, check sample
types when recording, not to trash d2-d7/a2-a6 in hooks, or not to call
AHI_ControlAudio()
with the AHIC_Play
tag from interrupts or
hooks, you do as you are told.
The AHIBase
structure is private, so are the sub libraries' library
base structures. Don't try to be clever.
The implementation of the database is private, and may change any time.
ahi.device
provides functions access the information in the database
(AHI_NextAudioID()
, AHI_GetAudioAttrsA()
and
AHI_BestAudioIDA()
).
All user hooks must follow normal register conventions, which means that d2-d7 and a2-a6 must be preserved. They may be called from an interrupt, but you cannot count on that; it can be your own process or another process. Don't assume the system is in single-thread mode. Never spend much time in a hook, get the work done as quick as possible and then return.
The AHIAudioCtrl
structure may not be shared with other
tasks/threads. The task that called AHI_AllocAudioA()
must do all
other calls too (except those callable from interrupts).
Only calls specifically said to be callable from interrupts may be called
from user hooks or interrupts. Note that AHI_ControlAudioA()
has
some tags that must not be present when called from an interrupt.
Most audio drivers need multitasking to be turned on to function properly. Don't turn it off while using the device.
Go to the first, previous, next, last section, table of contents.