Dead Hackers Society
Other BBSes »
Demoscene  Coding  CT60  Buy/sell

Atari coding BBS
Re: DSPMOD 3.4 problems
Posted by: ggn Jul,26.2020-22:37 


Here's the code I use to play samples in Downfall Falcon ( using DSPmod34:

During init:

bsr dspmod34_setup
move.w #5,dspmod34_player+dspmod34_dsptracks ;4 music + 1 sfx


DC.W $3FFF,0,0,0

The code that calls the sample player is mostly like this (a0=sample start, d0=sample length):

movea.l A0,A1
adda.l D0,A1

moveq #0,D0
move.w #221,D1
move.w #64,D2
moveq #0,D3
movea.l A0,A2
lea 2,A3
bsr dspmod34_player+dspmod34_fx

"221" is sample period that translates to Amiga timings. IIRC this value is the closest to 8KHz.

This is pretty much what I do and it's been very stable. One small thing I omitted is that I have an internal counter that avoids re-triggering the sample player if a sample is already playing. Of course the "lea 2,a3" means (IIRC again) that the looping point is 2 samples long.

In any case, I hope this helps!

[All messages in this thread]    [Start new thread]

Topic Posted by  Date 
DSPMOD 3.4 problems Instream Aug,12.2010-23:01
  Re: DSPMOD 3.4 problems evil Aug,13.2010-10:13
    Re: DSPMOD 3.4 problems Instream Aug,13.2010-10:55
      Re: DSPMOD 3.4 problems redspecter Aug,15.2010-18:39
        Re: DSPMOD 3.4 problems Instream Aug,17.2010-07:49
          Re: DSPMOD 3.4 problems mikro Aug,17.2010-09:19
            Re: DSPMOD 3.4 problems evil Aug,17.2010-09:27
      Re: DSPMOD 3.4 problems evil Aug,16.2010-09:16
        Re: DSPMOD 3.4 problems Instream Aug,17.2010-07:51
          Re: DSPMOD 3.4 problems Thomas / New Beat Aug,24.2010-14:40
            Re: DSPMOD 3.4 problems instream Aug,24.2010-22:20
  Re: DSPMOD 3.4 problems joska Jul,26.2020-13:53
    Re: DSPMOD 3.4 problems ggn Jul,26.2020-22:37

Reply to this message
Anti-troll code:


What's the anti-troll code?
That's your personal code to be able to add comments and messages on the site.
Don't have a code or forgot it? Fix it here.
© 1994-2020 Dead Hackers Society Contact: Anders Eriksson