On 22 Sep 2006 19:56:26 +0100, Chris Young wrote:

> If I comment out this part of sound_poll, I get sound (of sorts, it
> just plays the garbage that was in the buffer when it was first
> allocated):
> 
>       if (SoundDMAFetch(buffer + localBufferWrite) == 1) {
>         return;
>       }

Ah, I found it.  It appears that numberOfChannels is uninitialised
when the emulator starts up, until something happens to cause
SoundUpdateStereoImage() to be called.

I've patched the routine so that when numberOfChannels is 0, it calls
SoundUpdateStereoImage() and therefore initialises the channels and
samplerate.

I'm getting serious memory leaks, but I think this is outside my code
- either elsewhere in ArcEm or (more likely) ahi-handler.  Bizarrely,
the sound is better when I move windows or just the mouse pointer
around the screen.

Chris

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
arcem-devel mailing list
arcem-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/arcem-devel

Reply via email to