I did not get the blogs at www.jac64.com to work well, so I move over to more robust technology...
I have been synchronizing the speed of my C64 emulator JaC64 using the javasound SoundDataLine's write() method that before Java SE6 blocked the calling thread for as long time it took to get enough space to write the sound data to the buffer. This way of synchronizing the emulator worked very fine until now when I upgraded to SE6 which seems to get waits of up to ~300 milliseconds where SE5 would wait a few milliseconds. This is of course causing the emulator to "sleep" for several frames which cause all games, demos, etc. to be very hard to enjoy...
So instead of doing:
... generate sound in buffer ... [for a few milliseconds playback]
dataLine.write(buffer, 0, GEN_LEN);
... ....
I now need to fix a new way to get the emulation speed to be correct, and also report this bug to Sun for fixing it in the next version of Java SE6.
Prenumerera på:
Kommentarer till inlägget (Atom)
Inga kommentarer:
Skicka en kommentar