;Entry_ADFVoices
;---------------
;Sets the number of sound channels: 1/2/4 or 8
;
;Entry:
; R0 - Command tail
; R12 - pointer to module private word

.Entry_ADFVoices
 STMFD   R13!, {R1-R4, R14}

 MOV     R1, R0				;command tail
 MOV     R0, #10 + (1<<29)		;assume base 10 with restricted range
 MOV     R2, #8				;max value
 SWI     XOS_ReadUnsigned		;read the value PRM1-460
 LDMVSFD R13!, {R1-R4, PC}		;exit on error

 MOV     R0, R2				;channels
 MOV     R1, #0
 MOV     R2, #0
 MOV     R3, #0
 MOV     R4, #0
 SWI     XSound_Configure		;PRM4-18

LDMFD   R13!, {R1-R4, PC}