Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!cs.umu.se!dvljrt From: dvljrt@cs.umu.se (Joakim Rosqvist) Newsgroups: comp.sys.amiga.programmer Subject: Re: playing samples using audio h/w Keywords: audio DMA Message-ID: <1991Mar25.001553.10872@cs.umu.se> Date: 25 Mar 91 00:15:53 GMT References: <2325@m1.cs.man.ac.uk> Sender: news@cs.umu.se (News Administrator) Organization: Dep. of Info.Proc, Umea Univ., Sweden Lines: 22 In article <2325@m1.cs.man.ac.uk> snowdond@r2.cs.man.ac.uk (D.N.Snowdon (MSc PJ)) writes: > > I'm having a problem playing sound samples by hitting the >hardware directly. The problem is that I set up the registers >for the channel I'm going to use and set audio DMA going > using > move.w #(DMAF_SETCLR!DMAF_MASTER!DMAF_AUD0),dmacon(a0) >as per the h/w manual. The sound starts playing OK. > If I then stop the sound by turning its DMA off using > move.w #DMAF_AUD0,dmacon(a0) again as in the h/w manual, >the sound stops. If I then reload the registers and start >DMA going the sound I get is the remains of the first sample >(assuming I stopped it before it had finished playing >completely). The h/w manual does say that if you stop and >start DMA over a short period then this can happen but there >is actually quite a long delay between turning off DMA for >the first sample and turning it on for the second. How long is 'quite long'? The sound will only replay from where you stopped it if the next 2 samples has not been read from memory yet. Could you send the relevant part of the code, perhaps there is some simple error? /$DR.HEX$