Using blitter for sound mixing

GFA, ASM, STOS, ...

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

User avatar
npomarede
Atari God
Atari God
Posts: 1232
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: Using blitter for sound mixing

Postby npomarede » Thu May 17, 2018 10:08 am

Hi
yes, that's the idea :)

working with a larger buffer (triple or even more) is a good alternative too, because you don't have to change the number of generated sample per VBL, you just have to stop generating samples at one point when the buffer is too much "in advance" (this is similar to how Hatari internaly generate emulated sound samples for the OS, using a circular 16 KB buffer, with one pointer to write new data and one pointer to read data and push them to the OS).
A larger buffer will create a small latency (2 VBL in your case with triple buffer), but that's unnoticeable in the case of a demo.

User avatar
troed
Atari God
Atari God
Posts: 1350
Joined: Mon Apr 30, 2012 6:20 pm
Location: Sweden

Re: Using blitter for sound mixing

Postby troed » Thu May 17, 2018 1:34 pm

STE base clock is either 8.02 or 8.05 (NTSC models) though.

User avatar
metalages
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 100
Joined: Thu Jun 06, 2013 5:14 pm
Location: France
Contact:

Re: Using blitter for sound mixing

Postby metalages » Thu May 17, 2018 2:38 pm

Does this mean something around 50.23 VBL per sec => 996.73 DMA sound samples per sec ?

User avatar
metalages
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 100
Joined: Thu Jun 06, 2013 5:14 pm
Location: France
Contact:

Re: Using blitter for sound mixing

Postby metalages » Mon May 21, 2018 6:13 pm

Ok I have something working with de-sync looping-dma and replay routine using 4 buffers.
So no more click indeed.

Drawbacks with this approach are :
- there is a small desync in replay / rythm when I catch up. Can be accpetable as it does not happen so often.
- it would be difficult with this approach to sync STe balance control with score


Social Media

     

Return to “Coding”

Who is online

Users browsing this forum: No registered users and 0 guests