Hi Chris, > However, after about one flash of the RISC OS cursor, the emulator > appears to freeze. It appears to still be running as everything else > slows down as if CPU time is being used.
On Unix, you can get a `CPU %' reading of processes with `ps xu'. Perhaps the Amiga has ways of monitoring what a process is doing? > 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; > } > > What values does SoundDMAFetch return, and does anybody have any ideas > why the code as above (which presumably works OK in the X version) is > causing the emulation to hang here? I don't know the sound code, but it looks like SoundDMAFetch()'s returning 1 is causing sound_poll() to return. That's causes a more time consuming poll because the logic is void sound_poll(void) { delayProgress++; if (delayProgress >= delayTotal) { if (SoundDMAFetch(buffer + localBufferWrite) == 1) { return; } delayProgress = 0; } } so perhaps the resetting of delayProgress should be before the SoundDMAFetch() call, i.e. delayProgress++; if (delayProgress >= delayTotal) { delayProgress = 0; if (SoundDMAFetch(buffer + localBufferWrite) == 1) { return; } } Or perhaps it's correct that it should only be reset if SoundDMAFetch() returns something other than 1, hence the `>=' test rather than `=='. > On a related note, why is there no sound_exit function? It opens the > audio stream, allocates a buffer, but there is no deallocation that I > can see? Surely we should have some form of sound clean-up function > in sound.c? I'm guessing that on process exit all it's resources are cleaned up automatically. Cheers, Ralph. ------------------------------------------------------------------------- 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