| |
comp.sys.acorn.programmer |
The Speak text-to-speech module processes text into phonemes and then Speak registers a RISC_OS "Linear Sound Handler" (SWI &40145) which When the wcmdq gets low, the sound handler sets a transient callback This all works properly in the currently available Speak version 2, I'm now trying to port a re-write which I did on Linux But calling the C function from the sound handler gives: The callback-setting is commented out, so that's not the problem. Calling a dummy C function (one which just assigns a couple of Calling a dummy C function which then calls another dummy C function I've checked the ARM procedure calling protocols and I think that's OK. IMPORT DummyProc1 DMA_Handler MOV r5,ip ; need to save ip MOV r6,r1 ;DMA start 16 bit sound SUB r0,r7,r6 ;r0 = size of DMA buffer NOP When the error occurs, the NOP isn't reached (i.e. DummyProc1 doesn't Am I doing something wrong, or is it just not possible to call a chain --
into a lower level form of formants (peaks in the frequency spectrum)
which are then queued for output (the "wcmdq")
runs as an interrupt (IRQ mode? I'm not sure of the correct
terminology) whenever the sound DMA needs filling. Speak's sound
handler takes items from this wcmdq and converts them to the sound
waveform to put into the sound DMA.
(SWI &54) to ask the OS to run the user mode part of the module to
convert some more text->phonemes->wcmdq.
where the sound handler is written entirely in assembler.
(espeak.sourceforge.net) to RISC_OS. I don't want to write the sound
waveform generation code in assembler, so the only assembler code is a
few lines of the sound handler which calls a C function and then sets
the callback if needed.
not enough memory - stack overflow
filecore in use
(which of course means the system then needs a restart).
variables) is OK. No error.
gives the error and doesn't return.
The test code is:
;**********
; linear sound handler, fill the sound DMA
; preserve r11,r12,r13 (fp,ip,sp)
; r1,r2 start and end of DMA buffer
MOV ip,sp ;set up a stack
STMFD sp!, {fp,ip,lr,pc}
MOV r7,r2 ;DMA end
BL DummyProc1 ; which then calls DuumyProc2
MOV ip,r5
LDMFD sp, {fp,sp,pc} ; procedure exit from Sound Handler
return).
of C functions from assembler in general, or from a sound handler in
particular?
change nospam in the reply email address to "jsd"