[Coco] OVCC project update.

Walter Zambotti zambotti at iinet.net.au
Mon Aug 20 20:26:37 EDT 2018


Some good news.

The audio code just worked as is!!!

However it is full of pops and clicks. Not a lot but enough to be annoying!

I managed to find a tutorial example of someone who converted a directx game to sdl and they confirmed this same behaviour should be expected.

However they also provided a workaround that allows sdl audio to behave just like direct x audio.  I have downloaded his code and I am looking at it now.

So things are looking hopeful.

Walter

-----Original Message-----
From: Coco [mailto:coco-bounces at maltedmedia.com] On Behalf Of Walter Zambotti
Sent: Friday, 17 August 2018 9:05 AM
To: 'CoCoList for Color Computer Enthusiasts' <coco at maltedmedia.com>
Subject: [Coco] OVCC project update.

So the audio/sound component of direct/x/sound is the last component to be converted to SDL.

 

In comparison to the graphics conversion it has been challenging.  Where the graphics models between directx and sdl are similar enough that the conversion was straight forward the audio models are considerably different.

 

Direct Sound has devices and devices are allocated sound buffers. The user has sound samples stored in memory. The user copies his sound sample from memory to a sound buffer.  Basically a memory to memory copy.  It was up to VCC to figure out what and where to copy.  So in VCC there were a lot of buffer pointers maintained and logic to maintain a circular buffer.

 

SDL however has sound devices and sound queues (not buffers).  The user has samples stored in memory. The user just submits the sample to the queue.
There's no concept of manipulating the sound buffers after that stage.

 

So all the VCC sound buffer logic seems irrelevant.  So my SDL sound interface has very little code.

 

In VCC whenever something is written to the sound register at FF22 (from
memory) that value is also recorded in a small buffer (array) and once every
1/60 sec that small buffer is sent to the direct sound interface to place in the next position in the sound device's circular buffer.

 

In SDL all I can do with that small buffer is queue it to the SDL sound device.

 

So I have written the SDL sound code that I believe will work and I now begin to debug it. 

 

So keep your fingers crossed that that is all I need to do (queue it) !!!

 

Walter

 

 


--
Coco mailing list
Coco at maltedmedia.com
https://pairlist5.pair.net/mailman/listinfo/coco



More information about the Coco mailing list