Right I've integrated the changes so now the sound initialised the VGA buffer flashes not sure why but no crashing.
So now the big question how is the sound channelled into the DMA?
Yes I copied the code from one into the other then I used some mad science to make it work in C and then I compiled it. Once I work out what the changes I've done do I'm going to see how I can clean this up and work the way I want it to. Ie. the DMA buffers are allocated and the sound system is deinitialized when Lua exits as all allocated memory is freed back to the system when a program exits.
Oh I see something at line 121 this is where the samples are requested.
EDIT: I've changed my audio update function to be called in the keyboard tasks and update the DMA I'll report back if this works... it doesn't work it crashes out.
I'm not sure what going wrong with this.
So now the big question how is the sound channelled into the DMA?
Yes I copied the code from one into the other then I used some mad science to make it work in C and then I compiled it. Once I work out what the changes I've done do I'm going to see how I can clean this up and work the way I want it to. Ie. the DMA buffers are allocated and the sound system is deinitialized when Lua exits as all allocated memory is freed back to the system when a program exits.
Oh I see something at line 121 this is where the samples are requested.
EDIT: I've changed my audio update function to be called in the keyboard tasks and update the DMA I'll report back if this works... it doesn't work it crashes out.
I'm not sure what going wrong with this.
Statistics: Posted by DarkElvenAngel — Fri Oct 25, 2024 11:48 pm