View Single Post
Old 20 March 2021, 10:02   #4
leonard
Registered User
 
leonard's Avatar
 
Join Date: Apr 2013
Location: paris
Posts: 133
Quote:
Originally Posted by ross View Post
I see a possible weak point here: writing the pointer is not an atomic operation...
that's a very good point. So two cases could happen:

1) non atomic write occurs outside of PAULA exact loop point. In this case, the "next instrument" could be played (maybe one1 or two 8bits samples) before dma switch off and switch on again ( so the very first "good" sample will be played back again.
I think this case is ok and doesn't produce noticeable annoying glitch ( with bad luck you will play the very first sample of the right instrument 2 times)

2) non atomic write occurs at the exact PAULA loop point. This case is a real issue, because if 1 or 2 samples are played before DMA is switched off, these two samples could be completely random ( I mean not the very first samples of the right instrument). So if case (2) could happen, then it could produce hearable audio glitch

Quote:
Originally Posted by ross View Post
Toni should be asked
I agree. Toni, what do you think, is the case (2) possible on an Amiga?
leonard is offline  
 
Page generated in 0.08640 seconds with 11 queries