C (82/254)

From:Andrea Cometa
Date:07 Apr 00 at 11:58:22
Subject:Re: Interrupt audio

--- In amiga-c@egroups.com, Colin Wenzel <colstv@h...> wrote:
> On 07-Apr-00, Andrea Cometa wrote:
>
> > Hi, first sorry for my english (I'm Italian :) ).
> >
> > I've a problem with the use of the audio interrupt.
> > Programming in C i've use the SetIntServer(INTB_AUD0, myint0);
using
> > channel0, myint0 -> is_code is a function that swap two audio
buffer
> > in CHIP MEM. So if my sound file if bigger than 128k i can play
it
> > using two small buffers. But Does seem to work!
> >
> > Please Help Me!!!!!
> >
>
>
> If it does work, what is the problem ??

it doesn't seem to work! (i missed 'not')

>
> The is_Code field should point to the actual interrupt
> routine that is called when the buffer is empty.
>
> This routine should just refresh the buffer pointer &
> clear down the interrupt bit, reinitialize the buffer
> & restart DMA again to the new buffer....
>
> Don't forget to disable the interrupt before exit &
> free the resources.
>
> PS: The audio data being played HAS TO BE in chip mem.
>
it's ok, but if I use AddIntServer(INTB_VERTB, myint), were is_code
point to a simple routine that increment a counter, it work.
when I use SetIntVector(INTB_AUD0, myint) it should increment the
counter every time audio channel 0 has finished! But doesn't seem to
work!

N.B. to start sound i manually set the dma, using *(UWORD *)0xdffaxx
to init audio channel 0 then i start playing with
DMAF_SETCLR|DMAF_AUD0;

> -------------------------------------
> Colin Wenzel. Australia.
>
> EMAIL: mailto:colstv@hotkey.net.au
> URL: http://www.hotkey.net.au/~colstv/
> ICQ: 17608330
> AMIGA: 4000T, 68060/50, 150Mb RAM,
> OS 3.5, EGS Spectrum.
> ---------------------------------------

------------------------------------------------------------------------
Get a NextCard Visa, in 30 seconds!
1. Fill in the brief application
2. Receive approval decision within 30 seconds
3. Get rates as low as 2.9% Intro or 9.9% Fixed APR
Apply NOW!
http://click.egroups.com/1/975/1/_/451227/_/955105110/
------------------------------------------------------------------------