[Coco] OVCC project update.

John W. Linville linville at tuxdriver.com
Wed Aug 22 09:44:14 EDT 2018


Great work, Walter! Thanks for keeping us informed as well.

John

On Wed, Aug 22, 2018 at 08:20:28AM +0800, Walter Zambotti wrote:
> Some better news.
> 
> That popping and clicking that I heard was the sound card in my laptop dying!!!
> 
> What incredibly coincidental timing. The first time I test SDL audio my sound card dies. I booted my laptop from an Ubuntu thumbdrive just to confirm!
> 
> I have now tested the OVCC SDL audio on two other sound devices and everything sounds OK.
> 
> The sound card in my laptop is still responding to software so I suspect the audio amplifier after the sound chip is fried.  I'm not really good at solving hardware problems so a Bluetooth speaker is going to have to be the solution for me.
> 
> The last stage to port is the Windows Forms to AGAR.
> 
> But before that I'm going to decouple directx from the build and get the emulator running solely with SDL.
> 
> Walter
> 
> -----Original Message-----
> From: Coco [mailto:coco-bounces at maltedmedia.com] On Behalf Of Walter Zambotti
> Sent: Tuesday, 21 August 2018 8:27 AM
> To: 'CoCoList for Color Computer Enthusiasts' <coco at maltedmedia.com>
> Subject: Re: [Coco] OVCC project update.
> 
> 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
> 
> 
> -- 
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
> 
> 
> -- 
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco

-- 
John W. Linville		Someday the world will need a hero, and you
linville at tuxdriver.com			might be all we have.  Be ready.


More information about the Coco mailing list