Showing changes from revision #3 to #4:
Added | Removed | Changed
The Instantiate entry is called by to inform the Voice Generator of a request to attach a channel to it.Channel Handler? when a voice is added to the sound system.
Entry | |
---|---|
R0 | Channel number |
R5 | Pointer to Voice Generator |
Exit | |
---|---|
R0 | Preserved if the Instantiation |
R1-R4 | Preserved |
R5 | May be corrupted |
R6-R12 | Preserved |
The Voice Generator is entered in IRQ SVC mode mode. with IRQs enabled. R14 should not be used as any interrupts will corrupt the value.
To return to the Channel Handler use LDR PC,[R13],#4
A Voice Generator should ideally be able to support eight channels. The request can either be accepted (R0 preserved on exit), or rejected (R0 altered on exit).
The usual reason for rejection is that an algorithm is slow and is already filling as many channels as it can within each buffer period: for example very complex algorithms, or ones that read long samples off disc.